A simple shell script to convert HEIC (HEIF) images to PNG or JPEG — quickly, recursively, and safely.
It automatically detects whether you have heif-convert (libheif) or ImageMagick installed.
- Convert HEIC / HEIF → PNG or JPEG
- Supports multiple files and directories
- Recursive mode (
-r) - Adjustable JPEG quality (
-q) - Custom output directory (
-o) - Automatically uses
heif-convertormagickdepending on your system
Make sure you have the required tools:
brew install libheif imagemagicksudo apt install libheif-examples imagemagickThen download this repository:
git clone https://github.com/iamthe000/HEICmustKoroScript.git
cd HEICmustKoroScript
chmod +x heic_koros.sh./heic_koros.sh photo.heic→ Creates photo.png.
./heic_koros.sh -f jpeg -q 85 photo.heic./heic_koros.sh -r images/./heic_koros.sh -r -f png -o converted/ images/| Option | Description |
|---|---|
-f FORMAT |
Output format: png or jpeg (default: png) |
-q QUALITY |
JPEG quality (1–100, default: 90) |
-r |
Recurse into directories |
-o DIR |
Output directory |
-h |
Show help message |
./heic_koros.sh -r -f jpeg -q 80 -o output_dir/ ~/Pictures/Converts all HEIC files in ~/Pictures/ to JPEG (quality 80), saving them in output_dir.
MIT License © 2025 iamthe000
“HEIC Korosu Script” is a playful name — korosu means “to kill” in Japanese, as in “kill the HEIC files.” Don’t worry — it’s a gentle script that just converts them to PNG or JPEG 😄☕