[Image-SIG] RGBA support in TIFF imgaes...

Kevin Cazabon KCAZA@cymbolic.com
Wed, 24 Nov 1999 09:08:18 -0800


Actually, they're produced from PhotoShop.  I'm basically making a quick-mask in
Photoshop on a normal RGB image, then selecting to save as a TIFF (I haven't tried
Mac byte order, but I can't see that making a difference).  Doing the same thing with
PNG or TGA works fine though.

Do you know if there's a 'better' way to save a masked image in Photoshop that will
create 'compatible' RGBA images?  (I'm an Adobe certified instructor for Photoshop,
and I don't know of any...)  q:]

Thanks for the tip... I'll implement that.  Seems like the simple way for now,
because I have no need for RGBX anyways (at least not yet!).  I saw those entries in
the TiffImagePlugin, which led me to believe that it 'should' work, because there was
an RGBA entry.

Kevin.

>>> "Fredrik Lundh" <fredrik@pythonware.com> 11/24/99 05:52AM >>>
Kevin Cazabon wrote:
> I'm just wondering if there's any reason that RGBA images aren't properly supported
> in the TIFF reader... I realize that the documentation doesn't mention RGBA for
TIFF,
> however the images do load without error (they load as RGBX), but the alpha channel
> is messed up.

> Is it supposed to work, or is there something that needs to be changed in the TIFF
> plugin?

RGBA is supposed to work, but only for TIFF files
where the fourth layer is marked as an extra
transparency layer (the extra samples tag should
contain an "unassociated alpha" layer and nothing
else)

in your case, it looks like the file contains four
layers, but that the fourth layer is marked as
"unspecified".  (what did you use to generate
those files?)

a quick hack is to change the OPEN_INFO
table to look like:

#    (2, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"),
    (2, 1, (8,8,8,8), (0,)): ("RGBA", "RGBA"),
    (2, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"),

</F>


_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org 
http://www.python.org/mailman/listinfo/image-sig