iOS Icon Resolutions Creator Script

iOS icon resolutionsI saw a script online somewhere (stackoverflow?) a while back that created some iOS icon resolutions. I updated it and found it very useful.

iOS Icon Resolutions

Create icon.sh in a directory and post the code below (don’t forget to chmod 777 the file). Then put the icon (1024×1024 png) in the same directory and run the script passing

 

#!/bin/bash

mkdir -p generated

sips -Z 29 --out generated/iPhoneSettings-29x29.png $1
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png $1
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png $1
sips -Z 87 --out generated/iPhoneSettings-29x29@3x.png $1
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png $1

sips -Z 180 --out generated/iPhoneApp-60x60@3x.png $1

sips -Z 50 --out generated/iPhoneApp-50x50.png $1
sips -Z 100 --out generated/iPhoneApp-50x50@2x.png $1

sips -Z 57 --out generated/iPhoneApp-57x57.png $1
sips -Z 114 --out generated/iPhoneApp-57x57@2x.png $1

sips -Z 72 --out generated/iPhoneApp-72x72.png $1
sips -Z 144 --out generated/iPhoneApp-72x72@2x.png $1

sips -Z 29 --out generated/iPadSettings-29x29.png $1
sips -Z 58 --out generated/iPadSettings-29x29@2x.png $1
sips -Z 40 --out generated/iPadSpotlight-40x40.png $1
sips -Z 80 --out generated/iPadSpotlight-40x40@2x.png $1
sips -Z 120 --out generated/iPadSpotlight-40x40@3x.png $1
sips -Z 76 --out generated/iPadApp-76x76.png $1
sips -Z 152 --out generated/iPadApp-76x76@2x.png $1