Dealing with Apple Branded HEIF .HEIC files on Linux
Some of the coding tricks in H.265 have been incorporated into MPEG-H coding, an ISO standard introduced in 2017, which yields a roughly 2:1 coding efficiency gain over the venerable JPEG, which was introduced in 1992. Remember that? I do; I’m old. I remember having a hardware NUBUS JPEG decoder card. One of the reasons JPEG has lasted so long is that images have become a small storage burden (compared to 4k video, say) and that changing format standards is extremely annoying to everyone.
Apple has elected to make every rational person’s life difficult and put a little barbed wire around their high-fashion walled garden and do something a little special with their brand of a HEVC (h.265) profile for images. Now normally seeing iOS user’s insta images of how fashionable they are isn’t really worth the effort, but now and then a useful correspondent joins the cult and forks over a ton of money to show off a logo and starts sending you stuff in their special proprietary format. Annoying, but fixable.
Assuming you’re using an OS that is neither primarily spyware nor fashion forward, such as Linux Mint, you can install HEIF decode (including Apple Brand HEIC) with a few simple commands:
$ sudo add-apt-repository ppa:jakar/qt-heif $ sudo apt update $ sudo apt install qt-heif-image-plugin
Once installed, various image viewers should be able to decode the images. I rather like nomacs as a fairly tolerable replacement for Irfan Skiljan‘s still awesome irfanview.
Update: 2022-09-22
Jammy isn’t supported by the jakar PPA, but there are a few other options:
Easy, from Hritik Chaudhary in this post,
sudo apt install heif-gdk-pixbuf
should give gdk access, but not (it seems) qt. You can use gpicview as an imageviewer with this library.
sudo apt install gpicview
Or build the qt-heic-image-plugin from source:
git clone --depth 1 https://github.com/novomesk/qt-heic-image-plugin.git cd qt-heic-image-plugin mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make sudo make install
This machine required ECM from extra cmake modules, which I hadn’t previously installed.
sudo apt install extra-cmake-modules
to successfully cmake.
Update: 2023-01-18
A few updates, as is the way these days with built-from-git software,
cd qt-heic-image-plugin git pull sudo rm -r build mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make sudo make install
Get the C API version of libheif instead of C++ and an error handling fix.
-
Recent Posts
- Get a desktop alert when Thunderbird gets constipated 2023 May 29
- The end of a comic era 2023 May 14
- WordPress forward and back navigation I find pleasing 2023 May 07
- عيد مبارك 2023 April 22
- Technology: maximizing individual radius of lethality. 2023 February 05
- Sidebar featured images only on single post pages 2023 January 24
- LastPass: The Cloud is Public and Ephemeral 2023 January 05
- Some gnuplot and datamash adventures 2022 December 29
- Smol bash script for finding oversize media files 2022 September 02
- Deep Learning Image Compression: nearly 10,000:1 compression ratio! 2022 June 28
- Categories
- Links
- Search
- Archives
- Post History
August 2020 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31