Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Spaces vs. Generic Spaces




On May 12, 2005, at 1:04 PM, Haroon Sheikh wrote:

Brendan does a good job describing the issue.

My thanks to Brendan for his analysis as well.

'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 the "user" color spaces were really not the correct ones to use when dealing with data that you, yourself created in (for example) an offscreen bitmap. They were really only appropriate for data from an external source (say an older scanner) where you weren't sure what color space that data came from.


So use CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB) instead of CGColorSpaceCreateDeviceRGB() all the time. The former is well defined - the latter is device dependent.

When, if ever, is it the Right Thing to call CGColorSpaceCreateDeviceRGB?


Is it accurate to say, then, that an user-level application should VERY rarely use CGColorSpaceCreateDeviceRGB? It would seem that that color space is most useful to something like a device driver that is going to be talking directly to a device's frame buffer.

Maybe if an application captures the display it would be appropriate or something along those lines?

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.

I gather that this is the code in listing 3-4 at this site:

<http://developer.apple.com/documentation/Carbon/Conceptual/ QuickDrawToQuartz2D/tq_color/chapter_4_section_3.html>

If not, then I would be interested in seeing that code.

Thanks for all the discussion it's very helpful!

Scott

_______________________________________________
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
References: 
 >User Spaces vs. Generic Spaces (From: "R. Scott Thompson" <email@hidden>)
 >Re: User Spaces vs. Generic Spaces (From: Brendan Younger <email@hidden>)
 >Re: User Spaces vs. Generic Spaces (From: Haroon Sheikh <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.