2001.02.21 18:05 "PhotoShop alpha channels and LibTiff", by Chris Losinger

2001.02.21 19:57 "Re: PhotoShop alpha channels and LibTiff", by Chris 'Xenon' Hanson

i have a TIFF created in PhotoShop (vers??). it is saved with an alpha channel.

when i go to read this image using TIFFReadRGBAImage, the alpha channel is not read. LibTiff treats it as an RGB image, not an RGBA.

tracing the code, i found that the alpha channel is marked: EXTRASAMPLE_UNSPECIFIED. when i forced that flag to EXTRASAMPLE_ASSOCALPHA, LibTiff returns the proper alpha channel.

what to do about this?

is it a photoshop bug or a libtiff bug?

I've seen this too, if I created the Alpha channel in Photoshop.

If I create a 32-bit (24-bit + 8 bit alpha) TGA image in another program, and load it into Photoshop, Photoshop shows it as RGBA. If I then save it to TIFF, Photoshop properly flags it as an Alpha channel, and TIFFReadRGBAImage reads it fine. I'm not sure what Photoshop does differently when you create an Alpha channel by hand versus loading it with the image.

I have no advice, but I'd be interested in the answer myself.

Chris - Xenon

Chris Hanson | Xenon@3DNature.com | I've got friends in low latitudes!
       New WCS 5 Demo Version! http://www.3DNature.com/demo/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen