diff options
Diffstat (limited to 'gallery/genthumb.sh')
-rwxr-xr-x | gallery/genthumb.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gallery/genthumb.sh b/gallery/genthumb.sh new file mode 100755 index 0000000..9fd0d5e --- /dev/null +++ b/gallery/genthumb.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +for fp in img/*; do + f="${fp##*/}" + out="thumb/${f%.*}.jpg" + + if [ -e "$out" ]; then + continue + fi + + echo "writting $fp -> $out" + + gm convert -size 320x "$fp" \ + -thumbnail '320x240^' \ + -gravity center \ + -extent 320x240 \ + +profile "*" \ + "$out" +done |