-
-
Save xinsight/5890836 to your computer and use it in GitHub Desktop.
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 | |
# 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 Icon-76@2x.png # Home screen for Retina iPad - iOS7 | |
convert $1 $blur3 -resize 144x144 Icon-72@2x.png # Home screen for Retina iPad | |
convert $1 $blur3 -resize 120x120 Icon-60@2x.png # Retina iPhone - iOS7 | |
convert $1 $blur3 -resize 114x114 Icon-57@2x.png # Home screen for Retina display iPhone/iPod | |
convert $1 $blur3 -resize 100x100 Icon-50@2x.png # Spotlight on Retina iPad | |
convert $1 $blur4 -resize 80x80 Icon-40@2x.png # 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 Icon-29@2x.png # 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