-
-
Save pablocarrillo/921a3379ddfa368f4974 to your computer and use it in GitHub Desktop.
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 | |
# This file create a folder called resizedIcons in the same folder than the file | |
# in the first parameter and place inside all the resized copies | |
# The filename.png to resize | |
ITUNES_ARTWORK="$1" | |
FOLDER0=$(dirname "$ITUNES_ARTWORK") | |
FOLDER="${FOLDER0}/ResizedIcons" | |
# create the new folder | |
mkdir $FOLDER | |
sips --resampleWidth 512 "$ITUNES_ARTWORK" --out "${FOLDER}/iTunesArtwork.png" | |
sips --resampleWidth 1024 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 57 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-57.png" | |
sips --resampleWidth 114 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 29 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-29.png" | |
sips --resampleWidth 58 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 87 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 50 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-50.png" | |
sips --resampleWidth 100 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 40 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-40.png" | |
sips --resampleWidth 80 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 120 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 57 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-57.png" | |
sips --resampleWidth 114 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 76 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-76.png" | |
sips --resampleWidth 152 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 72 "$ITUNES_ARTWORK" --out "${FOLDER}/Icon-72.png" | |
sips --resampleWidth 144 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 120 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" | |
sips --resampleWidth 180 "$ITUNES_ARTWORK" --out "${FOLDER}/[email protected]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment