[Image-SIG] Question on TIFF EXTRASAMPLES tag support

Tom Bridgman bridgman at wyeth.gsfc.nasa.gov
Wed Sep 10 16:06:30 EDT 2003

We're using PIL for converting TIFFs generated by our animations into
additional products for web and video release.  Today I encountered an
incompatible/unsupported TIFF format generated in one of our newer
processes.  Setting the Image.DEBUG flag, I found that the file had:

format key: (2, 1, (8, 8, 8, 8), (1,))
- unsupported format

while apparently the nearest supported formats listed in
TiffImagePlugin.py are 

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

Apparently, this file has an incompatible 'EXTRASAMPLES'=1 flag but this
appears to be indicating the presence of an alpha channel.  

After checking some additional references, I'm wondering what's the
difference between the EXTRASAMPLES=1 and RGBA?  If there is no
significant difference, couldn't support for this format be installed by
just adding:

    (2, 1, (8,8,8,8), (1,)): ("RGBA", "RGBA"),

to the OPEN_INFO list in TiffImagePlugin.py?

Can anyone enlighten me?  

Should this be installed in the distribution?  

Other comments/suggestions?  I'm no expert on PIL - I'm making this
determination based on one afternoon of study...

Dr. William T."Tom" Bridgman           Scientific Visualization Studio
Global Science & Technology, Inc.      NASA/Goddard Space Flight Center
Email: bridgman at wyeth.gsfc.nasa.gov    Code 935
Phone: 301-286-1346                    Greenbelt, MD 20771
FAX:   TBD                             http://svs.gsfc.nasa.gov/

More information about the Image-SIG mailing list