#!/bin/sh
#
# usage: sh run basename "pl-opts"
#
# loose option gives result that is loosely cropped.
# normally, tight crop is used.

if [ $# -lt 1 ]; then 
  echo "usage: sh run basename pl-opts"
  exit
fi

if [ $# -eq 2 ]; then
  echo pl -gif $1.htm $2 -o $1.gif
  pl -gif $1.htm $2 -o $1.gif
else
  echo pl -gif -tightcrop $1.htm -o $1.gif
  pl -gif -tightcrop $1.htm -o $1.gif
fi

echo pl -gif -scale 0.3 $1.htm $2 -o ../thumbnails/$1.gif
pl -gif -scale 0.3 $1.htm -o ../thumbnails/$1.gif


echo pl -png -scale 0.3 $1.htm $2 -o ../thumbpng/$1.png
pl -png -scale 0.3 $1.htm -o ../thumbpng/$1.png
