DeviceRGB, CMYK, & Gray color spaces are deprecated. You should
always use GenericRGB, etc. instead. GenericRGB represents an ideal
1.8 gamma Mac color space that all monitors strive to achieve. Think
of it similar to sRGB but different gamma.
'User' color spaces were meant to represent the color space the
application should use if they encountered un-tagged data. This was
user configurable using the ColorSync pane. This has been removed and
user color spaces now map internally to Generic.
So use CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB) instead of
CGColorSpaceCreateDeviceRGB() all the time. The former is well
defined - the latter is device dependent.
Prior to Tiger, we allowed (inadvertently) the ability to create
BitmapContexts with DeviceRGB. This doesn't make sense so internally
DeviceRGB mapped to GenericRGB on a bitmap context (even pre-Tiger).
With the deprecation, GenericRGB is the way to go. Also device
dependent colors in PDF documents map to Generic colorspaces also.
Usage of Generic colorspace means that your content will be look the
same across multiple devices and displays. There is sample code
available to create generic colorspaces pre-Tiger, which is
recommended. Let me know if anyone wants this.
If one wants to draw to an offscreen bitmap context for caching
purposes for onscreen display, use the colorspace of the main display
instead for the bitmap context. Or better yet use CGLayerRefs instead
where you don't have to worry about this stuff.
If one wants to avoid color matching, use the colorspace of the
destination device, if you know it.
This is an important topic, so let me know if you still have questions.
haroon
On May 11, 2005, at 7:26 PM, Brendan Younger wrote:
On May 11, 2005, at 9:05 PM, R. Scott Thompson wrote:
Can someone please explain the difference between the deprecated
"User" color spaces of 10.3 and the "Generic" color spaces of Tiger?
When is it appropriate to use the color spaces? How are the
different? And how do they compare with "Device" color spaces?
It should be noted that IANAAE (I am not an Apple employee), but
I'll take my best shot at this.
For most users, the "user" color spaces in 10.3 and the "generic"
color spaces in 10.4 are going to be exactly the same. If you
remember 10.3's System Preferences (so long ago, I know), it had a
ColorSync pane where the user could set interesting things like
default CMM and default RGB, CMYK, and Gray color profiles. Most
users, who have no clue what a color space is, never changed
these. However, if you had some strange reason to do so, or you
*always* worked in Adobe 1998 RGB, then you could set this to be
the default color space for images and whatever other untagged
color data ignorant applications threw up on the screen. As of
10.4, there is no longer a ColorSync pane in System Preferences and
the role of user default color spaces has been overtaken by generic
color spaces. This way, untagged color data will look *exactly*
the same on different computers running 10.4 since the user can no
longer (easily) change the default color space.
So, when to use these generic or user default color spaces? You
usually use them when your unsure of what color space the color
data you have is. Also, if you're drawing to a bitmap context and
you're just kind of blindly drawing red lines here, purple boxes
there, etc. and don't really care that much about color fidelity,
just call the data generic RGB. The device color spaces are
deprecated in 10.4 since it doesn't make much sense to call
something device RGB without reference to what device you're
talking about. If you don't want your color data to be color
matched, you can usually just pass NULL as the color space instead
of device RGB and get the same effect.
Brendan Younger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden