Created
August 2, 2017 10:55
-
-
Save masaedw/a493f80bbd94e7b1fe33f885a349c681 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 | |
name=$1 | |
dir=$(basename $name .jpg) | |
if [[ ! -d $dir ]]; then | |
mkdir $dir | |
fi | |
for i in 1040 1024 700 460 300 240; do | |
convert -resize ${i}x -format jpeg $1 $dir/$i | |
done | |
mv $dir/1024 $dir/1024.jpg | |
cp $dir/240 $dir/240.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment