PIL 1.0 bugs? (TIFF, Image)

Robert soundhack at hotmail.com
Wed Jan 12 07:06:31 EST 2000


Am I doing something wrong? I tried to read and display a simple TIFF file
and came across two errors that I had to hack/go around to get it to work.

>import Image
>im=Image.open("test.tif")
Here there is a ValueError exception in the getscalar method in
TIFFImagePlugin.py

looking at the code, apparently the plugin assumes that the SOURCEFORMAT tag
is a scalar, which is true when the image is grayscale, but isnt for RGB
images (as per the TIFF specfication)

after removing the test for "scalar"ity, I then ran into a problem when I
tried
>im.show()

again looking at the traceback, there was a problem in the _getdecoder and
_getencoder "codec factories", specifically an apply call.
Again, I did an ugly hack to get it to work and now it works as expected.

This is all very basic stuff, (so much that I'm surprised it wasnt
caught and fixed before), so i would appreciate anyone telling me if I'm
missing something simple here.

Robert






More information about the Python-list mailing list