home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / gprogs / ims2pat.icn < prev    next >
Text File  |  2000-07-29  |  1KB  |  43 lines

  1. ############################################################################
  2. #
  3. #    File:     ims2pat.icn
  4. #
  5. #    Subject:  Program to convert image string to bi-level pattern
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     April 20, 2000
  10. #
  11. ############################################################################
  12. #
  13. #  This file is in the public domain.
  14. #
  15. ############################################################################
  16. #  This program converts an image string with the g2 palette to a
  17. #  bi-level pattern.
  18. #
  19. ############################################################################
  20. #
  21. #  Requires:  Version 9 graphics
  22. #
  23. ############################################################################
  24. #
  25. #  Links:  imrutils, imsutils, wopen
  26. #
  27. ############################################################################
  28.  
  29. link imrutils
  30. link imsutils
  31. link wopen
  32.  
  33. procedure main()
  34.    local imr
  35.  
  36.    imr := imstoimr(read())
  37.  
  38.    imropen(imr)
  39.  
  40.    write(pix2pat(&window, 0, 0, WAttrib("width"), WAttrib("height")))
  41.  
  42. end
  43.