On Mar 10, 2011, at 12:47 PM, Leonardo wrote:

> I forgot: if I save the TIF from Photoshop marking the check-box "Save
> Transparency", on my App I can quite read the alpha channel, and the RGB
> values are not pre-multiplied. That's fine.
> Anyway, without the "Save Transparency", on my App I get the RGB values
> pre-multiplied and the alpha values are all 1.0, so I can't calculate the
> original RGB values. The weird point is that if I re-open this TIF file with
> Photoshop, the half-a-transparent pixels are well visible. So the alpha
> information has been properly stored within the TIF file, somewhere. I would
> like to know where.

TIFF file formats can include a wide range of tags, including "private use" 
ones that would be used by Photoshop to store whatever they want, up to, and 
probably including, the Ark of the Covenant (or in this case, some variation on 
a .psd file)

But bottom line is, if you are saving the file without transparency, that is 
what you are getting in the publicly documented parts of the file - it would be 
wrong for NSImage to use those private tags to give you anything other than 
what the file publicly presents (i.e., attempting to reading alpha from a file 
that has tags declaring it to not have alpha would be non-conformant with the 
TIFF spec).

Glenn Andreas                      gandr...@gandreas.com 
The most merciful thing in the world ... is the inability of the human mind to 
correlate all its contents - HPL

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to