#!/bin/sh # This script wraps system-dependant calls to several netpbm utilities. # In order to use this script, set the NETPBM variable below to the # directory which contains giftopnm, ppmtopgm, and pnmtops. NETPBM=/usr/local/bin # If you wish to set the paths to each utility separately, i.e. if they # are in different locations, do so below: PNGTOPNM=$NETPBM/pngtopnm; PPMTOPGM=$NETPBM/ppmtopgm; PNMTOPS=$NETPBM/pnmtops; # There should be no need for customization beyond this point. umask 022 cat $1 | $PNGTOPNM | $PPMTOPGM | $PNMTOPS -noturn 2>/dev/null > $2 # CODER NOTE: # We used to use `pnmdepth 1' instead of ppmtopgm as it creates a # monochrome image (1 bit) rather than a greyscale image (8 bits). # However, this was causing improper display of some sort in PDFs.