Created
September 30, 2016 07:56
-
-
Save DenTelezhkin/1a04ab4eceb2b5fac2cf7ae00b0863e8 to your computer and use it in GitHub Desktop.
Slice iOS app icons from 1024x1024 PNG file, originally taken from https://gist.github.com/jessedc/837916#file-ios-icon-png-bash-script. Updated for Xcode 8 - September 2016.
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/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 20 "${f}/${1}" --out "${f}/Icon-20.png" | |
sips --resampleWidth 40 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 60 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-29.png" | |
sips --resampleWidth 58 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 87 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 40 "${f}/${1}" --out "${f}/Icon-40.png" | |
sips --resampleWidth 80 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 120 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 120 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 180 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 76 "${f}/${1}" --out "${f}/Icon-76.png" | |
sips --resampleWidth 152 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 167 "${f}/${1}" --out "${f}/[email protected]" |
Check folder from which you are executing command, does it contain prepare_icons.sh script?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what might be the problem here ?