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
Some PCX files trigger OSError since 8.1.0 #5203
Comments
Hi. Thanks for being detailed in your report. Are we able to add any of those images to our test suite, and distribute them under the Pillow license? |
Sorry for the delay, I had to check with the original author of the images. |
The specification states that 'BytesPerLine' 'MUST be an EVEN number.' I've created PR #5214 to float the idea of reading them anyway. |
It has been pointed to me that the Anyway, even if the idea of reading them anyway seems to look nice, it may be better to just detect odd |
What did you do?
In OpenTTD/nml we use pillow to manipulate images, mainly cropping, but I also tested with
show()
andsave()
.I think it's related to 2f40926
What did you expect to happen?
I expect the images to be loaded as they were with previous (<8.1.0) pillow versions.
What actually happened?
Depending on the used file it fails to load with
OSError: buffer overrun when reading image file
orOSError: image file is truncated (0 bytes not processed)
. But not all images fail to load.What are your OS, Python and Pillow versions?
This is a simple test case with images that used to load fine. One still works, the two others trigger the different
OSError
Images and test code in pillow-test.zip
The text was updated successfully, but these errors were encountered: