Posted On May 1, 2024

Linux: How to Convert HEIC to JPEG

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Linux: How to Convert HEIC to JPEG

First, install certain utilities:

sudo apt-get install libheif-examples

Second, navigate to a directory where there are HEIC files:

directory="/media/kim/Data/Photos/"
cd "$directory"

Third, run the conversion loop:

# This is a for loop that takes into account multiple variables since file name extensions can vary in type casing
for file in {*.heic,*.HEIC}; do heif-convert $file ${file/%.*/.jpg}; done

Sample output:

$ for file in *.HEIC; do heif-convert $file ${file/%.HEIC/.jpg}; done
File contains 1 images
Written to IMG_2172.jpg
File contains 1 images
Written to IMG_2173.jpg
File contains 1 images
Written to IMG_2198.jpg
File contains 1 images
Written to IMG_2201.jpg
File contains 1 images
Written to IMG_2202.jpg
File contains 1 images
Written to IMG_2203.jpg
File contains 1 images
Written to IMG_2204.jpg

Leave a Reply

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

Related Post

How to Upgrade Linux Mint from 20.03 to 21 via Command Line

Step 1: sudo apt updatesudo apt install mintupgrade Step 2: sudo mintupgrade Troubleshooting: Error message:…

Useful Linux Command Aliases

# Create an alias command lsn to display files with numerical representation of schmod permissions…

Apache Hosting Multiple Websites

Must have a FQDN for localhost:vim /etc/hosts---- add this line ----192.168.1.5        server1.cafecenter.com server1----------------------Install GD…