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

Feature Request: HEIF/HEIC/Apple support #231

Closed
billbris opened this issue Nov 6, 2019 · 18 comments
Closed

Feature Request: HEIF/HEIC/Apple support #231

billbris opened this issue Nov 6, 2019 · 18 comments
Labels
format-heif help wanted image-queue Actionable issue with sample image

Comments

@billbris
Copy link

billbris commented Nov 6, 2019

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.

@drewnoakes
Copy link
Owner

@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?

@drewnoakes drewnoakes added help wanted image-queue Actionable issue with sample image labels Nov 7, 2019
@billbris
Copy link
Author

billbris commented Nov 7, 2019

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

VictorLoktev pushed a commit to VictorLoktev/metadata-extractor-dotnet that referenced this issue Dec 3, 2019
VictorLoktev pushed a commit to VictorLoktev/metadata-extractor-dotnet that referenced this issue Dec 3, 2019
Port of Java drewnoakes#231: Implement Huffman Tables directory and reader
@kastwey
Copy link

kastwey commented Jan 11, 2020

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!

@drewnoakes
Copy link
Owner

@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?

@kastwey
Copy link

kastwey commented Jan 13, 2020

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!

@drewnoakes
Copy link
Owner

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.

@kastwey
Copy link

kastwey commented Jan 13, 2020 via email

@mzervos
Copy link

mzervos commented Feb 9, 2020

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?

@DrJohnMelville
Copy link
Contributor

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,

@drewnoakes
Copy link
Owner

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.

@tipa
Copy link

tipa commented May 5, 2020

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).

@drewnoakes
Copy link
Owner

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

@tipa
Copy link

tipa commented May 5, 2020

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

@drewnoakes
Copy link
Owner

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.

@tipa
Copy link

tipa commented May 5, 2020

Awesome, now it works!

@drewnoakes
Copy link
Owner

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

@dasunmax89
Copy link

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?

@drewnoakes
Copy link
Owner

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format-heif help wanted image-queue Actionable issue with sample image
Projects
None yet
Development

No branches or pull requests

7 participants