freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
40 stars 38 forks source link

Support viewing HEIC files #2110

Closed legoktm closed 1 month ago

legoktm commented 1 month ago

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?

How would this affect the SecureDrop Workstation threat model?

User Stories

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 https://github.com/strukturag/libheif/issues/83#issuecomment-421427091. I can't find any sample files, but I think adding the heic mime subtype is most likely going to be harmless.

legoktm commented 1 month ago

libheif doesn't support sequence files yet (https://github.com/strukturag/libheif/issues/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.