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 viewing HEIC files #2110

Closed
legoktm opened this issue Jul 11, 2024 · 4 comments · Fixed by #2113
Closed

Support viewing HEIC files #2110

legoktm opened this issue Jul 11, 2024 · 4 comments · Fixed by #2113

Comments

@legoktm
Copy link
Member

legoktm commented Jul 11, 2024

Description

HEIC files are commonly generated by Apple devices - see https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format

How will this impact SecureDrop users?

  • SDW users can safely view HEIC files in a sandboxed VM

How would this affect the SecureDrop Workstation threat model?

  • Should only be done inside the sandboxed sd-viewer dispVM, so we should be fine. Regardless, should do a cursory pass over the quality of the HEIC implementation we use

User Stories

  • As a journalist, I want to be able to view HEIC files that sources send me in a safe manner.

Notes

https://superuser.com/questions/1252004/how-can-i-view-heic-photos-on-linux claims that if you install heif-gdk-pixbuf, EOG should automatically support it.

@legoktm
Copy link
Member Author

legoktm commented Jul 15, 2024

claims that if you install heif-gdk-pixbuf, EOG should automatically support it.

Installing this plus adding mime entries for image/heif and image/avif for EOG allowed me to open both example.heic and example.avif from https://github.com/strukturag/libheif/tree/master/examples

@legoktm
Copy link
Member Author

legoktm commented Jul 15, 2024

Need to see if we also can support: image/heif-sequence

And then whether we also need to support the HEIC mime: image/heic, image/heic-sequence

legoktm added a commit that referenced this issue Jul 15, 2024
HEIC uses the HEIF container format, but compressed with the proprietary
HEVC (aka H.265) codec. It is commonly created by iOS devices.

AVIF also uses the HEIF container format, but compresses using the open
AV1 codec.

libheif supports decoding both formats and `heif-gdk-pixbuf` enables
support in the Eye of GNOME viewing application.

Fixes #2110.
@legoktm
Copy link
Member Author

legoktm commented Jul 15, 2024

Need to see if we also can support: image/heif-sequence

Found (copyrighted) test files at https://nokiatech.github.io/heif/examples.html; specifically https://nokiatech.github.io/heif/content/image_sequences/starfield_animation.heic which is image/heif-sequence.

And then whether we also need to support the HEIC mime: image/heic, image/heic-sequence

https://www.iana.org/assignments/media-types/image/heic says:

   heif: High efficiency image file containing one or more image 
      items using any coding format

   heic: High efficiency image file conforming to the requirements 
      for the 'heic', 'heix', 'heim', or 'heis' brand (and hence 
      containing one or more HEVC coded image items). (A brand in the 
      file header identifies a specific profile of a more general 
      format.)

And the codes are explained at strukturag/libheif#83 (comment). I can't find any sample files, but I think adding the heic mime subtype is most likely going to be harmless.

@legoktm
Copy link
Member Author

legoktm commented Jul 16, 2024

libheif doesn't support sequence files yet (strukturag/libheif#57), but EOG does display the first frame. I think that is a better experience than nothing, but there's no indication AFAIS that it is a sequence file and what the user is seeing is incomplete.

I'm also not sure how prevalent sequence files are.

legoktm added a commit that referenced this issue Jul 16, 2024
HEIC uses the HEIF container format, but compressed with the proprietary
HEVC (aka H.265) codec. It is commonly created by iOS devices.

AVIF also uses the HEIF container format, but compresses using the open
AV1 codec.

libheif supports decoding both formats and `heif-gdk-pixbuf` enables
support in the Eye of GNOME viewing application.

Example files for testing can be found at:
* https://github.com/strukturag/libheif/tree/master/examples
* https://nokiatech.github.io/heif/examples.html

Fixes #2110.
@rocodes rocodes added this to the 0.12.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants