Re: NSBitmapImageRep Colorspace Question
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.