svētdiena, 2011. gada 31. jūlijs

How to create PDF photo album with ImageMagick


rinda=""; a=1 ; p=1 ;
for fails in ./*JPG
do
rinda=$rinda" "$fails[200x150]
a=$(($a+1))
if [ $a == 37 ]
then
echo "processing $p set"
montage -label '%f' -tile 6x $rinda -page A4 index-$p.pdf
a=1 ; p=$(($p+1)) ; rinda=""
fi
done
echo "processing last set"
montage -label '%f' $rinda -page A4 index-$p.pdf


Update
OMG. The following simple line just works and puts all thumbnails in one PDF file - 35 frames per PDF page.

montage -label "%f" -tile 5x7 -page A4 ../*JPG[200x150] index.pdf