ianare / exif-py

Easy to use Python module to extract Exif metadata from digital image files.
BSD 3-Clause "New" or "Revised" License
831 stars 191 forks source link

Added missing HEIC box names and handling of a TIFF header inside HEIC #173

Open alketola opened 1 year ago

alketola commented 1 year ago

Exifread exceptioned (crashed) when encountering undetected HEIC tags in .heif files produced by my HMD Nokia 8.3 5G mobile phone camera. Digging in to hex, I also found out that in some files, the metadata is missing 'Exif' before TIFF header near the end of file.

My initial solution is to:

The good it that the my .heif files that used to crash don't crash exifread any more. The bad it that at the moment looks like it still extracts less metadata from heic files than jpg files.

I entered this, because I have a project - fotofiler - of making a Python app that copies and sorts files according to metadata, and I'm using exifread there.

alketola commented 1 year ago

Tests did not pass I see, but the errors smells like it's about how the testing sets up it's virtual envionment. ( "Run actions/setup-python@v2 Version 3.5 was not found in the local cache" does not look too much a error of mine. The error seems to appear for a few previous pull requests too.

But of course, I'm always open to work on my code, should there be any concerns. :-)

ianare commented 1 year ago

Thanks for the PR!

Sorry for the late reply (life happens...)

I've rebased origin develop and fixed some conflicts.

I also made some changes/fixes to the PR, mainly for linting issues.

Can you:

Thank you.

alketola commented 1 year ago

Hello,

Sorry, it's been a week before getting back to you. Thank you for accepting my contributions.

For your requests:

Thanks to you, no problem, great to meet someone who values my contributions. :-)

ke 3. toukok. 2023 klo 1.47 ianaré sévi @.***) kirjoitti:

Thanks for the PR!

I made some changes/fixes to the PR.

Can you:

  • make sure I didn't break anything ;-)
  • send me a sample heic file that I can add to the public samples repository?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/ianare/exif-py/pull/173#issuecomment-1532287126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3SM72XSJN2JBBWT33RYR3XEGMJPANCNFSM6AAAAAAUE5UM3Q . You are receiving this because you authored the thread.Message ID: @.***>

alketola commented 1 year ago

I quickly tried my app (https://github.com/alketola/fotofiler) with requirement exifread @ @.*** ... and it seemed to work. I'll let you know about further results later, at least if there are any issues.

Cheers, Antti

to 11. toukok. 2023 klo 0.24 Antti Ketola @.***) kirjoitti:

Hello,

Sorry, it's been a week before getting back to you. Thank you for accepting my contributions.

For your requests:

  • You asked me to rebase? Is it still needed? Sorry it's not too clear to me what exactly to do, but as always, I'll find out... but give me a hint where to look, in order not to waste time ;-)
  • I'll check that everything works with your latest, but it may take some time
  • I have a fork of exif-samples, with some HEIC files. I've put in a pull request, #10. If you wish, I can of course email the files too, or whatever.

Thanks to you, no problem, great to meet someone who values my contributions. :-)

ke 3. toukok. 2023 klo 1.47 ianaré sévi @.***) kirjoitti:

Thanks for the PR!

I made some changes/fixes to the PR.

Can you:

  • make sure I didn't break anything ;-)
  • send me a sample heic file that I can add to the public samples repository?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/ianare/exif-py/pull/173#issuecomment-1532287126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3SM72XSJN2JBBWT33RYR3XEGMJPANCNFSM6AAAAAAUE5UM3Q . You are receiving this because you authored the thread.Message ID: @.***>

ianare commented 1 year ago

Hey, I've done all the rebase stuff, no need to do that on your end anymore.

I've also merged your PR in the samples project but it's failing tests now on this PR.

You can see the test results whenever you push to this branch.

ianare commented 1 year ago

Looks like it's the non HDR image that's not working: HMD_Nokia_8.3_5G.heif.

The HDR image is working, strange...