Last active
August 29, 2015 14:13
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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