Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Get CGColorSpace for NSScreen (not working since 10.5.5)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get CGColorSpace for NSScreen (not working since 10.5.5)



Hi all,

I have been using the following code to get the CGColorSpaceRef for a NSWindow.

CGDirectDisplayID ddid = [[[[self screen] deviceDescription] objectForKey:@"NSScreenNumber"] longValue];
CMProfileRef profile = "" style="color: #aa0d91">NULL;
CGColorSpaceRef colorspace = NULL;
if (CMGetProfileByAVID((CMDisplayIDType) ddid, &profile) == noErr)
{
colorspace = CGColorSpaceCreateWithPlatformColorSpace(profile);
CMCloseProfile(profile);
}
return colorspace;

The code broke with the 10.5.5 update.
Can somebody point me to an alternative way to do it.
Thx.

Mark
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.