#!/bin/sh
file=$1
base=${file%.*}
# make the png
gs -q -dNOPAUSE \
      -dNOPROMPT \
      -dSAFER \
      -sDEVICE=ppmraw \
      -r100 \
      -sOutputFile="|pnmcrop|convert - -transparent white graphics/$base.png" \
      $1 </dev/null

# make the pdf for the manual:
../bin/epstopdf $1 && mv $base.pdf graphics

