dotfiles-rene/heic-scripts/heic2jpg_resize_delete

13 lines
344 B
Text
Raw Permalink Normal View History

2026-02-19 10:55:48 +01:00
#!/bin/bash
# HEIC zu JPG konvertieren, auf max. 1920px verkleinern, HEIC löschen
for file in *.{heic,HEIC}; do
if [[ -f "$file" ]]; then
output="${file%.*}.jpg"
heif-convert -q 90 "$file" "$output" && rm "$file"
if [[ -f "$output" ]]; then
mogrify -resize 1920x1920\> "$output"
fi
fi
done