Re: How to get image real number of bits per pixel
Re: How to get image real number of bits per pixel
- Subject: Re: How to get image real number of bits per pixel
- From: Jeff Disher <email@hidden>
- Date: Tue, 25 Feb 2003 20:44:40 -0500
How were you getting the NSBitmapImageRep from the imageView? It is
possible that you were getting some sort of cached imagerep which would
most likely be RGBA. If you get the representations from the image
that you can get from the imageview, you could check its array of
representations and see what it returns for each one.
Finding the _real_ representation of an image has been a point of
frustration in my work as well.
Hope that helps,
Jeff.
On Tuesday, February 25, 2003, at 11:21 AM, Sebastien TOPIN wrote:
Hi Folks,
I am trying to get the real number of bits per pixel for a displayed
image.
A NSImageView object enables me to drag n' drop a bmp image from the
Finder
and display it in my app.
Then I got an NSBitmapImageRep from the NSImageView and did that:
int iBitsPerPix = [bittmapImageRep bitsPerPixel];
The result is always 32 even for grayscale 8 bits per pixel images or
24 bits
per pixel color images.
How can I get the image real number of bits per pixel of those images?
Thanks in advance,
Seb
_______________________________________________
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.
Jeff Disher
President and Lead Developer of Spectral Class
Spectral Class: Shedding Light on Innovation
http://www.spectralclass.com/
_______________________________________________
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.