Skip to content

Instantly share code, notes, and snippets.

@xinsight
Forked from lexrus/asicon.sh
Last active December 19, 2015 03:29
Show Gist options
  • Select an option

  • Save xinsight/5890836 to your computer and use it in GitHub Desktop.

Select an option

Save xinsight/5890836 to your computer and use it in GitHub Desktop.
#!/bin/bash
# According to https://developer.apple.com/library/ios/#qa/qa1686/_index.html
# Install ImageMagick with MacPort: sudo port install ImageMagick
# Install ImageMagick with Homebrew: brew install ImageMagick
# Assume source icon is 1024x1024
blur0=""
blur3="-gaussian-blur 3x3"
blur4="-gaussian-blur 4x4"
blur7="-gaussian-blur 7x7"
blur8="-gaussian-blur 8x8"
blur12="-gaussian-blur 12x12"
convert $1 $blur3 -resize 152x152 [email protected] # Home screen for Retina iPad - iOS7
convert $1 $blur3 -resize 144x144 [email protected] # Home screen for Retina iPad
convert $1 $blur3 -resize 120x120 [email protected] # Retina iPhone - iOS7
convert $1 $blur3 -resize 114x114 [email protected] # Home screen for Retina display iPhone/iPod
convert $1 $blur3 -resize 100x100 [email protected] # Spotlight on Retina iPad
convert $1 $blur4 -resize 80x80 [email protected] # Spotlight Retina iPad, iPhone - iOS7
convert $1 $blur4 -resize 76x76 Icon-76.png # App Store and Home screen for iPad - iOS7
convert $1 $blur4 -resize 72x72 Icon-72.png # App Store and Home screen for iPad
convert $1 $blur7 -resize 58x58 [email protected] # Spotlight and Settings for Retina display
convert $1 $blur8 -resize 57x57 Icon-57.png # Home screen on non-Retina iPhone/iPod
convert $1 $blur7 -resize 50x50 Icon-50.png # Spotlight on non-Retina iPad 1/2/mini
convert $1 $blur12 -resize 40x40 Icon-40.png # Spotlight iPad - iOS7
convert $1 $blur12 -resize 29x29 Icon-29.png # Settings on iPad and iPhone, and Spotlight on iPhone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment