home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / live / usr / X11R6 / bin / mkgif89a < prev    next >
Text File  |  1999-01-26  |  667b  |  20 lines

  1. #!/bin/bash
  2. # $1 scale
  3. # $2 rotation
  4. # $3 postscript file
  5. echo "** rendering ppmraw images with Ghostscript **"
  6. cat $3 | gs -g$4x$5 -sDEVICE=ppmraw -sOutputFile=$3-%02d.ppm -dNOPAUSE -
  7. echo "** converting images from ppmraw to gif **"
  8. for x in $3-??.ppm
  9. do
  10. echo writing `dirname $3`/`basename $x .ppm`.gif
  11. pnmscale -xscale $1 -yscale $1 $x | pnmrotate $2 | ppmquant 256 | ppmtogif >`dirname $3`/`basename $x .ppm`.gif
  12. done
  13. echo "** merging images into multi-frame gif89a **"
  14. bash -c "gifmerge -l0 -25 $3-??.gif >$3.gif"
  15. echo "** loading multi-frame gif89a into xanim **"
  16. xanim $3.gif &
  17. echo "** removing intermediate ppmraw and gif images **"
  18. rm $3-??.gif $3-??.ppm
  19.  
  20.