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

Better support for HEIC/HEIF files created by iOS #269

Closed
jmunowitch opened this issue Mar 6, 2018 · 7 comments
Closed

Better support for HEIC/HEIF files created by iOS #269

jmunowitch opened this issue Mar 6, 2018 · 7 comments

Comments

@jmunowitch
Copy link

It looks like Elodie is unable to currently process HEIC files coming from modern iPhones.

This seems to be an exiftool issue, which currently has Read Support, but does not currently have write support yet. They are making progress though.

@jmathai
Copy link
Owner

jmathai commented Mar 6, 2018

Thanks for opening this issue. Once exiftool adds support for HEIC files we should update the Readme to say something similar as it says for videos with regard to the minimum version of exiftool needed.

@jeffkruczynski
Copy link

I'm not having any luck getting elodie to recognize & process HEIC files. When I run exiftool on the files, I get a full dump of the exif data, but it's not clear to me from the exiftool history notes whether write support exists. Is elodie currently still unable to read and categorize HEIC files?

@okeefedaniel
Copy link

One suggestion - perhaps have elodie mark HEIC files as an error? Right now, it appears to just be taking no action on that file type (success=0, errors=0). In my case Elodie is called by a Hazel rule, so in the absence of an error I had no idea those files weren't being successfully processed.

@TonyWhitley
Copy link

(As a Windows user I'd never heard of Hazel "Automated Organization for Your Mac".)

@jmathai
Copy link
Owner

jmathai commented Jul 10, 2019

Unfortunately there's no good support for detecting HEIC files in imghdr or Pillow.

Instead, for now, I've created #320 to special case HEIC by extension.

jmathai added a commit that referenced this issue Jul 10, 2019
…nd add HEIC support (#320)

Fixes #281 and #269

When elodie imports images, imghdr.what is used to determine the image
type. imghdr implementation won't support all JPEG variants. Because
of this, even for a valid JPEG file, imghdr.what returns None causing
elodie to skip the image during import.

This commit adds a fallback mechanism which uses PIL(pillow) library to
identify image formats. When imghdr fails, elodie uses pillow to
identify image format. When pillow is unavailable, it will be treated as
an invalid media file. Pillow is imported only when imghdr fails.
jmathai added a commit that referenced this issue Jul 10, 2019
…nd add HEIC support (#320)

Fixes #281 and #269

When elodie imports images, imghdr.what is used to determine the image
type. imghdr implementation won't support all JPEG variants. Because
of this, even for a valid JPEG file, imghdr.what returns None causing
elodie to skip the image during import.

This commit adds a fallback mechanism which uses PIL(pillow) library to
identify image formats. When imghdr fails, elodie uses pillow to
identify image format. When pillow is unavailable, it will be treated as
an invalid media file. Pillow is imported only when imghdr fails.
jmathai added a commit that referenced this issue Jul 10, 2019
…nd add HEIC support (#320)

Fixes #281 and #269

When elodie imports images, imghdr.what is used to determine the image
type. imghdr implementation won't support all JPEG variants. Because
of this, even for a valid JPEG file, imghdr.what returns None causing
elodie to skip the image during import.

This commit adds a fallback mechanism which uses PIL(pillow) library to
identify image formats. When imghdr fails, elodie uses pillow to
identify image format. When pillow is unavailable, it will be treated as
an invalid media file. Pillow is imported only when imghdr fails.
@jmathai
Copy link
Owner

jmathai commented Jul 11, 2019

Marking this as closed as HEIC support is now available in master.

@jmathai jmathai closed this as completed Jul 11, 2019
jmathai added a commit that referenced this issue Jul 11, 2019
…nd add HEIC support (#320)

Fixes #281 and #269

When elodie imports images, imghdr.what is used to determine the image
type. imghdr implementation won't support all JPEG variants. Because
of this, even for a valid JPEG file, imghdr.what returns None causing
elodie to skip the image during import.

This commit adds a fallback mechanism which uses PIL(pillow) library to
identify image formats. When imghdr fails, elodie uses pillow to
identify image format. When pillow is unavailable, it will be treated as
an invalid media file. Pillow is imported only when imghdr fails.
@jmathai
Copy link
Owner

jmathai commented Jul 12, 2019

HEIC support requires exiftool version 11.50 or higher. Hope that helps anyone wondering why it's not working :). This is included in the documentation but can be easy to miss (especially if you do a git pull and expect everything to work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants