Re: Reading RGBA pixel values from image on disk
Re: Reading RGBA pixel values from image on disk
- Subject: Re: Reading RGBA pixel values from image on disk
- From: Quincey Morris <email@hidden>
- Date: Thu, 10 Mar 2011 11:07:30 -0800
On Mar 10, 2011, at 10:25, Leonardo wrote:
> representations count 1
> colorSpaceA sRGB IEC61966-2.1 colorspace
> isPlanar 0
> numberOfPlanes 1
> NSAlphaNonpremultipliedBitmapFormat 0
> hasAlpha 0
> bitsPPixel 24
> bytesPerPixel 3
Yes, but what is samplesPerPixel? 3 or 4?
> The pixel I have set on Photoshop as RGBA
> 0.00, 1.00, 0.00, 0.20
> becomes in my App as
> 0.80, 1.00, 0.80, 1.00
> which clearly means it has been pre-multiplied by a white opaque color
No, if it had been *premultiplied*, the alpha value would still be 0.2. It's been *composited* onto a white opaque background.
> 1.00, 1.00, 1.00, 1.00
> final = (src * 0.2) + (dst * (1.0 - 0.2))
>
> I would like to know where the alpha info has gone within the file
It sure looks like Photoshop flattened the file and output it without transparency.
_______________________________________________
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