another.im-ios/scripts/image_resize.sh

18 lines
452 B
Bash
Raw Normal View History

2024-11-18 14:53:52 +00:00
#!/bin/bash
if [[ "$1" == "" ]]; then
echo "Usage: $(basename "$0") <original_logo.png> [type, for example: 'Alpha']"
exit 1
fi
type="$2"
for d in ./Images.xcassets/${type}AppIcon.appiconset ./Images.xcassets/${type}AppLogo.imageset; do
for png in $d/*.png; do
size="$(identify -format "%wx%h" "$png")"
echo "$png ($size)"
#mv "$png" "${png%.png}.old"
convert "$1" -alpha off -filter triangle -resize "$size" "$png"
done
done;