Skip to content

Instantly share code, notes, and snippets.

@nod
Last active August 29, 2015 14:13
Show Gist options
  • Save nod/6e0aae98b92f05858151 to your computer and use it in GitHub Desktop.
Save nod/6e0aae98b92f05858151 to your computer and use it in GitHub Desktop.
Create iOS icons in the needed sizes from one image on OS X
#!/bin/sh
# usage: ios_icons some_file.png
# output: creates images in needed sizes for iOS icon files
# ex: some_file_SIZE.png
inf=$1
filename=$(basename "$inf")
ext="${filename##*.}"
fname="${filename%.*}"
echo "creating ${fname}_SIZE.{$ext}"
for i in 29 58 40 80 76 152 ; do
sips -Z $i --out "${fname}_${i}.${ext}" $inf
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment