An Internet of things

Musings on iOS and PHP development, IOT and other bits and pieces

Automatically create your iOS Icon.png files with a simple bash script

I was recently made aware of the very handy sips(1) command line tool. Sips is short for Scriptable Image Processing System; it is more or less a command line front end to some of Apple’s processing abilities.

My problem that day was How can I automatically resize my Icon.png artwork and all of a sudden with the knowledge of sips’ existence it was easy to write a small bash script to rename and resize my large 512x512 pixel artwork down to the various names and sizes required by iOS. (Thanks Mark!)

The script is simple. Give it an input PNG image at least 1024x1024 pixels and it will create your Icon.png and derivatives nicely. The sizes required at any one time are all outlined in the Application Icons section of the iOS Application Programming Guide.

This script should save you at least a dollar on the similar GUI apps on the app store that do the same thing..

Checkout the gist

Update 2013 updated with new image sizes.