On Mar 28, 2008, at 6:09 AM, Trygve Inda wrote:


Why the shift? This is not a jpg file. Is there a better choice over
NSDeviceRGBColorSpace?


Try NSCalibratedRGBColorSpace

Since NSBitmapImageRep's initWith[...] doesn't include a device for device-specific colorspaces, I'd avoid using them as much as possible.

If you want better color management, you can set the image rep's property "NSImageColorSyncProfileData" to an NSData that contains the colorsync profile (the comments are a bit misleading - it implies that this is only for TIFF and GIF files, but it actually can be set on all image reps, it just won't always be written. More confusingly, practice has shown this comment as out of date as other file formats such as PNG will also get profiles saved in them).

Note that working with ColorSync profiles combines with examining bit data is a lot like working in one of those "corner mirrors" - it's really easy to get confused about what your seeing ("now is this value corrected? or does it get corrected when it gets drawn?").


Glenn Andreas                      [EMAIL PROTECTED]
 <http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate



_______________________________________________

Cocoa-dev mailing list ([email protected])

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

This email sent to [EMAIL PROTECTED]

Reply via email to