[system] / trunk / webwork / system / scripts / png2eps Repository:
ViewVC logotype

Diff of /trunk/webwork/system/scripts/png2eps

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6 Revision 183
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
4PATH=$PATH:/usr/X11/bin 7NETPBM=/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
10are in different locations, do so below:
11
12PNGTOPNM=$NETPBM/pngtopnm;
13PPMTOPGM=$NETPBM/ppmtopgm;
14PNMTOPS=$NETPBM/pnmtops;
15
16# There should be no need for customization beyond this point.
7 17
8umask 022 18umask 022
9# echo $1 "is the path to the pngSourceFile" 19cat $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.

Legend:
Removed from v.6  
changed lines
  Added in v.183

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9