I have a .png file that passes verify() but fails on load() I expect the error has to do with compression within the IDAT chunk.
>>> from PIL import Image
>>> img = Image.open("test image (800x600).png")
>>> img.verify()
>>> img = Image.open("test image (800x600).png")
>>> img.load()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/ImageFile.py", line 274, in load
raise_oserror(err_code)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/ImageFile.py", line 67, in raise_oserror
raise OSError(message + " when reading image file")
OSError: broken data stream when reading image file
Test image:

Versions:
- OS: macOS 12.2.1
- Python: Python 3.9.5
- Pillow: 8.3.0
I have a .png file that passes
verify()but fails onload()I expect the error has to do with compression within the IDAT chunk.Test image:

Versions: