gifs 855 B

123456789101112131415161718192021222324252627282930313233
  1. # Make HTML files that will point to the right GIF files.
  2. # Usage: bghtml file file file....
  3. #
  4. # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com).
  5. # Copyright (c) 1995 Larry McVoy. GPLed software.
  6. # $Id$
  7. eval 'exec perl -Ssw $0 "$@"'
  8. if 0;
  9. &pbm;
  10. exit 0;
  11. sub pbm
  12. {
  13. @ctx = <HTML/ctx*.pbm>; pop(@ctx);
  14. @mem = <HTML/mem*.pbm>; pop(@mem);
  15. @bar = <HTML/bar*.pbm>; pop(@bar);
  16. foreach $i (<HTML/*.pbm>) {
  17. ($out = $i) =~ s/.pbm//;
  18. warn "Bitmap munging $out\n";
  19. #system "pnmcrop < $i | ppmtogif -transparent 1,1,1 > $out";
  20. system "
  21. pnmcrop < $i > HTML/___tmp 2>/dev/null
  22. set `pnmfile HTML/___tmp`
  23. newx=`expr \$4 - 2`
  24. newy=`expr \$6 - 2`
  25. pnmcut 1 1 \$newx \$newy < HTML/___tmp > HTML/___tmp.pnm
  26. convert -mattecolor slategrey -frame 15x15+0+6 HTML/___tmp.pnm HTML/___tmp.ppm
  27. ppmtogif < HTML/___tmp.ppm > $out.gif 2>/dev/null";
  28. }
  29. }