Macのスクショのファイル名にスペース入ってくるのに対応。
#!/bin/bash
# 画像ファイル一覧
images="${HOME}/Desktop/*.png"
# 出力サイズ
DEST_WIDTH=400
DEST_HEIGHT=400
for image in $images; do
echo "load ${image}"
imageWidth=`identify -format "%w" "${image}"`;
resized="no resize"
if [ ${imageWidth} -gt ${DEST_WIDTH} ]; then
convert "${image}" -resize ${DEST_WIDTH}x${DEST_HEIGHT} "${image}";
resized="complete resized"
fi
echo $resized `identify -format "%wx%h" "${image}"`;
done