19 lines
379 B
Bash
Executable file
19 lines
379 B
Bash
Executable file
#!/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!"
|