Re: Save image in property list
Re: Save image in property list
- Subject: Re: Save image in property list
- From: Sherm Pendley <email@hidden>
- Date: Sat, 2 Oct 2004 14:38:04 -0400
On Oct 2, 2004, at 2:20 PM, Peter Karlsson wrote:
I wonder if someone have any sample code that shows me how to save
image
data in a property list? I want to open the .tiff image from disc, add
it
to the end of a NSMutableArray and save the array as a property list.
Use NSData's +dataWithContentsOfFile:, -initWithContentsOfFile:, or the
memory-mapped variants of those methods, to create an NSData object
with the data in the file. Add this object to the property list.
When you load the property list, if you want an NSImage object, use
-initWithData: to create it from the NSData object.
sherm--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden