75

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?

2

15 Answers 15

20

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/… Commented Jan 17, 2021 at 18:44
  • v0.2.2 works great as a static download on Ubuntu 20.04 as wel Commented 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
    Commented Jun 11, 2021 at 2:44
55

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.

13
  • 5
    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
    Commented Nov 21, 2021 at 11:48
  • 1
    Yeah this is newer but now clearly the correct answer.
    – Nick S
    Commented Dec 2, 2021 at 21:04
  • Doesn't work for me on Ubuntu 20. I just get a white panel. Commented Mar 27, 2022 at 22:43
  • After this Fedoras bundled "Image Viewer" could pull them up for me - thanks! Commented Aug 8, 2022 at 20:44
  • 2
    On Fedora 38 I had to install heif-pixbuf-loader as well Commented May 23, 2023 at 6:51
27

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? Commented Aug 25, 2021 at 14:21
  • @Ellipticalview Ristretto Image Viewer
    – user744579
    Commented 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
    Commented Feb 4, 2022 at 11:43
  • 4
    For all files in directory: for i in *.HEIC; do heif-convert "$i" "$i.jpg"; done
    – fracz
    Commented 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
    Commented 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! Commented 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
    Commented 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. Commented 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 Commented 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 Commented Aug 25, 2021 at 14:10
  • 3
    I am also getting "moov atom not found" with FFmpeg 4.4.2 on Ubuntu 22.04
    – Derkades
    Commented Jul 30, 2022 at 15:55
3
  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
    Commented Jul 25, 2021 at 12:29
  • I woud refrain from installing archives from an unknown GitHub repo - can contain anything. Commented 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! Commented Jun 13, 2023 at 12:55
  • sudo snap install regardsviewer works for me, unfortunately, I can't write the answer due to not enough reputation rate. Commented Jun 13, 2023 at 12:59
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

Debian:

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

or

apt install gpicview heif-gdk-pixbuf
gpicview file.heic
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! Commented Jun 13, 2023 at 13:04
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
    Commented Dec 19, 2021 at 7:36
0

For support on Gwenview (default KDE image viewer) install the optional dependencies:

kimageformats libheif

0

Viewing .HEIC, .WebP, and .AVIF photos on Linux

Option 1 (preferred): Shotwell v0.32.0 or later now works to view .HEIC, .Webp, and .AVIF images!

Install (via Flatpak) and use the latest version of Shotwell

...and import and view photos, including .HEIC images:

Tested in Ubuntu 22.04.

# Remove any old version of Shotwell if you previously installed it via `apt`.
# WARNING: I think this will *not* keep your old Shotwell settings and library. 
# So do *not* run this if you don't want to re-import your photos.
# I do not yet know how to move your old Shotwell settings and library to 
# the new version.
sudo apt remove shotwell

# Update the apt package list
sudo apt update

# Install flatpak and the gnome software plugin
# See: https://flathub.org/setup/Ubuntu
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# restart your OS to complete installation
reboot

# Install the latest released version of Shotwell via Flatpak
flatpak install flathub org.gnome.Shotwell

Double-clicking an .heic file in your file manager can now open it up in the Shotwell photo viewer directly!

Going further: viewing photos in Shotwell (on a computer) similar to viewing photos on a tablet or iPad

  1. Open Shotwell Now you can open Shotwell by pressing Windows and typing "Shotwell" and pressing Enter. Going to "Help" --> "About" will show that you have at least version 0.32.6 or later, as of 12 Apr. 2024.

  2. Import your photos, including .HEIC images

    File --> "Import From Folder..." --> choose a folder of photos (including .HEIC images) --> "OK" --> choose to either "Copy Photos" or "Import in Place" (my preference). All photos will be imported from that folder.

  3. View your photos

    To view all of these photos, click on "Folders" in the left-hand pane, then navigate to the folder you imported and select it. All photos from that folder will be shown in the main viewing window.

    Double-click a photo, or single click it and press Enter, to view it in full-screen mode.

    Double-click on it again, or press Esc or Enter, to return to the main viewing window which shows a ton of photos at once.

    You can now view all of the photos in that folder, including .HEIC images.

  4. Change sort order

    To change view sort order, click "View" --> "Sort Photos" --> choose your preference. I prefer "By Exposure Date" and "Ascending", so that newest photos are on the bottom.

  5. Rotate photos

    Click on a photo to select it, then click the "Rotate" button in the toolbar at the bottom of the screen.

  6. View dates and metadata details

    Click "View" and ensure that "Basic Information" and "Extended Information" are checked. This will show metadata details in a right-hand pane.

Using Shotwell in this way as described above is a lot like viewing photos on a tablet or iPad.

References

  1. Shotwell, as of version 0.32.0, now supports .AVIF, .HEIC, and .Webp images: https://www.omglinux.com/shotwell-updates-supports-avif-heic-images/
  2. Official Shotwell website and installation instructions: https://wiki.gnome.org/Apps/Shotwell/BuildingAndInstalling
  3. Official Flatpak website and installation instructions: https://flathub.org/setup/Ubuntu

Option 2: GIMP also works to view .HEIC images

Tested in Ubuntu 22.04.

In Ubuntu, install it with:

sudo apt update
sudo apt install gimp

Then just double-click the .heic image in your file manager to open it in GIMP, or right-click it --> Open With --> Other Application --> choose GIMP.

See also

  1. My answer: Stack Overflow: How to convert .webp images to .png on Linux

You must log in to answer this question.

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