Skip to content

Instantly share code, notes, and snippets.

@programmarchy
Last active May 12, 2020 10:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmarchy/e2d4e6c2e42fab2525ff70bc31145a32 to your computer and use it in GitHub Desktop.
Save programmarchy/e2d4e6c2e42fab2525ff70bc31145a32 to your computer and use it in GitHub Desktop.
Given a high resolution icon image, use imagemagick to scale down to all iOS app icon dimensions
APP_NAME="YOUR_APP_NAME_HERE"
SRC=./Design/AppIcon.png
DST=./$APP_NAME/Assets.xcassets/AppIcon.appiconset
convert $SRC -resize 1024x1024 "$DST/AppIcon1024x1024.png"
convert $SRC -resize 2048x2048 "$DST/AppIcon2048x2048.png"
convert $SRC -resize 29x29 "$DST/AppIcon29x29.png"
convert $SRC -resize 58x58 "$DST/AppIcon29x29@2x.png"
convert $SRC -resize 87x87 "$DST/AppIcon29x29@3x.png"
convert $SRC -resize 80x80 "$DST/AppIcon40x40@2x.png"
convert $SRC -resize 120x120 "$DST/AppIcon40x40@3x.png"
convert $SRC -resize 57x57 "$DST/AppIcon57x57.png"
convert $SRC -resize 114x114 "$DST/AppIcon57x57@2x.png"
convert $SRC -resize 120x120 "$DST/AppIcon60x60@2x.png"
convert $SRC -resize 180x180 "$DST/AppIcon60x60@3x.png"
convert $SRC -resize 29x29 "$DST/AppIcon29x29~iPad.png"
convert $SRC -resize 58x58 "$DST/AppIcon29x29~iPad@2x.png"
convert $SRC -resize 40x40 "$DST/AppIcon40x40~iPad.png"
convert $SRC -resize 80x80 "$DST/AppIcon40x40~iPad@2x.png"
convert $SRC -resize 50x50 "$DST/AppIcon50x50~iPad.png"
convert $SRC -resize 100x100 "$DST/AppIcon50x50~iPad@2x.png"
convert $SRC -resize 72x72 "$DST/AppIcon72x72~iPad.png"
convert $SRC -resize 144x144 "$DST/AppIcon72x72~iPad@2x.png"
convert $SRC -resize 76x76 "$DST/AppIcon76x76~iPad.png"
convert $SRC -resize 76x76 "$DST/AppIcon76x76~iPad.png"
convert $SRC -resize 152x152 "$DST/AppIcon76x76~iPad@2x.png"
convert $SRC -resize 167x167 "$DST/AppIcon83.5x83.5~iPad@2x.png"
convert $SRC -resize 40x40 "$DST/NotificationIcon20x20@2x.png"
convert $SRC -resize 60x60 "$DST/NotificationIcon20x20@3x.png"
convert $SRC -resize 20x20 "$DST/NotificationIcon20x20~iPad.png"
convert $SRC -resize 40x40 "$DST/NotificationIcon20x20~iPad@2x.png"
convert $SRC -resize 48x48 "$DST/WatchIcon24x24~38mm@2x.png"
convert $SRC -resize 55x55 "$DST/WatchIcon27.5x27.5~42mm@2x.png"
convert $SRC -resize 58x58 "$DST/WatchIcon29x29@2x.png"
convert $SRC -resize 87x87 "$DST/WatchIcon29x29@3x.png"
convert $SRC -resize 40x40 "$DST/WatchIcon40x40.png"
convert $SRC -resize 80x80 "$DST/WatchIcon40x40@2x.png"
convert $SRC -resize 88x88 "$DST/WatchIcon44x44~42mm@2x.png"
convert $SRC -resize 172x172 "$DST/WatchIcon86x86~38mm@2x.png"
convert $SRC -resize 196x196 "$DST/WatchIcon98x98~42mm@2x.png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment