| 1 | #!/bin/sh |
1 | #!/bin/sh |
| 2 | |
2 | |
|
|
3 | # This script wraps system-dependant calls to several netpbm utilities. |
|
|
4 | # In order to use this script, set the NETPBM variable below to the |
|
|
5 | # directory which contains giftopnm, ppmtopgm, and pnmtops. |
| 3 | |
6 | |
| 4 | PATH=$PATH:/usr/X11/bin |
7 | NETPBM=/usr/X11/bin |
| 5 | |
8 | |
| 6 | ## /usr/X11/bin contains giftopnm, pnmdepth, and pnmtops |
9 | # If you wish to set the paths to each utility separately, i.e. if they |
|
|
10 | are in different locations, do so below: |
|
|
11 | |
|
|
12 | PNGTOPNM=$NETPBM/pngtopnm; |
|
|
13 | PPMTOPGM=$NETPBM/ppmtopgm; |
|
|
14 | PNMTOPS=$NETPBM/pnmtops; |
|
|
15 | |
|
|
16 | # There should be no need for customization beyond this point. |
| 7 | |
17 | |
| 8 | umask 022 |
18 | umask 022 |
| 9 | # echo $1 "is the path to the pngSourceFile" |
19 | cat $1 | $GIFTOPNM | $PPMTOPGM | $PNMTOPS -noturn 2>/dev/null > $2 |
| 10 | # echo $2 "is the path to the eps file which is being created" |
|
|
| 11 | |
20 | |
| 12 | # cat $1 | giftopnm | pnmdepth 1 | pnmtops -noturn > $2 |
21 | # CODER NOTE: |
| 13 | cat $1 | pngtopnm | ppmtopgm | pnmtops -noturn 2>/dev/null > $2 |
22 | # We used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
| 14 | |
23 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
| 15 | # if there is an error in running these conversions |
24 | # However, this was causing improper display of some sort in PDFs. |
| 16 | # an error will be signaled and caught by alias |
|
|
| 17 | |
|
|
| 18 | # [MEG 9/12/99] as an experiment I'm redirecting the error so that it doesn't wind up |
|
|
| 19 | # cluttering the error log. Hopefully enough errors will come through none the less. |
|
|