Any app on Ubuntu to open and/or convert HEIF pictures (.HEIC, High Efficiency Image File Format)?
Solution 1
Ubuntu 22.04 quick start
- install
heif-gdk-pixbuf
for support in at least eog (Eye of GNOME, GNOME Image Viewer). - install
heif-thumbnailer
for 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 PPAImage 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 (at least version 0.2.5-3), can be installed from the Software Center or directly from the project page. Thank you, adasiko.
- digiKam (6.4+)
- GIMP (2.10.2+)
- Krita (Review of version 4.2, Feb 2019)
- gImageReader (in 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
- 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-convert
andheif-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/libheif
Install the package
heif-gdk-pixbuf
. In a terminal run:sudo apt install heif-gdk-pixbuf
-
gThumb 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 gthumb
-
Geeqie 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-libheif
flag. One-liner build with IMEI. (The pre-built AppImage does not support heic yet.) -
tifig
is 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:
Solution 2
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
Solution 3
On Ubuntu 20.04 Focal Fossa:
$ sudo apt install heif-gdk-pixbuf heif-thumbnailer gimagereader gpicview
then find an HEIC file in the file manager, right click, select Properties
then Open With
and select Image Viewer
(if there's two of them, select the one with the more colourful icon) and then select Set as default
(or Add
if that's the only option.)
After that you can double-click HEIF files to view them:
Older Ubuntu LTS:
On Ubuntu 18.04 you can sudo snap install gimp
to get the latest version (2.10.10
8 as of May 2019) which can open and edit HEIC files.
On Ubuntu 18.04 there's also a commandline tool to convert HEIC:
sudo apt install libheif-examples
heif-convert IMG_1605.HEIC IMG_1605.jpg
NOTE: you must use lowercase .jpg
or it will complain that it doesn't recognise the file format. That message is almost as misleading as the package name, and I can easily understand given these two papercuts why so few people have figured out how to use this tool.
For anyone who doubts that this is an official Ubuntu package:
user@host:~/Desktop$ dpkg -s libheif-examples
Package: libheif-examples
Status: install ok installed
Priority: optional
Section: video
Installed-Size: 91
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Source: libheif
Version: 1.1.0-2
Depends: libheif1 (= 1.1.0-2), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libjpeg8 (>= 8c), libpng16-16 (>= 1.6.2-1), libstdc++6 (>= 5.2)
Description: ISO/IEC 23008-12:2017 HEIF file format decoder - examples
libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder. HEIF is a new
image file format employing HEVC (h.265) image coding for the best compression
ratios currently possible.
.
Sample applications using libheif are provided by this package.
Original-Maintainer: Debian Multimedia Maintainers <[email protected]>
Homepage: http://www.libheif.org
OK so now the punchline of this joke. ;-)
You can use fuseflt or yacufs FUSE filesystems to mount your pictures folder with automated temporary cached conversion of your HEIC files so all the stock Linux desktop apps can open the HEIC files without ever knowing they're doing it.
Mark Deven below says that he only needed to install libheif
via aptitude to get these commands, though he didn't mention what distro he's running.
Solution 4
GIMP 2.10.2 now reads, writes, and edits .HEIC container files, and ImageMagick will convert from .HEIC image container files.
Solution 5
While not really a local conversion, it is possible to view .heic images using Dropbox.
Simply upload the subject images to your Dropbox account, then click on the desired image to view it. You can even right-click on the image to save the .jpeg
file back to your local machine in JPEG format. (Note: don't click on the Dropbox's Download button, as that will just get the original .HEIC
file.)
Related videos on Youtube
![Filbuntu](https://i.stack.imgur.com/VcYWN.jpg?s=256&g=1)
Comments
-
Filbuntu almost 2 years
A certain cellphone maker has changed the default format of taking pictures to HEIF (.HEIC, High Efficiency Image File Format), without asking the users (although there is still the option to use jpeg/jpg).
Is there an app/program on Ubuntu that can open and/or convert HEIF-pictures and even let them be edited?
-
oldfred almost 7 yearsYou may have to bulk convert: iOS 11 new photo format HEIF github.com/pushd/heif
-
Rinzwind over 5 yearsgithub.com/nokiatech/heif/blob/master/LICENSE.TXT is the new one I would assume
-
nealmcb over 3 yearsFor background, note: Introduced in 2015, HEIF was adopted by Apple in 2017 with the introduction of iOS 11, and read about how Apple's introduction of this feature, combined with online exams due to COVID, led to students failing AP exams in 2020: en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
-
Mantas Baltix over 2 yearsA bug about HEIF/HEIC support is already reported in Ubuntu, see launchpad.net/bugs/1886271
-
-
jakar almost 6 yearsNot sure what the proper etiquette to mention this is (maybe I should edit instead of comment?), but I created a Qt image plugin that wraps libheif. I would like to create a PPA, but that hasn't happened yet.
-
jakar almost 6 yearsThe Qt plugin PPA is now up.
-
Wil over 5 yearsI voted you up solely because syncing your photos to the cloud is a great idea, keeping them in HEIC format saves space without degrading quality, and being able to access them via a browser means you can access and share them more easily. So it's win win win even if it doesn't really answer the question.
-
Mark Deven over 5 yearsAfter installing these packages, libheif-examples and heif-convert are not found commands.
-
Mark Deven over 5 yearsI got it working using aptitude and installing just
libheif
-
Digger over 5 yearsFWIW, Debian 10 (Buster) includes, in its standard repo, the
libheif-examples
package, which lists thelibheif1
package as a dependency. Note that I've not tested said package, as I'm still (sadly) languishing in Debian 7 (Wheezy). -
Modular about 5 years1) This is an official package of 18.04 (packages.ubuntu.com/bionic/libheif-examples) and 2) I had to change
.heic
to.HEIC
in both places since mine were capitalized. Thank you!! This worked so well! -
Óscar about 5 yearsUbuntu 18.04 currently (May 2019) includes GIMP version 2.8.22, not 2.10, so there is no HEIF support in the off-the-shelf version of GIMP in Ubuntu.
-
Wil about 5 years@Óscar: please read the first line of the post again.
snap
is off the shelf.gimp
comes withsnap
. 2.10.10 is the current version for 18.04 via snap -
Óscar about 5 years@Wil you are right, I didn't see the snap command, sorry.
-
Ben McCann over 4 yearsYes, that was what I meant
-
seanlano over 4 yearsI'm using Ubuntu 19.10, and I was able to open a HEIF image in "Image Viewer" without needing to do anything special – no extra PPAs
-
SD. over 4 yearsfor file in *.HEIC; do heif-convert -q 100 $file $file.jpg; done
-
adasiko about 4 yearsFor Ubuntu 20.04 it's now working in GNOME Image Viewer (Eye of GNOME - eog)
-
Wil about 4 yearsIt's true but I also found
eog
unstable, dying with segfaults when I view certain photos, locking up while generating some thumbnails, so while it's more advanced thangpicview
, it's got some papercuts too.gthumb
worked on 19.04 but doesn't on 20.04, sadly. -
hallvors almost 4 yearsThanks for this post, it was helpful! A small note that might help someone else: I'm not that familiar with Bash and terminal scripting and it took me more than 30 minutes to figure out that pasting this command caused the error
Input file is not an HEIF file
because my files had UPPER case extension HEIC and the command used lower-case.. -
user2081405 over 3 yearsI can't open HEIC files in eog in Ubuntu 20.04 despite installing heif-gdk-pixbuf, and adding the PPA gives me an error ("The repository 'ppa.launchpad.net/lucioc/sayonara/ubuntu focal Release' does not have a Release file. Updating from such a repository can't be done securely, and is therefore disabled by default.")
-
Filbuntu over 3 years@weronika It is a pity, it does not work for you yet. It should work without PPA. What is the error shown when you try to open a HEIF picture? - The PPA mentioned in your comment is not related to HEIF Pictures but to the Sayonara Player (launchpad.net/~lucioc/+archive/ubuntu/sayonara). For HEIF packages update, please use another PPA: sudo add-apt-repository ppa:strukturag/libde265.
-
user2081405 over 3 years... wow, you're right, that's a completely unrelated error that just shows up whenever I try to add any PPA, sorry about that! Okay, now I added both the HEIF PPAs (ppa:strukturag/libheif and ppa:strukturag/libde265), I have heif-gdk-pixbuf installed, and it's still not working - when I try to open a HEIF file with eog it displays "Could not load image 'IMG_2171.HEIC'. Unrecognized image format"
-
Filbuntu over 3 years@weronika No worries! - Interesting that you get this error. Is it a valid HEIF-picture? Maybe you can try with another one. Is it Eye of Gnome you open? Or another Image Viewer?
-
user2081405 over 3 yearsHuh, I tried again today and this time it's working, even though I just repeated the same eog command in the same terminal as yesterday... Ah well, it works now, thank you for your patience with my weird problems!
-
Yordan Grigorov about 3 yearsThis answer won't work with files with spaces/newlines in their names. This version would work: for file in *.HEIC; do heif-convert "$file" "${file/%.HEIC/.jpg}"; done
-
007 about 3 yearsI upgraded to Kubuntu 21.04 which includes KDE Frameworks 5.80, but Gwenview and Kdenlive still don't open HEIC files taken with a Samsung phone.
-
Filbuntu about 3 years@007 It is a pity that it does not work out of the box. Any other Kubuntu 21.04 users out there with any tip? Does Kubuntu 21.04 use KDE Gear 21.04 which should contain Gwenview with HEIF, and HEIC formats according to the announcement.
-
007 about 3 years@Filbuntu Is there a way to check which version of KDE Gear is installed? Kinfocenter has no relevant information. I also started a separate question pertaining specifically to 21.04.
-
Filbuntu about 2 years@eddygeek Thanks again for improving the answer!
-
Admin about 2 yearsThank youuuuuu!
-
Admin about 2 yearsConverting puts the burden of maintaining and storing the conversions onto the user. The other answer (heif-gdk-pixbuf) is a better solution long-term.