Last active
May 4, 2024 22:42
-
-
Save sryze/2c339d18e54cf1790e99961165e142ca to your computer and use it in GitHub Desktop.
Convert app icon from a single PNG to different sizes for iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install ImageMagick before using this script: brew install imagemagick (for the convert command) | |
# This script works in Bash, but not in ZSH. | |
sizes=" | |
40x40 | |
60x60 | |
58x58 | |
87x87 | |
80x80 | |
120x120 | |
180x180 | |
20x20 | |
29x29 | |
76x76 | |
152x152 | |
167x167 | |
" | |
IFS=' | |
' | |
for size in $sizes; do | |
echo $size | |
convert icon.png -resize "$size" AppIcon_${size}.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment