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
Answer from s0kr8s on Stack ExchangeFor 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
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.
In recent Ubuntu versions (>= 18.04):
sudo apt-get install libheif-examples
And then
for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done
In older Ubuntu or Mint versions, first add this PPA and then do the above steps.
sudo add-apt-repository ppa:strukturag/libheif
sudo apt-get update
Ubuntu 22.04 quick start
- install
heif-gdk-pixbuffor support in at least eog (Eye of GNOME, GNOME Image Viewer). - install
heif-thumbnailerfor file manager (nautilus, nemo) thumbnails. - The available versions of Geeqie, ImageMagick, gThumb and many more (see below) have built-in support.
Official packages
Starting with Ubuntu 20.04: At least for eog (Eye of GNOME, GNOME Image Viewer), you have to install the package heif-gdk-pixbuf (no PPA needed). In a terminal run:
sudo apt install heif-gdk-pixbuf
This will install libheif1 and libde265-0 along.
Apparently KDE distros with KDE Frameworks 5.80 have added support for HEIF and HEIC Image Formats to all KDE Apps (news, KDE announcement, MR), but the support flag is not enabled yet in the default (K)ubuntu packages (ubuntu bug).
Programs/Apps that support HEIF via libheif1 include:
- GNOME Image Viewer (Eye of GNOME - eog) is updated in Ubuntu 19.10 and later. (Thanks seanlano!) - if it does not work for you, see PPA tip below.
- gThumb Image Viewer & Organizer 3.11.4+, in ≥ Ubuntu 22.04 (for older verstions see below)
- Darktable, free open source photography application and raw developer (3.8+)
- GPicView (0.2.5+), can be installed from the Software Center or directly from the project page. Thank you, adasiko.
- digiKam (6.4+)
- GIMP (2.10.2+)
- Krita (4.2+)
- gImageReader (Ubuntu 20.04+)
- Kodi (free and open-source media player software application) with Add-on:HEIF image decoder
- xviewer (based on Eye of GNOME) with heif-gdk-pixbuf
- Shotwell (0.32+)
- Geeqie (1.6+) in Ubuntu 22.04
heif-thumbnailer- a thumbnailer for HEIF images that can be used by Nautilus and Nemo.libheif-examples– provides command-line utilities:heif-convertandheif-enc.
See How best to search for dependencies?
Programs/Apps to CONVERT HEIF/HEIC-pictures:
Most of the above mentioned apps support to convert a HEIC-photo, e.g. eog (Eye of GNOME, GIMP, Krita, GPicView.
Open the photo via one of these image viewer/editor, then select Export to JPG (or another image format like PNG) or Save as (choose a different image format then HEIC).
For batch conversion on the command-line, use heif-convert or ImageMagick's convert.
Unofficial Packages and older Ubuntu versions
If one is willing to install a Flatpak, Snap app, or PPA:
GNOME Image Viewer (Eye of GNOME - eog) can handle HEIF pictures with an updated gdk-pixbuf plugin which can be installed/updated with the above mentioned libheif-PPA on Ubuntu 14.04, 16.04, and 18.04. In a terminal run:
sudo add-apt-repository ppa:strukturag/libheifInstall the package
heif-gdk-pixbuf. In a terminal run:sudo apt install heif-gdk-pixbufgThumb Image Viewer & Organizer has an unofficial PPA for Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.04, Ubuntu 21.10, Linux Mint 20 and derivatives:
sudo add-apt-repository ppa:ubuntuhandbook1/apps sudo apt update sudo apt install gthumbGeeqie 1.6 has HEIF support. It is available in 22.04 ; it may be installed from AppImage, or on ubuntu 18.04 and 20.04 from PPA.
ImageMagick 6.9 with HEIF support is available on ubuntu 22.04 ; on ubuntu 18.04 and 20.04 from bleeding edge PPA which also provides an updated libheif1 (1.12 instead of 1.6 as of October'21). If the colors seem wrong/inverted, you may need to convert from YCbCr with e.g.
display -colorspace sRGB(source: github)Qt image plugin wraps libheif. It was created by jakar, and may be installed on ubuntu 14.04 to 19.04 from PPA. On more recent versions you may instead rebuild kimageformats as per bug 1951278.
Ubuntu 19.10
There are some prominent bugs in the shipped version of libheif1, so update to the latest version available from the PPA libheif by “struktur AG” team:
In a terminal: sudo add-apt-repository ppa:strukturag/libheif
Upgrade of packages (Sept 2020)
You also need to add the PPA strukturag/libde265 to get the correct dependencies:
sudo add-apt-repository ppa:strukturag/libde265
sudo apt update
sudo apt upgrade
(If you get the error add-apt-repository: not found, make sure software-properties-common is installed, e.g. sudo apt install software-properties-common)
Those who do not wish to install a PPA may download the packages directly from the PPA webpages to install (dpkg -i) or recompile. Packages installed this way will not be automatically updated.
Online Tools
Google Photos and Dropbox both support HEIF.
There are other online converters (e.g. HEICtoJPEG), but check their privacy policies before use.
Miscellaneous
ImageMagick, as of 7.0.7-22, can be compiled with the
--with-libheifflag. One-liner build with IMEI. (The pre-built AppImage does not support heic yet.)tifigis described as "a fast HEIF image converter aimed at thumbnailing". However, it must currently be compiled from source.Nokia HEIF Info and Source Code. However, Apple's implementation differs somewhat.
Windows 10 Build 17623 includes support for HEIF in the Photos app. However, the following may need to be installed before use:
HEIF Image Extensions
HEVC Video Extensions or HEVC Video Extensions from Device Manufacturer
I am running Ubuntu 22.04.3 and I often take photos on my iPhone, which most of are .HEIC (High Efficiency instead of Most Compatible JPG/JPEG Images). The Linux does not recognise these images, i have to open GIMP to view these images or convert them to other format, how to add support for this format so that I can open these images in the default Image Viewer?
HEIC is the file format name Apple has chosen for the new HEIF (High Efficiency Image Format) Standard. Using advanced and modern compression methods, it allows photos to be created in smaller file sizes while retaining a higher image quality compared to JPEG/JPG.
Every iOS update comes with a host of changes, but some are not immediately obvious. ... HEIC will be used by default on new photos on iOS 11, and it's designed to save you storage space. As it's a new container format, there will be some incompatibilities along the way, and Apple does a good job at handling most of these.
To view these .HEIC images on Ubuntu, do this...
sudo apt update
sudo apt install heif-gdk-pixbuf
sudo apt install heif-thumbnailer
sudo apt install libheif1:amd64
Then save one of the .HEIC images to your ~/Pictures folder, right-click on the image icon, select Properties, and set the default application to Open With as Image Viewer.
Now a double-click on the image icon will open the file in Image Viewer for viewing.
Image thumbnails will also be seen in Files (Nautilus) windows.
In Thunderbird you can now also view these images in the original email attachment bar.
I found that Converseen version 0.9.9.0 was able to convert an HEIC file downloaded from iphone to jpeg easily without any modification. It worked on Debian 11 Bullseye and assume that it should work on the current Ubuntu version. You may install it from repo using sudo apt install converseen
I hope it helps.
I have a backup of all the photos from my iPhone. It turns out it uses HEIF format to store the small videos together with the actual photo.
How do you view HEIF files in Linux? I managed to open them with Gimp but it doesn't play the small video and it wouldn't be a great solution to just browse my photos anyway. I tested with Okular, Gwenview, Xnview and Lximage and none of them likes this format.
Do you have any other suggestions? Is there something I'm missing? Do I need to install some optional dependency library?
Thanks in advance!
Solution (kind of):
So first of all I was completely wrong about HEIC and Live mode videos. The small videos that are taken in Live mode are not embedded in the HEIC file, but saved in MOV format with the same name as the photo (minus the extension). Only burst photos are embedded in a single HEIC file.
The program digikam is able to show you the photos and create thumbnails. Also basic operations are no problem. That is enough for me but I think switching to JPEG seems to be the smarter move on the long run.
I've been a little stubborn about using HEIC but I don't think it offers any real benefit that justifies the hassle. I actually still use it (for pure laziness) but as already stated you should change the settings and convert the HEIC files. I use libheif-converter instead of the often suggested tifig because the latter seems to be a dead project.
https://github.com/strukturag/libheif
Also an important information to access all the files including the videos to be able to backup everything including videos. I am using following instructions:
sudo apt install ifuse libimobiledevice-utils idevicepair pair mkdir ~/iPhone ifuse ~/iPhone cd ~/iPhone [...] cd ~ fusermount -u ~/iPhone
Under ~/iPhone/DCIM/10XAPPLE folders you'll see all HEIC and MOV files.
This heic combined still + video burst file opened in mpv
Convert them:
https://www.wilderssecurity.com/threads/iphone-how-to-convert-your-heic-photos.400574/
with this tool:
https://github.com/monostream/tifig
Here is the script to automate it for whole folders:
#!/bin/bash
for f in *; do
tifig -v -p "$f" "${f%.*}.jpg"
done
Then maybe set you iphone not to use this format.