#!/bin/sh
# use gs to change ps to png

SCALE=.25

case $1 in
    -small) shift
	    SCALE=.15
	    ;;
    *) ;;
esac

gs -sDEVICE=pbmraw -r300 -q -dNOPAUSE -dBATCH -sOutputFile=- $1 | \
  pnmcrop | \
  pnmpad -white -l10 -r10 -t10 -b10 | \
  pnmscale -xscale $SCALE -yscale $SCALE | \
  ppmquant 16 |
  pnmtopng -force

