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

Assertion error when reading from HEIC file rotated by the Windows Photos app #139

Open
heckler opened this issue Jan 24, 2021 · 0 comments

Comments

@heckler
Copy link

heckler commented Jan 24, 2021

I've noticed that if I have a .heic image (from an iPhone XR) and rotate it on the Photos app from Windows 10, I get an assertion error calling exifread.process_file()

The assertion which fails is this one on line 284 of heic.py:

assert exif_tiff_header_offset >= 6

Additional information

  • Windows 10 build 19041
  • HEVC Video Extensions from MS Store
  • HEIF Image Extensions from MS Store
  • WSL2 running Ubuntu 20.04 LTS
  • Python version 3.8.5
  • exif-py version 2.3.2

Steps to reproduce

  1. Download a HEIC image file from an iPhone (not tested with other sources)
  2. Open the image with exif-py, notice it woks file, all tags are readable
  3. Double-click the image file to open on the default Photos app (requires HEIF Image Extensions, from MS Store)
    4.. Rotate the image and close to save
  4. Attempt to open the rotated image with exif-py, notice assertion error

Sample file(s)

If it helps I can attach a sample file to this issue; I avoided it because we're taking about a largish 2-3MB binary file. Let me know if you want it attached to help troubleshoot.

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

1 participant