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?
16 Answers
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,072
- 721
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
- 459
- 1
- 6
- 8
For local conversion, this worked for me in Debian. Just downloaded the static build, ran the example conversion command, everything worked:
- 332
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
- 251
.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/
- 58,727
- 110,156
You could convert it to a supported format using ffmpeg:
ffmpeg -i image.heic image.png
- 370
Remove previous version of ImageMagick:
sudo apt-get remove imagemagickInstall 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-devInstall 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 installInstall 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 checkCheck 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 zlibAs you see 'heic' is in the delegates list.
To convert single file from HEIC into JPG:
convert IMG_3288.HEIC IMG_3288.jpgTo 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
- 58,727
- 131
GIMP 2.10.8 installs the library libheif1 to open HEIC images, other linux programs can be expected to follow soon.
- 141
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.
- 194
Debian:
apt install viewnior heif-gdk-pixbuf
viewnior file.heic
or
apt install gpicview heif-gdk-pixbuf
gpicview file.heic
- 217
- 2
- 7
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
- 58,727
- 169
For support on Gwenview (default KDE image viewer) install the optional dependencies:
kimageformats
libheif
- 290
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.
- 101
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
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.
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.
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.
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.
Rotate photos
Click on a photo to select it, then click the "Rotate" button in the toolbar at the bottom of the screen.
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
- Shotwell, as of version 0.32.0, now supports .AVIF, .HEIC, and .Webp images: https://www.omglinux.com/shotwell-updates-supports-avif-heic-images/
- Official Shotwell website and installation instructions: https://wiki.gnome.org/Apps/Shotwell/BuildingAndInstalling
- 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
- 2,558
Try this webapp: https://strukturag.github.io/libheif/
This uses the most current version of the library everyone else uses for opening .HEIC files, in this case, within your browser.
It's also for testing whether simply updating all libraries to the latest will let you open slightly newer format .HEIC files, Eg, from more recent iPhones / iOS updates).
If this works for you, you could git clone his repository at github, follow the included instructions to build it for yourself, and install a local copy of the library: This will probably fix things that use this library, like GIMP etc.
This is a fairly good exercise for an intermediate user: it's not as hard as doing do would be on other platforms, and this kind of 'just build a fresh one from source' approach is the standard way to 'immediately fix things right now' on a Linux system.
Otherwise, for pretty much all linux distributions: Just wait & update/upgrade your system. Eventually your programs (eg, Gimp etc) will just work, as the updates to this library will trickle down through the distribution's update mechanisms.
- 264