Linux Wizardry

Linux Tutorials, Tips, and Tricks

How to Open or Convert iOS HEIC Photos to JPEG and PNG in Ubuntu 20.04 | 22.04

As you might already know, the HEIF was adopted by Apple in 2017 with the introduction of iOS 11. This image format doesn’t always work when you want to upload it to many websites or open on your Ubuntu Desktop.

What is the HEIC Format?

HEIC which stands for High-Efficiency Image File Container (in HEIF, “F” stands for format). It is a container format for an individual image and specific image sequences. HEIF is empowered by high-efficiency video compression (HEVC) codec and is also called h.265.

HEIF and HEVC are both developed by MPEG or Moving Picture Experts Group. According to the statistics of storage, Apple claims that HEIF with HEVC requires half of the storage with the quality like JPEG.

One of the big advantes of the format is that it supports animation and works well to store more information compared to any animated GIF or APG. Apple uses this format for thier interactive dynamic wallpapers.

In this tutorial, you’ll see how to convert HEIF images to JPG or PNG with Linux commands. If you would like to open HEIC files directly, the latest available versions of Geeqie, ImageMagick, gThumb and many more (see below) have built-in support.

Apps that support HEIF via libheif1 natively:

Convert HEIF images to JPG or PNG

On Ubuntu, you can simply install a command-line tool called heif-convert. To use it, simply install the libheif-examples command-line. heif-convert just comes with it for free. To install, run the following command:

sudo apt-get install libheif-examples

You can easily convert your HEIC file with the following command:

heif-convert [original-file-name] [file-name-with-jpg-or-png-extension]

For example, if you have a file called IMG_1234.HEIC and want to convert it to IMG_1234.jpg, you can simply run:

heif-convert IMG_1234.HEIC IMG_1234.jpg

To convert a bunch of HEIC Photos at the same time the script below are interate over a list of pictures in a folder to accomplish that:

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

Leave a Reply

Your email address will not be published. Required fields are marked *