I wrote a pure python TIFF G4 decompress for use with tifffile.py
. I know there are ways to add libtiff
to a custom PIL, but I never could get that wor
It appears that TiffImagePlugin
does not easily allow me to hook in additional decompressors. Replacing TiffImageFile._decoder
with a dictionary of decoders might work, but you would have to examine and test each release of PIL to ensure it hasn't broken. This level of maintenance is just as bad as a custom PIL. I appreciate the design of tifffile.py
for using a dictionary of decoders. It made it very easy.
Final solution? I couldn't hook my code into PIL. I had to use PIL.Image.fromarray()
to using my decompressed images.