Acceptable bit-depths for NSImageBitmapRep
Acceptable bit-depths for NSImageBitmapRep
- Subject: Acceptable bit-depths for NSImageBitmapRep
- From: "Clark S. Cox III" <email@hidden>
- Date: Fri, 09 Aug 2002 13:42:14 -0400
In attempting to load 12-bit grayscale (padded to 16-bit) images from a
buffer, I am using the following code:
const void *data = ...
int w = ...
int h = ...
...
theRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes: (unsigned
char**)&data
pixelsWide: w
pixelsHigh: h
bitsPerSample: 12
samplesPerPixel: 1
hasAlpha: NO
isPlanar: NO
colorSpaceName: NSCalibratedWhiteColorSpace
bytesPerRow: 0
bitsPerPixel: 16];
However, theRep is always nil. I have a suspicion that maybe
NSBitmapImageRep only works with certain bitdepths, and that 12bpp isn't one
of them. If anyone knows for sure what NSImageBitmapRep will and won't work
with, I'd appreciate hearing back from you.
--
Clark S. Cox III
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.