Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Color matching of NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color matching of NSBitmapImageRep




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


References: 
 >Color matching of NSBitmapImageRep (From: Wim Lewis <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.