-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOError: cannot identify image file '/path/to/Sample.tiff' with unknown Exif Tag #3372
Comments
I have found https://upload.wikimedia.org/wikipedia/commons/f/f2/Yug-Shadedrelief.tmp.tif which
That loads with error in Pillow. So ‘Unknown field with tag’ is not the cause of the issue. I can also tell you that with https://github.com/python-pillow/Pillow/blob/master/Tests/images/g4-multi.tiff?raw=true,
So that looks similar to your image, and that loads fine. It looks like more information is needed. I don’t suppose you could find other images from the same source, with the same error, that are able to be shared publicly? Could you run |
I will investigate more on Monday since I also couldn't reproduce this Pillow issue on my Mac machine with the tiff and same mogrify operation. Even though on the legacy code on Debian 6.0, mogrify -strip solves the problem, so it may be related to EXIF information somehow but it is unclear which field stripped may have caused the issue. I wonder if Pillow depends on libtiff for the tiff operations, maybe there was some bug in older libtiff. It is definitely odd because other images also had this " Unknown field with tag " issue and worked. Here's the original tiff's identify -verbose using
|
The image with Debian imagemagick_8%3a6.6.0.4-3+squeeze3_amd64.deb(v 6.6.0.4-3) that bugs Pillow:
Good image generated by ImageMagick 6.9.10-12 Q16 x86_64 2018-09-25 https://imagemagick.org
|
The custom properties in the bug.tiff seems to be |
Okay, to get a better look at this, would you mind making this change to your copy of Pillow, and letting us know what error is raised then? You can also download this from https://github.com/radarhere/Pillow/tree/tiff_test if you want, with the commit radarhere@940b002 |
Closing due to lack of response. Feel free to comment again and this can be re-opened. |
What did you do?
I try to
Image.open(tiff_path)
on a 8-bit tiff image and got an error.What did you expect to happen?
Image.open() is supposed to work on a 8-bit tiff image.
What actually happened?
Error from Pillow
What are your OS, Python and Pillow versions?
The images are not public so I can't share them. But here are some imagemagick
identify
that may help.Image that caused the error
Original image:
Processed image(resized without -strip)
TIFF 6669x6812 6669x6812+0+0 8-bit DirectClass 3.738MB 0.000u 0:00.000
A working image:
TIFF 5945x7399 5945x7399+0+0 8-bit DirectClass 4.952MB 0.000u 0:00.000
If there is any way to fix this image for Pillow loading, it would help as well.
Should unknown field with tag cause Pillow tiff loading issue?
The text was updated successfully, but these errors were encountered: