-
-
Save rnystrom/2311817 to your computer and use it in GitHub Desktop.
A simple bash script using OSX command line tool sips to resample a 512x512px 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/zsh | |
# Compatible with bash, just change "zsh" to "bash" | |
# First param: The folder that the original file is stored in | |
# Second param: The original image name | |
sips --resampleWidth 512 "${1}/${2}" --out "${1}/iTunesArtwork" | |
sips --resampleWidth 57 "${1}/${2}" --out "${1}/Icon.png" | |
sips --resampleWidth 114 "${1}/${2}" --out "${1}/[email protected]" | |
sips --resampleWidth 29 "${1}/${2}" --out "${1}/Icon-Small.png" | |
sips --resampleWidth 58 "${1}/${2}" --out "${1}/[email protected]" | |
sips --resampleWidth 50 "${1}/${2}" --out "${1}/Icon-Small-50.png" | |
sips --resampleWidth 72 "${1}/${2}" --out "${1}/Icon-72.png" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment