Hello,
We are drawing to a screen context in [NSView drawRect:] using an NSColor based off of a L*a*b* NSColorSpace loaded form an ICC Profile. On 10.11, we get the following assertion:
Assertion failed: (space->state->type == kCGColorSpaceLAB), function CGColorSpaceGetLabData, file ColorSpaces/CGColorSpace_Lab.c, line 137.
The same exact code works on 10.8 and up. Any ideas what might have changed? Is this new or am i doing something all wrong? Here's the simple code:
- (void)drawRect:(NSRect)dirtyRect
{
NSString* labProfilePath = [[NSBundle mainBundle] pathForResource:@"Lab" ofType:@"icc"];
NSData* labProfileData = [NSData dataWithContentsOfFile:labProfilePath];
NSColorSpace* labCS = [[NSColorSpace alloc] initWithICCProfileData:labProfileData];
CGFloat components[4] = { 0, 1, 1, 1 };
NSColor* color = [NSColor colorWithColorSpace:labCS components:components count:4];
[color set];
[[NSBezierPath bezierPathWithRect:dirtyRect] fill];
}
regards,
Alex Cohen