• 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
Acceptable bit-depths for NSImageBitmapRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Acceptable bit-depths for NSImageBitmapRep
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: How to validate the Undo menu item?
  • Next by Date: Re: FTPClient Beta Released - Please test
  • Previous by thread: Re: FTPClient Beta Released - Please test
  • Next by thread: Re: Acceptable bit-depths for NSImageBitmapRep
  • Index(es):
    • Date
    • Thread