Re: Color matching of NSBitmapImageRep
Re: Color matching of NSBitmapImageRep
- Subject: Re: Color matching of NSBitmapImageRep
- From: Marcel Weiher <email@hidden>
- Date: Thu, 30 Aug 2007 07:20:36 -0700
On Aug 29, 2007, at 5:54 PM, Wim Lewis wrote:
- Convert the color to the calibrated RGB space by calling [foo
colorUsingColorSpaceName:NSCalibratedRGBColorSpace].
- Create an NSBitmapImageRep in the NSCalibratedRGBColorSpace, 32-
bit RGBA:
NSBitmapImageRep *foo = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:buffer
pixelsWide:width pixelsHigh:height
bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO
colorSpaceName:NSCalibratedRGBColorSpace
bytesPerRow:4 * width bitsPerPixel:32];
[snip detailed description, all of which seemed correct]
Does your image actually have alpha transparency? If yes, are you
accounting for the fact that NSBitmapImageRep stores its samples pre-
multiplied? (Or have we stopped doing that?)
Marcel
_______________________________________________
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