Skip to content

Instantly share code, notes, and snippets.

@kalyan02
Created November 1, 2013 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalyan02/7266144 to your computer and use it in GitHub Desktop.
Save kalyan02/7266144 to your computer and use it in GitHub Desktop.
Script to resize iOS icons Usage: $ ./ios_icons_resize.sh base_icon.png
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon-57.png"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon-57@2x.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon@2x.png"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/Icon-120.png"
sips --resampleWidth 72 "${f}/${1}" --out "${f}/Icon-72.png"
sips --resampleWidth 144 "${f}/${1}" --out "${f}/Icon-72@2x.png"
sips --resampleWidth 76 "${f}/${1}" --out "${f}/Icon-76.png"
sips --resampleWidth 152 "${f}/${1}" --out "${f}/Icon-76@2x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/Icon-Small@2x.png"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/Icon-40.png"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/Icon-40@2x.png"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-50.png"
sips --resampleWidth 100 "${f}/${1}" --out "${f}/Icon-50@2x.png"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment