summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2017-05-03 19:48:26 +0000
committerIan C <ianc@noddybox.co.uk>2017-05-03 19:48:26 +0000
commitd284b1cf87cbedb2407e09379000d786d5196bf6 (patch)
tree81fcba8e0d8a4adc09e35521bfc24c56b1b44389
parentc250d0632418a8f324a51d414d2a161dbad407c1 (diff)
Updated mkthumbs.sh
-rwxr-xr-xmkthumbs.sh23
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