Skip to content

Error saving TIFF #1227

@radarhere

Description

@radarhere

In case anyone wants to investigate this, I have a TIFF file that can be loaded without a problem, but generates an error when trying to save.

For the record, it was created by the OS X screencapture program 'Grab'.

Since Github doesn't seem to support TIFF attachments, I'll upload it elsewhere - http://s000.tinyupload.com/download.php?file_id=08240275698144503996&t=0824027569814450399610301

>>> from PIL import Image
>>> x = Image.open('sample.tiff')
>>> x.save('test.tiff')
_TIFFVSetField: test.tiff: Bad value 50048 for "SampleFormat" tag.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PIL/Image.py", line 1693, in save
    save_handler(self, fp, filename)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PIL/TiffImagePlugin.py", line 1191, in _save
    e = Image._getencoder(im.mode, 'libtiff', a, im.encoderconfig)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PIL/Image.py", line 434, in _getencoder
    return encoder(mode, *args + extra)
RuntimeError: Error setting from dictionary

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAny unexpected behavior, until confirmed feature.TIFF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions