Some applications like PolyCam only accept PNG files, and iPhones and other devices often store photos in a HEIF or HEIC format instead. Doing so on Linux is generally faster than on other systems without 3rd party tools.
Install Required Package
- Arch
sudo pacman -S libheif - RHEL Adjacent
sudo dnf install libheif - Debian
sudo apt install libheif libheif-examples
Convert a Single Image
cdto desired directory.heif-convert input.heic output.png
Batch Convert a Folder
cdto desired directory containing multiple HEIF/HEIC files.for f in *.heic; do heif-convert "$f" "${f%.*}.png"; done
Replace .heic with .heif depending on the specific file extension of your HEIF files.
Be sure to execute commands in bash if your distro uses zsh or fish, etc in the terminal emulators. This is my case when using CachyOS.