#!/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

SCALE=0.3

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 $SCALE $1.htm $2 -o ../thumbnails/$1.gif
pl -gif -scale $SCALE $1.htm -o ../thumbnails/$1.gif


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