Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- function imageConvert()
- {
- size=$1
- inputFile=$2
- filename=${inputFile%.*}
- extension=${inputFile#*.}
- outputFile=${filename}"W"${size}"."${extension}
- convert -resize $size $inputFile $outputFile
- echo "output"${outputFile}
- }
- # check imageMagick is Install
- which convert > /dev/null 2>&1
- if [ $? != 0 ]; then
- echo "please install imageMagick first"
- exit -1
- fi
- if [$1 !=0 ]; then
- echo "please check input file path"
- exit -1
- fi
- imageConvert 40 $1
- imageConvert 60 $1
- imageConvert 58 $1
- imageConvert 87 $1
- imageConvert 80 $1
- imageConvert 120 $1
- imageConvert 128 $1
- imageConvert 180 $1
- imageConvert 20 $1
- imageConvert 29 $1
- imageConvert 87 $1
- imageConvert 152 $1
- imageConvert 167 $1
- imageConvert 1024 $1
Add Comment
Please, Sign In to add comment