[Image-SIG] PIL not loading some TIFF files?

Green Bryan - bgreen Bryan.Green at acxiom.com
Wed Nov 5 15:22:44 CET 2008


Florian is completely correct.  I went down the wrong path and thanks to a typo thought I had the file loaded with PIL when I did not.  The PD/GEM people should still make sure the tags are updated correctly when writing a baseline tiff image.  You need to be able to handle ExtraSamples to claim that you can handle TIFF.

TIFF 6.0 Specification Final-June 3, 1992

These are the required fields for RGB images (in numerical order):
TagName Decimal Hex Type Value
ImageWidth 256 100 SHORT or LONG
ImageLength 257 101 SHORT or LONG
BitsPerSample 258 102 SHORT 8,8,8
Compression 259 103 SHORT 1 or 32773
PhotometricInterpretation 262 106 SHORT 2
StripOffsets 273 111 SHORT or LONG
SamplesPerPixel 277 115 SHORT 3 or more
RowsPerStrip 278 116 SHORT or LONG
StripByteCounts 279 117 LONG or SHORT
XResolution 282 11A RATIONAL
YResolution 283 11B RATIONAL
ResolutionUnit 296 128 SHORT 1, 2 or 3

The BitsPerSample values listed above apply only to the main image data. If
ExtraSamples are present, the appropriate BitsPerSample values for those
samples must also be included

-----Original Message-----
From: image-sig-bounces+bryan.green=acxiom.com at python.org [mailto:image-sig-bounces+bryan.green=acxiom.com at python.org] On Behalf Of Florian Höch
Sent: Wednesday, November 05, 2008 7:25 AM
To: image-sig at python.org
Subject: Re: [Image-SIG] PIL not loading some TIFF files?

Hello,

>> mask.tif loads fine:
>> 
>>>>> image = Image.open("mask.tif")
>>>>>
>> 
>> but store-00000.tif fails:

PIL does not support alpha channels in TIFF files.

Regards,

Florian
_______________________________________________
Image-SIG maillist  -  Image-SIG at python.org
http://mail.python.org/mailman/listinfo/image-sig
***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************



More information about the Image-SIG mailing list