Skip to content

Instantly share code, notes, and snippets.

@Nazar2
Created July 6, 2019 15:38
Show Gist options
  • Save Nazar2/9c1ae7334b1c5e7424ae8eafe59b3c73 to your computer and use it in GitHub Desktop.
Save Nazar2/9c1ae7334b1c5e7424ae8eafe59b3c73 to your computer and use it in GitHub Desktop.
iOS app icons resizer
#!/bin/sh
cp $1 icon20@2x.png
sips -Z 40 icon20@2x.png
cp $1 icon20@3x.png
sips -Z 60 icon20@3x.png
cp $1 icon29@2x.png
sips -Z 58 icon29@2x.png
cp $1 icon29@3x.png
sips -Z 87 icon29@3x.png
cp $1 icon40@2x.png
sips -Z 80 icon40@2x.png
cp $1 icon40@3x.png
sips -Z 120 icon40@3x.png
cp $1 icon60@2x.png
sips -Z 120 icon60@2x.png
cp $1 icon60@3x.png
sips -Z 180 icon60@3x.png
@Nazar2
Copy link
Author

Nazar2 commented Jul 6, 2019

Suppose you already have icon.png file with size 1024*1024px.

Usage in terminal:
chmod u+x resizeIcon.sh
./resizeIcon.sh icon.png

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