Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Script: heic_to_png
- if [ -z "$1" ]; then
- TARGET_DIR="$(pwd)"
- else
- TARGET_DIR="$1"
- fi
- cd "$TARGET_DIR" || { echo "Cannot change into $TARGET_DIR"; exit 1; }
- for i in *.heic *.HEIC; do
- [ -f "$i" ] || continue
- echo "Converting $i..."
- heif-convert -q 100 "$i" "${i%.*}.png"
- exiftool -tagsfromfile "$i" -all:all "${i%.*}.png"
- done
- echo "conversion done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement