Re: Storing an NSImage File
Re: Storing an NSImage File
- Subject: Re: Storing an NSImage File
- From: Alex Zavatone <email@hidden>
- Date: Fri, 02 Aug 2013 13:21:41 -0400
On Aug 2, 2013, at 12:55 PM, Uli Kusterer wrote:
> On Aug 2, 2013, at 6:23 PM, Gordon Apple <email@hidden> wrote:
>> I have a need to store an NSImage (possibly from a pasteboard) as standard
>> file type. As a last resort, I just archive the NSImage as a private type,
>> I have figured out how to recognize a NSPDFImageRep and store as a .pdf,
>> which I need because of certain metadata which needs to be preserved. But
>> what about NSBitmapImageRep. Is a bitmap just a bitmap, regardless of the
>> original source type? If I canĀ¹t get the original type, is TIFF the most
>> robust format for bitmap file storage?
>
>
> The only difference between the various bitmap image formats is the space they take up on disk, and whether they use lossy or lossless compression on disk. If you want to make sure no data is lost, a losslessly compressed or uncompressed TIFF is the safest choice. But it may result in a rather large file (e.g. if the original was a JPEG). But you don't want to recompress a JPEG as another JPEG, even if you use the same settings, because *by definition* that will cause loss of data.
Why not PNG? PNG data chunks for image chunks use zip compression that's lossless.
http://www.w3.org/TR/PNG/
_______________________________________________
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