Re: saving images
Re: saving images
- Subject: Re: saving images
- From: Graham Cox <email@hidden>
- Date: Sun, 22 Jul 2012 09:26:36 +1000
On 22/07/2012, at 2:58 AM, Conrad Shultz wrote:
> Note that UIImage conforms to NSCoding, so once you've loaded a UIImage through whichever means you prefer (NSData, the URL loading system, etc.) you can archive the image to an NSData (and of course unarchive) in the usual manner.
UIImage seems somewhat different, but on the Mac (NSImage) this is a really bad idea.
iOS has some utility functions such as UIIMageJPEGRepresentation() which converts a UIImage to data in JPEFG format, and there are others for PNG, etc. Be nice if NSImage had these as well, though there are more long-winded ways to achieve same.
If you can track and save the original NSData for the image, that's optimal, but if you can't, one of these functions should sort you out.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden