What did you do?
Open an image and get its width
What did you expect to happen?
width printed
What actually happened?
come into exception:
OSError: Truncated File Read
in convert
What are your OS, Python and Pillow versions?
- OS: archlinux(5.16.12-arch1-1)
- Python: 3.10
- Pillow: 9.0.1
from PIL import Image
fn = '142fc7b8018343d43101dae4900c99a4c0de558e33f6da2d029320633aa01193'
with Image.open(fn) as fo:
img = fo.convert('RGB')
print(img.width)
the image:
142fc7b8018343d43101dae4900c99a4c0de558e33f6da2d029320633aa01193.zip
it can be viewed in Browser and image viewer but failed in pillow.