-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
"OSError: -9" saving a multi-layer TIFF via libtiff #5319
Comments
Ok, so you're trying to iterate through the frames of a TIFF file and save those frames individually, right? Could we get a copy of the starting image? |
@radarhere Please wait. It's a fax with sensitive information in it. |
@radarhere I replied late. It's works on under 5.4.1. |
@radarhere Did you check by any chance? |
I can reproduce the problem with just from PIL import Image
with Image.open('pando.tif') as im:
im.save('out.tif') Debugging, I find that it is failing at Pillow/src/libImaging/TiffDecode.c Lines 339 to 343 in 759c518
Pillow has determined https://www.awaresystems.be/imaging/tiff/tifftags/rowsperstrip.html
So our logic is flagging it as a security problem, but looks like a valid, if uncommon, value. I don't suppose that you are willing for your image to be included as a test image in the Pillow suite, and distributed under the Pillow license? |
@radarhere Yes, you can. Thank you for the solution. |
This has been resolved instead by #5364. The fix should be a part of 8.2.0 when it is released on April 1. |
What did you do?
I did a version up. (5.2.0 -> 6.2.0)
It was the same at 8.1.2.
This is similar to this issue.
https://stackoverflow.com/questions/64683811/how-to-debug-oserror-9-saving-a-tiff-via-libtiff-and-pillow
What did you expect to happen?
I thought dividing the multi-layer TIFF files would work the same way.
What actually happened?
raise Error
OSError -9
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: