as-app/scripts/images-resize-and-center-all

7 lines
No EOL
195 B
Bash
Executable file

#!/bin/bash
resize=${1:-"48x48"}
for file in *.png; do
convert "$file" -resize "${resize}" -background none -gravity center -extent "${resize}" "$file"
echo "Resized and centered $file"
done