Re: NSBitmapImageRep and alpha channel
Re: NSBitmapImageRep and alpha channel
- Subject: Re: NSBitmapImageRep and alpha channel
- From: Quincey Morris <email@hidden>
- Date: Sun, 13 Nov 2011 12:34:45 -0800
On Nov 13, 2011, at 11:11 , James Merkel wrote:
> This is kind of interesting -- if I rotate the image in Preview (rather than Image Capture), then the histogram looks normal.
> Looking at the NSBitmapImageRep from Preview image, the order is RGBA and there is no reported alpha channel.
> Furthermore for the Preview rotated image, the Exif Orientation tag says normal (horizontal), and the width and height are reported correctly.
> For the Image Capture rotated image, the Exif Orientation tag says rotated 90 degrees and the width and height are reversed (i.e. not reported correctly).
> I think Preview is doing the right thing and Image Capture is doing the wrong thing.
> Why I get a bad histogram from the IMage Capture rotated image I'm not sure.
The implication of this is likely that you're misinterpreting the pixel format of the Image-Capture-rotated image. (For example, did it change the component values from 8-bit to 16-bit components or to floats, or something like that?). In principle, it shouldn't be too hard to resolve. Simply examining the data, or substituting a test image with known, predictably-arranged colors, should let you see why your histogram calculation doesn't match._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden