[Image-SIG] TIFF photometric imterpretation

D. Alan Stewart Alan Stewart <astewart@layton-graphics.com>
Fri, 18 Jan 2002 15:56:48 -0500

I've had to perform a simple fix on TiffImagePlugin.py at my site: I supplied a 
default value for the PHOTOMETRIC_INTERPRETATION tag.

#       photo = self.tag.getscalar(PHOTOMETRIC_INTERPRETATION)
#       The Aldus TIFF specification says that a photometric intepretation tag
#       is required, but still some TIFF files do not have it! Supplying a
#       default, even though the TIFF specification does not assign one, allows
#       opening slightly illegal TIFF images. - DAS 2001-12-19

        photo = self.tag.getscalar(PHOTOMETRIC_INTERPRETATION, 0)

I'm using PIL 1.1.2.

D. Alan Stewart
Layton Graphics, Inc.
155 Woolco Dr.
Marietta, GA 30062
Voice: 770/973-4312
Fax: 800/367-8192
FTP: ftp.layton-graphics.com
WWW: www.layton-graphics.com

"As far as the laws of mathematics refer to reality, they
are not certain; and as far as they are certain, they do
not refer to reality." - Albert Einstein