From d284b1cf87cbedb2407e09379000d786d5196bf6 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 3 May 2017 19:48:26 +0000 Subject: Updated mkthumbs.sh --- mkthumbs.sh | 23 ++++++++++++++++++----- 1 file 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 -- cgit v1.2.3