• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBitmapImageRep and 1-bit image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: A simple question about nsthread
  • Next by Date: Re: more than one plist in a file.
  • Previous by thread: Custom OutlineView Code
  • Next by thread: Re: NSBitmapImageRep and 1-bit image
  • Index(es):
    • Date
    • Thread