- create a folder to put resized images in
#!/bin/bash
printf "Batch Image Resize..\n"
read -p "width: " width
read -p "height:" height
[ -d resize/ ] || mkdir resize
ls -1 *.[jJ][pP][gG] | while read file
do
convert -scale ${width}x${height} "$file" resize/"$file"
[ -f "$file" ] && printf "$file\tOK\n"
done
沒有留言:
張貼留言