"Fossies" - the Fresh Open Source Software Archive

Member "tth_exe/ps2gif" (2 May 1999, 627 Bytes) of package /windows/www/tth_exe.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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