Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save doppelganger9/9a0e04e5aa28a529ebba to your computer and use it in GitHub Desktop.

Select an option

Save doppelganger9/9a0e04e5aa28a529ebba to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir -p generated
sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png sourceIcon.png
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png sourceIcon.png
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png sourceIcon.png
sips -Z 57 --out generated/iPhoneIOS6App-57x57.png sourceIcon.png
sips -Z 114 --out generated/iPhoneIOS6App-57x57@2x.png sourceIcon.png
sips -Z 50 --out generated/iPadSpotlightIOS6-50x50.png sourceIcon.png
sips -Z 100 --out generated/iPadSpotlightIOS6-50x50@2x.png sourceIcon.png
sips -Z 72 --out generated/iPadAppIOS6-72x72.png sourceIcon.png
sips -Z 144 --out generated/iPadAppIOS6-72x72@2x.png sourceIcon.png
sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPadSettings-29x29@2x.png sourceIcon.png
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png
sips -Z 80 --out generated/iPadSpotlight-40x40@2x.png sourceIcon.png
sips -Z 76 --out generated/iPadApp-76x76.png sourceIcon.png
sips -Z 152 --out generated/iPadApp-76x76@2x.png sourceIcon.png
#cp generated/*.png path/to/Images.xcassets/AppIcon.appiconset
@doppelganger9
Copy link
Author

Added command line parameters, and streamlined the generation of images to what XCode uses ("iconXXX.png").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment