Created
November 7, 2016 10:53
-
-
Save sarah-j-smith/bfcbe7d04f58d72c33d7ff1f436f46d2 to your computer and use it in GitHub Desktop.
Produce a set of icons for an iOS app from a PNG image.
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 | |
SIZES="58 87 80 120 180 29 20 40 60 76 158 152 167" | |
OUTBASENAME=$(basename "$1" .png) | |
for sz in $SIZES; do | |
newImage="${OUTBASENAME}-${sz}x${sz}.png" | |
cp "$1" "$newImage" | |
sips --resampleHeightWidth $sz $sz "$newImage" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment