summaryrefslogtreecommitdiff
path: root/mkthumbs.sh
blob: 37bd9595fe1b1b3721db5616db2a4b1246bd02fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

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