How can I view .HEIC photos on Linux?

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

12 Answers

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

3

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
6

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.

3

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

.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:

You could convert it to a supported format using ffmpeg:

ffmpeg -i image.heic image.png
6

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

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.

  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
    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
    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
    Copyright: © 1999-2020 ImageMagick Studio LLC
    License:
    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:

2

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

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.

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

1

You Might Also Like