diff options
author | Ian C <ianc@noddybox.co.uk> | 2017-05-03 19:48:26 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2017-05-03 19:48:26 +0000 |
commit | d284b1cf87cbedb2407e09379000d786d5196bf6 (patch) | |
tree | 81fcba8e0d8a4adc09e35521bfc24c56b1b44389 | |
parent | c250d0632418a8f324a51d414d2a161dbad407c1 (diff) |
Updated mkthumbs.sh
-rwxr-xr-x | mkthumbs.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/mkthumbs.sh b/mkthumbs.sh index 265a935..37bd959 100755 --- a/mkthumbs.sh +++ b/mkthumbs.sh @@ -1,7 +1,20 @@ #!/bin/bash -for i in $* ; do - convert $i -auto-orient -strip $i.jpg - convert $i.jpg -resize 300x300 $i.gif - rm $i.jpg -done +JPEG=0 + +if [ x-$1 = x---jpeg ] ; then + JPEG=1 + shift +fi + +if [ $JPEG -eq 1 ] ; then + for i in $* ; do + convert $i -auto-orient -strip $i.jpg + convert $i.jpg -resize 300x300 $i.gif + rm $i.jpg + done +else + for i in $* ; do + convert $i -resize 300x300 $i.gif + done +fi |