Convert HEIC photos to JPEG

A quick note-to-self about how I managed to download a bunch of photos from an iPhone and convert them to JPEG on my laptop running Ubuntu 22.04.

As opposed to Android phones, iPhones do not show up as a regular disk with easy access to the DCIM folder storing photos. Fortunately, Rapid Photo Downloader managed to launch the iPhone and find all the images. Unfortunately, all the files were stored as HEIC files, using the High Efficiency Image File Format. This format is technically good but practically tricky to work with. So I wanted to convert the files to JPEG.

With some searching, I got some help with How to Open or Convert iOS HEIC Photos to JPEG and PNG in Ubuntu 20.04 | 22.04. The trick is to install a small collection of tools for working with HEIF files:

sudo apt-get install libheif-examples

Then I ran this one-liner to convert a folder of HEIC files:

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

That’s it!

Published by

alexarje

Alexander Refsum Jensenius is a music researcher and research musician living in Oslo, Norway.