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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to