summaryrefslogtreecommitdiff
path: root/mkthumbs.sh
diff options
context:
space:
mode:
Diffstat (limited to '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