• 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 Colorspace Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBitmapImageRep Colorspace Question


  • Subject: Re: NSBitmapImageRep Colorspace Question
  • From: Marcel Weiher <email@hidden>
  • Date: Wed, 14 Nov 2001 13:25:32 +0100

On Wednesday, November 14, 2001, at 11:35 AM, HAEUPL Friedrich - RTAA wrote:

myNSBitmapImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
pixelsWide:imageSize.width
pixelsHigh:imageSize.height

This is a bit of a code-smell: pixelsWide and pixelsHigh are integers, whereas the NSSize I assume you are refering to here has floats. Also, the image size does not necessarily (or typically!) match the pixel-size.

bitsPerSample:8 // 8 bit per color component
samplesPerPixel:3 // rgb components
hasAlpha:NO // no alpha channel
isPlanar:NO
colorSpaceName:NSCalibratedRGBColorSpace //
bytesPerRow:0 // 0 = no empty space at the end
bitsPerPixel:24];

I also tried to use myNSBitmapImageRep with colorSpaceName:NSCalibratedWhiteColorSpace
but this didn't work.

That is what I would have suggested. What didn't work for you?

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.


References: 
 >NSBitmapImageRep Colorspace Question (From: HAEUPL Friedrich - RTAA <email@hidden>)

  • Prev by Date: Re: NSWindowController that closes itself
  • Next by Date: Keyboard events filtering
  • Previous by thread: NSBitmapImageRep Colorspace Question
  • Next by thread: Re: NSBitmapImageRep Colorspace Question
  • Index(es):
    • Date
    • Thread