Re: NSImage and 8 bit
Re: NSImage and 8 bit
- Subject: Re: NSImage and 8 bit
- From: Marcel Weiher <email@hidden>
- Date: Tue, 30 Nov 2004 10:56:20 +0000
On 30 Nov 2004, at 08:26, Robert W. Kuhn wrote:
Thank you for your help. I discovered that I have to use
initWithBitmapDataPlanes:
pixelsWide:
pixelsHigh:
bitsPerSample:
samplesPerPixel:
hasAlpha:
isPlanar:
colorSpaceName:
bytesPerRow:
bitsPerPixel:
Why? Why not use +imageRepWithData:
Ugly code.
Yes.
Not very handy to load first the image (to get width and
height)
and the the data again.
Why do you need the NSImage to get the width/height
This is probably a cached representation, so you are getting the depth
of the bitmap cache. The last time I checked NSImage discards the
original data unless you tell it to -setDataRetained:YES.
I also did try this. I always get only 32bit-Data. Also the NSImage has
always only one NSBitmaprepresentation - the 32bit data.
You are probably still getting the cached representation with your
code. Try logging all the representations, I think you will see that
the original image data is now present.
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
1d480c25f397c4786386135f8e8938e4
_______________________________________________
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