I am running a script to extract the EXIF data from a list of images in a folder that are imported from an iPhone using Python's pillow
:
from PIL import Image
image = Image.open(path)
But before anything, some of the pictures need to be converted from iOS' format .HEIC
to .jpg
. I successfully managed to do so but when I try to open the image that was converted I get the following:
PIL.UnidentifiedImageError: cannot identify image file '.../pictures/IMG_4294.jpg'
See this image comparing the info of two files. The one on the left was converted from .HEIC
to .jpg
and doesn't work. The one on the right is originally a .jpg
and works just fine.
Any thoughts on how I can solve this?