196

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?

Filbuntu
  • 13,021
  • 37
  • 88
  • 112
  • You may have to bulk convert: iOS 11 new photo format HEIF https://github.com/pushd/heif – oldfred Sep 26 '17 at 17:02
  • https://github.com/nokiatech/heif/blob/master/LICENSE.TXT is the new one I would assume – Rinzwind Jan 18 '19 at 10:58
  • 3
    For 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: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format – nealmcb Oct 09 '20 at 11:47
  • 1
    A bug about HEIF/HEIC support is already reported in Ubuntu, see https://launchpad.net/bugs/1886271 – Mantas Baltix Nov 13 '21 at 20:26

6 Answers6

181

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
kerner1000
  • 4,230
  • 23
  • This is an official package of 18.04 (https://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!
  • – Native Dev May 21 '19 at 10:21
  • 6
    for file in *.HEIC; do heif-convert -q 100 $file $file.jpg; done – SD. Feb 07 '20 at 14:19
  • 3
    Thanks 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.. – hallvors Aug 31 '20 at 15:46
  • 6
    This 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

    – Yordan Grigorov Apr 05 '21 at 08:28
  • Converting puts the burden of maintaining and storing the conversions onto the user. The other answer (heif-gdk-pixbuf) is a better solution long-term. – Ryan Jun 12 '22 at 23:37
  • Thanks for this. I was thinking wtf is an heic file? I got a new Chromebook to attack to my Android phone, copied a load of heic files from my Camera, then was able to convert them to jpegs following the instructions above, so I can edit them using Gimp. – rodmclaughlin Aug 20 '22 at 14:05
  • 1
    Don't forget to specify JPEG quality and quote the parameters if there are any spaces or other special characters in the file names:

    for file in *.heic; do heif-convert -q 97 "$file" "${file/%.heic/.jpg}"; done

    – Sergey Galin Feb 20 '23 at 18:19
  • How to specify a color profile? My photos look yellow after this conversion. – mevsme Mar 31 '24 at 12:32