LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
197 stars 39 forks source link

Unable to read HEIC file #70

Closed davidwu111 closed 3 years ago

davidwu111 commented 3 years ago

Hi, I'm trying to read EXIF for different types of photos and jpg have no problem at all. But when comes to HEIC it says unknown image type. I did went to exiv2 release notes and v0.27.4 says supported HEIC. Any suggestion? Thanks!

self.img = exiv2api.Image(filename.encode(encoding)) RuntimeError: C:\test11\IMG_0005_20180212133649.heic: The file contains data of an unknown image type

Python: 3.9 pyexiv2: 2.6.0 OS: Win 10

LeoHsiao1 commented 3 years ago

I don't know the HEIC format. I just tried to read it with exiv2 0.27.4 on Windows10, it also failed:

D:\>C:\Users\Leo\Downloads\exiv2-0.27.4-2019msvc64\bin\exiv2.exe C:\Users\Leo\Desktop\sample1.heic
Exiv2 exception in print action for file C:\Users\Leo\Desktop\sample1.heic:
C:\Users\Leo\Desktop\sample1.heic: The file contains data of an unknown image type

The image is downloaded here: https://filesamples.com/formats/heic

I'll look into that over the weekend.

LeoHsiao1 commented 3 years ago

Oh, this feature of Exiv2 is disabled by default: https://github.com/Exiv2/exiv2#219-support-for-bmff-files-cr3-heif-heic-and-avif

davidwu111 commented 3 years ago

Thanks Leo, looks like not much can do here since patent related issue.

LeoHsiao1 commented 3 years ago

Hi, I added this feature in v2.6.2.

github-actions[bot] commented 2 years ago

This issue has been automatically closed because there has been no activity for a month.