-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
What did you do?
Tried to open an image from a Samsung device with malformed exif data. I can't control how the device will take pictures. I can open the image successfully in Paintbrush and other image manipulation tools, but not in Apple preview.
What did you expect to happen?
To ignore the segment and let me work with them pixels please.
What actually happened?
Traceback (most recent call last):
File "/Users/deepio/Desktop/ape.py", line 7, in <module>
image = Image.open(file)
File "/Users/deepio/.pyenv/versions/3.10.4/lib/python3.10/site-packages/PIL/Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file 'bad_file.jpg'
What are your OS, Python and Pillow versions?
- OS: ubuntu
22.04and MacOS - Python:
3.10.4,3.9, ... - Pillow:
10.0.1
from PIL import Image
file = "bad_file.jpg"
image = Image.open(file)I tested to make sure that the scrubbed image still created the same issue and it does (bad_file2.jpg). I zipped the image just in-case github does some image manipulation on uploaded files, bad_file2.jpg is the same image with all white pixels and with the weird APP1 segment added.