Skip to content

Instantly share code, notes, and snippets.

@nacookan
Created May 21, 2014 06:56
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 nacookan/2e309f8f773ba246d11d to your computer and use it in GitHub Desktop.
Save nacookan/2e309f8f773ba246d11d to your computer and use it in GitHub Desktop.
iOSアプリ用アイコンに一括リサイズ
#! /bin/bash
source=$1
path="${source}_icons"
mkdir -p $path
sips --resampleWidth 57 --out $path/Icon.png $source # 57 x 57 for iPhone non-Retina iOS6 App
sips --resampleWidth 114 --out $path/Icon@2x.png $source # 114 x 114 for iPhone Retina iOS6 App
sips --resampleWidth 72 --out $path/Icon-72.png $source # 72 x 72 for iPad non-Retina iOS6 App
sips --resampleWidth 144 --out $path/Icon-72@2x.png $source # 144 x 144 for iPad Retina iOS6 App
#sips --resampleWidth 60 --out $path/Icon-60@.png $source # 60 x 60 for iPhone non-Retina iOS7 App
sips --resampleWidth 120 --out $path/Icon-60@2x.png $source # 120 x 120 for iPhone Retina iOS7 App
sips --resampleWidth 76 --out $path/Icon-76.png $source # 76 x 76 for iPad non-Retina iOS7 App
sips --resampleWidth 152 --out $path/Icon-76@2x.png $source # 152 x 152 for iPad Retina iOS7 App
sips --resampleWidth 29 --out $path/Icon-Small.png $source # 29 x 29 for non-Retina iOS6 Setting / Spotlight(iPhone)
sips --resampleWidth 58 --out $path/Icon-Small@2x.png $source # 58 x 58 for Retina iOS6 Setting / Spotlight(iPhone)
sips --resampleWidth 50 --out $path/Icon-Small-50.png $source # 50 x 50 for non-Retina iOS6 Spotlight(iPad)
sips --resampleWidth 100 --out $path/Icon-Small-50@2x.png $source # 100 x 100 for Retina iOS6 Spotlight(iPad)
sips --resampleWidth 40 --out $path/Icon-Small-40.png $source # 40 x 40 for non-Retina iOS7 Setting / Spotlight
sips --resampleWidth 80 --out $path/Icon-Small-40@2x.png $source # 80 x 80 for Retina iOS7 Setting / Spotlight
sips --resampleWidth 512 --out $path/iTunesArtwork.png $source # 512 x 512 for non-Retina App Store
sips --resampleWidth 1024 --out $path/iTunesArtwork@2x.png $source # 1024 x 1024 for Retina App Store
open $path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment