#!/bin/sh
f1="400x250+50+0"
f2="400x200+50+0"
f3="460x150+50+0"
f4="420x160+50+0"
f5="420x150+50+0"

b=`basename $1 .pic`


eval f=\$$b
if [ "$f" = "" ] ; then
	echo No scale for $1
    #f="400x200+25+0"
else
	f="-crop $f"
fi
f=

groff -p $b.pic >w.eps
echo START $b.eps
identify w.eps
convert $f w.eps $b.eps
convert $f w.eps $b.png
convert $f w.eps $b.gif
echo DONE $b.eps
identify $b.eps
identify -format ".ds ${b}width %wpt\n.ds ${b}height %hpt" $b.png >>dimensions
