Using TIFF G4 Image in PIL

I wrote pure python TIFF G4 for unpacking for use with tifffile.py . I know there are ways to add libtiff to a custom PIL, but I could never work so well in mixed virtualenv. I want to manipulate the image in PIL. I am looking for pointers to connect my decompressor to the PIL stock for TiffImagePlugin.py .

Any ideas?

+1
source share
1 answer

It seems that TiffImagePlugin does not allow me to connect additional decompressors. Replacing TiffImageFile._decoder with a decoder dictionary may work, but you will need to examine and test each version of PIL to make sure that it does not break. This level of service is just as bad as a custom PIL. I appreciate the design of tifffile.py for using the dictionary of decoders. This made it very easy.

The final decision? I could not connect my code to PIL. I had to use PIL.Image.fromarray() to use my unpacked images.

0
source

All Articles