72

How can I view .HEIC photos (the new default format on iOS 11) on a Linux desktop, without uploading them to some cloud service? Is there an image viewer, image converter, or browser with support for .HEIC, either released or not-yet-released?

1

13 Answers 13

19

For local conversion, this worked for me in Debian. Just downloaded the static build, ran the example conversion command, everything worked:

https://github.com/monostream/tifig

3
  • Yes, 0.2.0 runs on Ubuntu 18. github.com/monostream/tifig/releases/download/0.2.0/… Jan 17, 2021 at 18:44
  • v0.2.2 works great as a static download on Ubuntu 20.04 as wel May 19, 2021 at 16:33
  • 1
    At the time of writing, this no longer works with photos from newer iOS versions. You will get the error message: "Grid configuration not found! tifig currently only supports .heic images created on iOS 11 devices."
    – Walf
    Jun 11, 2021 at 2:44
48

On Ubuntu (Debian distro) the easiest way is probably to run:

sudo apt install heif-gdk-pixbuf

For Fedora and other RPM-based distros use:

sudo dnf install libheif

After this, e.g. Eye of Gnome eog image.heic will display your image.

11
  • 4
    This is the better and less setup required. After installed "heif-gdk-pixbuf" you can open the heic files directly, if not, just right click the heic file and "Open in Another Application" --> Image Viewer
    – Franva
    Nov 21, 2021 at 11:48
  • 1
    Yeah this is newer but now clearly the correct answer.
    – Nick S
    Dec 2, 2021 at 21:04
  • Doesn't work for me on Ubuntu 20. I just get a white panel. Mar 27, 2022 at 22:43
  • After this Fedoras bundled "Image Viewer" could pull them up for me - thanks! Aug 8, 2022 at 20:44
  • 2
    On Fedora 38 I had to install heif-pixbuf-loader as well May 23 at 6:51
26

to convert a heic image to be able to view it as usual,

sudo apt-get install libheif-examples

then convert image to jpg:

heif-convert input.heic output.jpg

then view the image using any image viewer - here's an example:

ristretto  output.jpg
7
  • 3
    The heif-convert step worked. Not sure what 'ristretto' is? Aug 25, 2021 at 14:21
  • @Ellipticalview Ristretto Image Viewer
    – Darren Ng
    Sep 1, 2021 at 13:07
  • 1
    @FrancescoPotortì the answer is now updated to explicitly state that any image viewer would work; I used ristretto as an example because it was already installed
    – jmarina
    Feb 4, 2022 at 11:43
  • 4
    For all files in directory: for i in *.HEIC; do heif-convert "$i" "$i.jpg"; done
    – fracz
    Mar 7, 2022 at 12:01
  • 1
    Like @fracz but without the "file.HEIC.jpg" double extension: for i in *.HEIC; do heif-convert "$i" "${i%.HEIC}.jpg"; done
    – qneill
    Apr 22, 2022 at 19:04
8

For the record, ImageMagick supports it. Somehow magick display image.heic gave me weird results, but converting was fine:

magick convert image.heic image.jpg
1
  • 2
    On Debian 10.3 I have to use convert-im6.q16 rather than magick. (From 'imagemagick' package v 8:6.9.10.23+..). (Also GIMP opens them, but it's more awkward and much more slow.) Thanks! Apr 19, 2020 at 0:10
7

.heic may be the file name extension, but the format is more commonly known as HEIF, the High Efficiency Image File format. There’s an open source implementation from Nokia here: http://nokiatech.github.io/heif/

4

You could convert it to a supported format using ffmpeg:

ffmpeg -i image.heic image.png
7
  • Apparently ffmpeg does not yet support HEIF?
    – jchook
    Feb 13, 2021 at 23:16
  • Just took a photo on an iPhone and ran the .heic file through ffmpeg with the above command. Converted to png without any problems. Not sure why the people in that post are having issues. Feb 17, 2021 at 3:53
  • Not working for me. I'm seeing: $ ffmpeg -i IMG_9256.heic IMG_9256.png ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdi Aug 25, 2021 at 14:08
  • 2
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a711614740] moov atom not found IMG_9256.heic: Invalid data found when processing input Aug 25, 2021 at 14:10
  • 2
    I am also getting "moov atom not found" with FFmpeg 4.4.2 on Ubuntu 22.04
    – Derkades
    Jul 30, 2022 at 15:55
