From f4e3041cb9f90d971c637a73c747f8beb602ad2e Mon Sep 17 00:00:00 2001 From: fliegerjohn Date: Mon, 13 Jan 2025 20:18:19 +0100 Subject: [PATCH] Add script --- smallpictures.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 smallpictures.sh diff --git a/smallpictures.sh b/smallpictures.sh new file mode 100755 index 0000000..f496741 --- /dev/null +++ b/smallpictures.sh @@ -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!"