Re: Bitmaps and color shift
Re: Bitmaps and color shift
- Subject: Re: Bitmaps and color shift
- From: glenn andreas <email@hidden>
- Date: Fri, 28 Mar 2008 09:01:23 -0500
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@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
_______________________________________________
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