Skip to content

Instantly share code, notes, and snippets.

@michelep
Created December 29, 2023 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelep/46c3d8b03c4be4896ec87d4c9a268f86 to your computer and use it in GitHub Desktop.
Save michelep/46c3d8b03c4be4896ec87d4c9a268f86 to your computer and use it in GitHub Desktop.
Quick and dirty bash script to convert all .heic files in a directory to .jpg format
#!/bin/bash
# Set quality of JPEG files: value 0 (min) to 100 (max)
QUALITY=100
for file in *.heic; do
if [ -f "$file" ]; then
fname=$(basename "$file" .heic)
heif-convert -q$QUALITY $file $fname.jpg
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment