Re: NSBitmapImageRep and 1-bit image
Re: NSBitmapImageRep and 1-bit image
- Subject: Re: NSBitmapImageRep and 1-bit image
- From: Cameron Hayne <email@hidden>
- Date: Thu, 1 Dec 2005 05:14:45 -0500
On 1-Dec-05, at 12:24 AM, Timofey Sherudilo wrote:
Here is my problem: I try to create a 1-bit image representation,
like this:
imageRep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:nil
pixelsWide:width
pixelsHigh:height
bitsPerSample:1
samplesPerPixel:1
hasAlpha:NO
isPlanar:YES
colorSpaceName:NSDeviceBlackColorSpace
bytesPerRow:width
bitsPerPixel:1];
I think you want 'bitsPerSample' to be 8 since you are supplying a
full byte for each pixel.
--
Cameron Hayne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden