#csh set pgm = $0; set pgm = $pgm:t set args = ($*) if ($#argv < 1) then usage: more << USAGE USAGE: $pgm [.ps] postscript file Convert a postscript slide to gif format USAGE exit 1 endif onintr cleanup # strip off the .ps extension if present set ext = $1:e if ($ext == ".ps") then set file = $1:r else set file = $1 endif # make sure .ps file exists if (!(-e $file.ps)) then echo "Can't find file $file.ps" exit 1 endif echo Converting file $file.ps to tiffg3 format echo gs -sDEVICE=tiffg3 -sOutputFile=$file.gif $file.ps gs -sDEVICE=tiffg3 -sOutputFile=$file.gif $file.ps << END > /dev/null quit END echo Converting to gif format echo For gif file: please click '"save", "gif", "greyscale", "ok", "quit"' #echo For postscript slide: click '"save", "ps", ".slide.ps", "ok",' #echo ' "landscape", "maxpect", "ok", "quit"' xv -mono -iconic -cmap -acrop -expand -2.5 -rotate 90 $file.gif # make the background transparent set tmp = $pgm.$$.tmp.tmp mv $file.gif $tmp giftoppm $tmp | ppmtogif -transparent white > $file.gif cleanup: rm $pgm.$$.*.tmp