You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "convert.py", line 4, in <module>
im.save("test.tiff", format="TIFF")
File "venv\lib\site-packages\PIL\Image.py", line 2300, in save
save_handler(self, fp, filename)
File "venv\lib\site-packages\PIL\TiffImagePlugin.py", line 1810, in _save
e = Image._getencoder(im.mode, "libtiff", a, encoderconfig)
File "venv\lib\site-packages\PIL\Image.py", line 458, in _getencoder
return encoder(mode, *args + extra)
TypeError: argument 3 must be str, not int
Traceback (most recent call last):
File "convert.py", line 4, in <module>
im.save("test.tiff", format="TIFF", compression="tiff_lzw")
File "venv\lib\site-packages\PIL\Image.py", line 2300, in save
save_handler(self, fp, filename)
File "venv\lib\site-packages\PIL\TiffImagePlugin.py", line 1810, in _save
e = Image._getencoder(im.mode, "libtiff", a, encoderconfig)
File "venv\lib\site-packages\PIL\Image.py", line 458, in _getencoder
return encoder(mode, *args + extra)
ValueError: Requiring 768 items for Colormap
OS, Python and Pillow versions:
OS: Windows 10
Python: 3.9 x64
Pillow: 9.1.0
The text was updated successfully, but these errors were encountered:
https://stuff.realpath.org/test.bmp is a very simple BMP image (unfortunately GitHub doesn't allow to attach it here).
First exception
When I try to convert it to a TIFF:
I get the following exception:
However when disabling compression it works:
This seems to be an older issue because I found a StackOverflow question from 2019 mentioning this exact problem: https://stackoverflow.com/q/54181211
Second exception
There also seems to be a regression in 9.1.0 compared to 9.0.1. In 9.0.1 using
tiff_lzw
compression worked without problems:However in 9.1.0 I get the following exception:
OS, Python and Pillow versions:
The text was updated successfully, but these errors were encountered: