#! /bin/sh

PATH="/usr/share/xfax/bin:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/lib/teTeX/bin"

# This script requires either the "ppmtoxpm" routine or the "convert"
# utility from the ImageMagick package. 
# Adapt the line as needed below
# CONVERT =ppmtoxpm   or  ="convert pgm:- xpm:-"

CONVERT="ppmtoxpm"
 
case $3 in
 ### High res screen:
 1 )  efix -i fax -o pgm -s1.3x1.3 -p28.1x39.75cm $1 | $CONVERT > $2
 ;;
 ### Medium res screen:
 2 )  efix -i fax -o pgm -s1.18x1.18 -p25.1x35.5cm $1 | $CONVERT > $2
 ;;
 ### Low res screen in all other cases :
 * )  efix -i fax -o pgm -s1x1 -p21x29.7cm $1 | $CONVERT > $2
 ;;
esac
