hMatoba / Piexif

Exif manipulation with pure python script.
MIT License
367 stars 81 forks source link

Possible addition of HEIC file type? #104

Open thatcomputerguy0101 opened 4 years ago

thatcomputerguy0101 commented 4 years ago

I was wondering if it would be able to add HEIC as a supported file type for this library since HEIC files also have embedded EXIF data. I'm not sure if it helps, but here is a js library for reading the data.

TheLastGimbus commented 3 years ago

Hey, @hMatoba, are there any chances this will ever be done?

My script depends on this library, but people want to have .heic support, and I don't know whether to change the library or what...

Dobatymo commented 1 year ago

You can do

# pip install piexif pillow pillow-heif
import piexif
from PIL import Image
from pillow_heif import register_heif_opener

register_heif_opener()

with Image.open(path) as img:
    if "exif" in img.info:
        exif = piexif.load(img.info["exif"])