-
-
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
Saving TIFF as JPEG fails with OSError: encoder error -2 #6932
Comments
I find that if you add in del exif[TiffImagePlugin.ICCPROFILE] the error disappears. |
@radarhere Is this something that is to be expected or is there actually a bug here? |
Without that workaround, the EXIF data you're trying to save is 417170 bytes long. https://en.wikipedia.org/wiki/Exif
So it is a restriction of the JPEG format. |
Thanks for the explanation. Would it be possible to catch this case and display an error stating that this limitation has been hit? |
I've created PR #6939 to do so. |
Downgrade to 10.0.1 helped me |
What did you do?
Tried to convert TIFF to JPEG.
What did you expect to happen?
Converted image saved successfully.
What actually happened?
What are your OS, Python and Pillow versions?
Link to image
The text was updated successfully, but these errors were encountered: