Skip to content

Instantly share code, notes, and snippets.

@chiliec
Created October 30, 2016 18:46
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 chiliec/a80ce78f977b31fc86ff9ab1cd8e7273 to your computer and use it in GitHub Desktop.
Save chiliec/a80ce78f977b31fc86ff9ab1cd8e7273 to your computer and use it in GitHub Desktop.
Icon AppStore resize. Usage: ./icon_resizer.sh path_to_big_icon.png
#!/bin/bash
f=$(pwd)
sips --resampleWidth 29 "${f}/${1}" --out "${f}/01iPhoneSpotlight56_29pt.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/02iPhoneSpotlight56_29pt@2x.png"
sips --resampleWidth 87 "${f}/${1}" --out "${f}/02iPhoneSpotlight56_29pt@3x.png"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/03iPhoneSpotlight7_40pt@2x.png"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/03iPhoneSpotlight8_40pt@3x.png"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/04iPhoneAppIcon56_57pt.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/05iPhoneAppIcon56_57pt@2x.png"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/06iPhoneAppIcon7_60pt@2x.png"
sips --resampleWidth 180 "${f}/${1}" --out "${f}/06iPhoneAppIcon8_60pt@3x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/07iPadSettings7_29pt.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/08iPadSettings7_29pt@2x.png"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/09iPadSpotlight7_40pt.png"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/10iPadSpotlight7_40pt@2x.png"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/11iPadSpotlight56_50pt.png"
sips --resampleWidth 100 "${f}/${1}" --out "${f}/12iPadSpotlight56_50pt@2x.png"
sips --resampleWidth 72 "${f}/${1}" --out "${f}/13iPadAppIcon56_72pt.png"
sips --resampleWidth 144 "${f}/${1}" --out "${f}/14iPadAppIcon56_72pt@2x.png"
sips --resampleWidth 76 "${f}/${1}" --out "${f}/15iPadAppIcon7_76pt.png"
sips --resampleWidth 152 "${f}/${1}" --out "${f}/16iPadAppIcon7_76pt@2x.png"
sips --resampleWidth 167 "${f}/${1}" --out "${f}/16iPadProAppIcon8_83.5pt@2x.png"
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment