"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "tth_linux/ps2gif" of archive tth_linux.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 #!/bin/sh
    2 #ps2gif script by Ian Hutchinson 1998; use at your own risk.
    3 #You need Ghostscript and the pbmplus utilities installed. 
    4 if [ $# -lt 2 ] ; then
    5        echo " Usage: ps2gif <file.ps> <file.gif> [<icon.gif>]" 1>&2
    6        exit 1
    7 else 
    8     echo "Calling ghostscript to convert, please wait ..." >&2
    9     filein=$1
   10     gs -sDEVICE=ppmraw -sOutputFile=- -sNOPAUSE -q $filein -c showpage -c quit | pnmcrop| pnmmargin -white 10 | ppmtogif >$2
   11     shift 2
   12     if [ $# -eq 1 ] ;then
   13 # Make an icon file.
   14        gs -sDEVICE=ppmraw -sOutputFile=- -sNOPAUSE -r12 -q $filein -c showpage -c quit | pnmcrop|  ppmtogif >$1
   15     fi
   16 fi
   17 
   18