drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: HEIF/HEIC/Apple support

billbris opened this issue · comments

1: Love the product. It just worked! Refreshing.
2: I would like to get at the metadata for my HEIC files from iPhone.
3: Using BitmapMetadata in System.Windows.Media.Imaging I am able to open my .JPEG's and .HEIC's and get at the metadata. Your package is much more mature and full-featured. Have you considered the HEIC/Apple problem space? If so, I'm curious as to why it is not included (am I missing something).

It just seems that the HEIC/HEIF format will be doing nothing but growing.

I am curious as to your thoughts.

Also, love the product.

@payton implemented HEIF/HEIC support in the Java version of this library a while ago. It shouldn't be too hard to port that implementation to .NET.

drewnoakes/metadata-extractor#314

@billbris would you like to do this?

Let me take a peek before I commit (no pun intended).

Hi!

First of all, congratulations on this package, it's wonderful!
Any news about HEIF support? I'm developing a software for my blind wife to read the labels of the photos she has taken with her iPHone (and which is saved in XMP within the HEIC files) with an electron application, but I'm seeing that that part hasn't been ported to .Net yet.

If nobody has started to do it, I could try it :)

Thanks in advance for the answer!

@kastwey you're most welcome to port the HEIF/HEIC support from the Java implementation to this library. The contribution would be really appreciated.

Your project sounds really interesting too. I'd like to hear more about it. Will you open source it?

Hi!

Perfect, I already ported all existing heif code (I think) but I've realized that the Exif and XMP support still needs to be implemented, so I'll see if I can add it (although the ISO documentation is crazy).

I'll try to do the PR during the week.

Regarding the project, yes, it will be open source. The initial interface will probably be a disaster (I'm blind too so if something gets out of place or overlaps I'll need help from someone who can see ;) ), but it will be functional :)
As soon as I release the first version, I'll let you know.

Thanks!

Great to hear you've made progress on this already. It'll be a good addition to the library as HEIC gains traction.

My early education was in a school where most of the students were blind or partially sighted. I often wonder what opportunities technology has brought to visually impaired folks, beyond the clunky mechanical Braille typewriters of the early 80's. I'll be happy to help your project however I can.

First of all, the library is great, thanks @drewnoakes and everyone who has contributed to it :)
I see that a couple of people already started working on HEIC/HEIF support. Is there an update on the progress or ETA for merging the changes?

This is a great library, and I would love to help.

I am about 60% of the way to a Heic parser that works so far. I am working on it on my own fork at (https://github.com/DrJohnMelville/metadata-extractor-dotnet) although it looks like I forgot to push my commits to the server, so you cannot see any of my work right now, (I have just about all of the Heic container format done, which requires referencing 4 or 5 differnt places on the internet because its not all written down in one place. Once I get that done I need to map the hierarchical tree of the Heic metadata into onto the tag/value format for metadata-extractor.

Any this has been a really fun project to work on. When I have something that actually works (probably in a week or two) I will try and figure out how to submit a pull request,

Support for HEIF/HEIC has been added in #249 by @DrJohnMelville 🎉

@billbris @kastwey @mzervos would you (or anyone else) test out the code on master against some images please? We don't have many in the test data repo, so some more testing would be great.

I'd like to get this released in 2.4.0 soon.

I tested the code with a bunch of my images (both .heic & .jpeg) and didn't observe any problems - however I was only reading the geotag, no other metadata.
Only thing I noticed is that the code crashes in SequentialStreamReader.GetBytes with a System.IO.IOException: 'End of data reached.' when I use .heic images that were previously geotagged with this method. My gut feeling says that it simply produces an invalid EXIF header. Attached 3 images that were geotagged that way and cannot be read. Interestingly, Windows is able to read the geotag though (right click -> properties -> details).

@tipa thanks for these, I'll check them out now. Are you willing to donate the images to this repo for future regression testing?

I am actually unsure regarding the licenses of the examples above, so I geotagged the heic images already present in the repo:
broken heic.zip

Looks like a bug in the implementation here, rather than the tool that generated the files. Caught because the Exif data was at the end of the file. The fix is on master in 76ea2ca. Please test it out and let me know how you get on.

Awesome, now it works!

Version 2.4.0 is now available with HEIC support. Thanks everyone!

Dear all,
first of all thanks for making this library. it saves a lot of time.
I'm having a question. I'm using it in a xamarin forms project. although it works like a charm, it cannot read gpsdirectory from metadata of a heif image.
although online metadata readers can read it, our library is unable to read. after converting to jpeg image format, it reads fine. any idea?

@dasunmax89 can you please open a new issue and attach an image that contains the data, so that we can investigate on an actual image? Do you have an image you can donate (publicly) to the project for analysis and regression testing?