Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible addition of HEIC file type? #104

Open
thatcomputerguy0101 opened this issue Jul 25, 2020 · 2 comments
Open

Possible addition of HEIC file type? #104

thatcomputerguy0101 opened this issue Jul 25, 2020 · 2 comments

Comments

@thatcomputerguy0101
Copy link

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
Copy link

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
Copy link

Dobatymo commented Jun 30, 2023

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"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants