Skip to content

Instantly share code, notes, and snippets.

@sryze
Last active May 4, 2024 22:42
Show Gist options
  • Save sryze/2c339d18e54cf1790e99961165e142ca to your computer and use it in GitHub Desktop.
Save sryze/2c339d18e54cf1790e99961165e142ca to your computer and use it in GitHub Desktop.
Convert app icon from a single PNG to different sizes for iOS
#!/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