From 4023001a68b3d85891ab744eb77e7b22a9dd8e3f Mon Sep 17 00:00:00 2001 From: jimmacfx Date: Fri, 25 Nov 2005 22:16:10 +0000 Subject: import original 0.11 git-svn-id: https://forgesvn1.novell.com/svn/original/trunk@2 4fa712ea-3c06-0410-9261-c11b4c06c003 --- convert/imgconv | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 convert/imgconv (limited to 'convert/imgconv') diff --git a/convert/imgconv b/convert/imgconv new file mode 100755 index 0000000..3ac8bc5 --- /dev/null +++ b/convert/imgconv @@ -0,0 +1,46 @@ +#!/bin/bash + +#sem dodelat err + +adresar=$@ + +mkdir ./web-gallery +mkdir ./web-gallery/thumbs +mkdir ./web-gallery/lq +mkdir ./web-gallery/mq +mkdir ./web-gallery/hq +mkdir ./web-gallery/zip #used for image tarballs +mkdir ./web-gallery/comments + +i=1 +for soubor in $adresar + do + echo "konvertuji $soubor" +# IMAGEMAGICK + #convert -geometry 160x120 -colors 16 -dither $soubor ./web-gallery/thumbs/img-$i.png + convert -geometry 120x120 $soubor ./web-gallery/thumbs/img-$i.jpg + convert -geometry 640x480 $soubor ./web-gallery/lq/img-$i.jpg + convert -geometry 800x600 $soubor ./web-gallery/mq/img-$i.jpg + +# NETPBM + #jpegtopnm $soubor > temp.pnm + ##cat temp.pnm | pnmscale -xysize 120 120 | ppmquant -floyd 16 | pnmtopng -interlace -compression 9 > ./web-gallery/thumbs/img-$i.png + #cat temp.pnm | pnmscale -xysize 120 120 | ppmtojpeg --quality 80 --progressive > ./web-gallery/thumbs/img-$i.jpg + #cat temp.pnm | pnmscale -xysize 640 640 | ppmtojpeg --quality 80 --progressive > ./web-gallery/lq/img-$i.jpg + #cat temp.pnm | pnmscale -xysize 800 800 | ppmtojpeg --quality 80 --progressive > ./web-gallery/mq/img-$i.jpg + #rm temp.pnm + + cp $soubor ./web-gallery/hq/img-$i.jpg + # template for comment + echo "image $i " > ./web-gallery/comments/$i.txt + i=`expr $i + 1` +done + +##################### +# Tar-up/zip images # +##################### + +#tar cvjf web-gallery/zip/mq.tar.bz2 mq/*.jpg +#tar cvjf web-gallery/zip/hq.tar.bz2 hq/*.jpg +zip -R web-gallery/zip/mq.zip web-gallery/mq/*.jpg +zip -R web-gallery/zip/hq.zip web-gallery/hq/*.jpg -- cgit v1.2.3