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

Support HIF extension #3813

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Conversation

AdamMainsTL
Copy link
Contributor

Description

I've come across some unsupported files from Canon cameras that have a .hif extension. These are HEIC/HEIF files with a slightly changed extension. I have no idea why Canon decided to do this. Without any changes I am able to open the images, probably because it checks the header, but I am unable to write to paths with a hif extension.

Some random articles/forum posts mentioning the HIF format in relation to Canon cameras:
https://www.cameralabs.com/jpeg-vs-heif-canon-hif-comparison/
https://www.dpreview.com/forums/thread/4558661
https://www.reddit.com/r/canon/comments/kjc6xl/new_eos_r6_owner_here_photo_files_show_up_as_hif/

Tests

I did not add tests to the project, but I did compile the library into our application on Windows and Mac environments and verified that the old version does not support writing to paths with a "hif" extension and the updated code does. Can provide more info if needed.

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

@lgritz
Copy link
Collaborator

lgritz commented Apr 21, 2023

I assume that the HIF is a concession to flash memory cards with FAT filesystem that require an 8.3 filename scheme.

Looks reasonable to me. Please accept the format fix suggestion and then I'll be happy to merge.

Co-authored-by: Larry Gritz <lg@larrygritz.com>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lgritz lgritz merged commit bd4bbaf into AcademySoftwareFoundation:master Apr 24, 2023
20 checks passed
@AdamMainsTL AdamMainsTL deleted the support-hif branch April 24, 2023 20:05
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Apr 25, 2023
I've come across some unsupported files from Canon cameras that have a
.hif extension. These are HEIC/HEIF files with a slightly changed
extension. I have no idea why Canon decided to do this. Without any
changes I am able to open the images, probably because it checks the
header, but I am unable to write to paths with a hif extension.

Some random articles/forum posts mentioning the HIF format in relation
to Canon cameras:
https://www.cameralabs.com/jpeg-vs-heif-canon-hif-comparison/
https://www.dpreview.com/forums/thread/4558661

https://www.reddit.com/r/canon/comments/kjc6xl/new_eos_r6_owner_here_photo_files_show_up_as_hif/
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

Successfully merging this pull request may close these issues.

None yet

2 participants