Add script

This commit is contained in:
Fliegerjohn 2025-01-13 20:18:19 +01:00
parent 4a3ec4bb03
commit f4e3041cb9
Signed by: fliegerjohn
GPG key ID: E2221D5FE4656B6A

19
smallpictures.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
if [ ! -d "small" ]
then
echo "Create dir *small/*"
mkdir -p "small"
fi
echo "Convert pictures to preview and bigger version..."
for i in *.$1; do
magick $i -quality 50% -resize '800x800' small/${i%.$1}-preview.$1;
magick $i -quality 88% -resize '4096x4096' small/$i;
done
echo "Delete metadata..."
exiftool -all= -overwrite_original small/*
echo "Done!"