2

GIMP 2.10.8 installs the library libheif1 to open HEIC images, other linux programs can be expected to follow soon.

2

Just in case any openSUSE user finds this.

Add the Packman repo and then:

# zypper in libheif1 gdk-pixbuf-loader-libheif gimp-plugin-heif

After that, I was able to open .HEIC photos using GIMP.

2
  1. Remove previous version of ImageMagick:

    sudo apt-get remove imagemagick
    
  2. Install base dependencies:

    sudo apt-get install build-essential checkinstall 
    sudo apt-get install libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev
    sudo apt-get install libwebp-dev libde265-dev
    
  3. Install library for reading HEIF/HEIC files (this step is essential):

    cd /usr/src/
    sudo wget https://github.com/strukturag/libheif/archive/v1.3.2.tar.gz
    sudo tar -xvf v1.3.2.tar.gz
    sudo rm v1.3.2.tar.gz
    cd libheif-1.3.2/
    sudo ./autogen.sh
    sudo ./configure
    sudo make
    sudo make install
    
  4. Install ImageMagick with WEBP and HEIC support:

    cd /usr/src/
    sudo wget http://www.imagemagick.org/download/ImageMagick.tar.gz
    sudo tar xvzf ImageMagick.tar.gz
    sudo rm ImageMagick.tar.gz
    cd ImageMagick-7.0.10-31/
    sudo ./configure --with-heic=yes --with-webp=yes
    sudo make
    sudo make install
    sudo ldconfig /usr/local/lib
    sudo make check
    
  5. Check version:

    convert --version
    ...
    Version: ImageMagick 7.0.10-31 Q16 x86_64 2020-10-03 https://imagemagick.org
    Copyright: © 1999-2020 ImageMagick Studio LLC
    License: https://imagemagick.org/script/license.php
    Features: Cipher DPC HDRI OpenMP(4.0) 
    Delegates (built-in): bzlib fontconfig freetype heic jbig jng jpeg lcms lzma openexr pangocairo png tiff webp wmf x xml zlib
    
  6. As you see 'heic' is in the delegates list.

  7. To convert single file from HEIC into JPG:

    convert IMG_3288.HEIC IMG_3288.jpg
    
  8. To convert all HEIC-files in current directory into JPEG:

    ls *.HEIC -1 | sed -e 's/\.HEIC$//' | xargs -I {} convert {}.HEIC {}.jpeg
    

Usefull links:

https://medium.com/@sanjaywrites/install-latest-version-of-imagemagick-in-ubuntu-16-04-c406ddea1973 https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd

4
  • 1
    for img in *{heic,HEIC}; do convert "${img}"{,.jpg}; done (Not sure how portable it is though, and it does just append the JPEG extension at the end - although I like converting like that as it gives a sense of "format history".)
    – toraritte
    Jul 25, 2021 at 12:29
  • I woud refrain from installing archives from an unknown GitHub repo - can contain anything. Mar 11, 2022 at 12:55
  • Both HEIC and JPEG formats are lossy, which means quality losses, when converting from HEIC to JPEG, hence, I don't think, that this approach is right overall! Jun 13 at 12:55
  • sudo snap install regardsviewer works for me, unfortunately, I can't write the answer due to not enough reputation rate. Jun 13 at 12:59
1

I realize this is a little old but since these posts I've found a Gimp plugin and even a QT plugin for KDE support. Hope these help someone in the future.

sudo dnf install gimp-heif-plugin qt-heif-image-plugin
1
  • 1
    sudo snap install regardsviewer supports HEIC. IMHO, it's better to find one dedicated image viewer for this naughty image format, than try to install plugins, as in my case such packages are not even present! Jun 13 at 13:04
1

Debian:

apt install viewnior heif-gdk-pixbuf
viewnior file.heic

or

apt install gpicview heif-gdk-pixbuf
gpicview file.heic
0

I'm on Fedora 33 and I'm unable to edit a .HEIC image using neither convert (ImageMagick 6.9.11.27), ffmpeg 4.3.3, GIMP 2.10.24, nor Inkscape 1.0.2.

The only app that does the job for me is Shutter 0.99.1.

0

As mentioned above, you need libheif in fc33. dnf install libheif and eog

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 19, 2021 at 7:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .