On Thursday, October 30, 2008, at 05:46PM, "Graham Cox" <[EMAIL PROTECTED]> 
wrote:
>
>On 31 Oct 2008, at 11:44 am, Graham Cox wrote:
>
>> You can't have 16 bits per pixel RGB bitmaps
>
>
>I mean 16 bits per *COMPONENT*, not pixel - slip of the pen ;-)

16 bit per channel RGB is supported for CGBitmapContextCreate, according to the 
docs [1], but it looks like you need to use 64 bits per pixel and skip the 
alpha.  I'm not sure if that works with NSBitmapImageRep directly, but using CG 
for this is pretty easy.  A couple other points: don't pass 
@"NSCalibratedRGBColorSpace" (remove the @"" to use the actual constant).  ISTR 
having problems if you specify rowBytes and allow NSBitmapImageRep to allocate 
your memory for you, since it'll pad the rows.  Just pass zero and then ask the 
new rep for the actual rowBytes if needed.

-- 
Adam


[1] 
http://developer.apple.com/DOCUMENTATION/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/chapter_3_section_4.html
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to