-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.TIFF
Description
For some TIFF images, a simple Image.open(path).save(path) fails with the following:
_TIFFVSetField: /path/to/test.tiff: Bad value 2 for "ExtraSamples" tag.
Traceback (most recent call last):
<elided traceback>
File "/usr/lib/python3.4/site-packages/PIL/Image.py", line 1685, in save
save_handler(self, fp, filename)
File "/usr/lib/python3.4/site-packages/PIL/TiffImagePlugin.py", line 1185, in _save
e = Image._getencoder(im.mode, 'libtiff', a, im.encoderconfig)
File "/usr/lib/python3.4/site-packages/PIL/Image.py", line 430, in _getencoder
return encoder(mode, *args + extra)
RuntimeError: Error setting from dictionary
The image was created using Qt's QImageWriter (from a QImage.Format_RBG32 image), but it is not clear how to reproduce the issue as a simple blank image created in the same way does not trigger the same issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.TIFF