Created
December 3, 2015 16:05
-
-
Save hupili/507facaf96c6ad7c2e58 to your computer and use it in GitHub Desktop.
Generate Icons for Weibo. (Resize images by imagemagick)
This file contains hidden or 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 | |
if [[ $# != 1 ]]; then | |
echo "usage: $0 fn_input" | |
exit 255 | |
else | |
fn_input=$1 | |
fi | |
ext="${fn_input##*.}" | |
fn="${fn_input%.*}" | |
echo "fn:" $fn | |
echo "ext:" $ext | |
for scale in "16x16" "80x80" "120x120" | |
do | |
echo $scale | |
convert $fn_input -geometry $scale ${fn}-${scale}.${ext} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment