diff --git a/scripts/resize.sh b/scripts/resize.sh index d9e1439..769b207 100644 --- a/scripts/resize.sh +++ b/scripts/resize.sh @@ -10,11 +10,13 @@ elif ! [ -d ./character_info ]; then fi # .png_large がなかったら、.png を .png_large にリネームしたあと 256x256 の .png を作成する +# .png が 256x256 だった場合は何もしない for i in ./character_info/*/icons/*.png; do if [ -f "${i/%/_large}" ]; then continue; fi + if [ "$(magick identify -format "%w %h" "$i")" = "256 256" ]; then continue; fi echo "---" mv "$i" "${i/%/_large}" - convert -resize 256x256 "${i/%/_large}" "$i" + magick convert -resize 256x256 "${i/%/_large}" "$i" file "${i%/*}"/* done echo "--->done!"