home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 19 Printer / 19-Printer.zip / PRPCX2.ZIP / PRPCX.PS < prev   
Text File  |  1989-11-12  |  763b  |  49 lines

  1.  
  2. %!PS-Adobe 1.0
  3. %%Title:
  4. %%Creator:
  5. %%Pages: 1
  6. %%BoundingBox:
  7. %%EndComments
  8.  
  9. gsave
  10.             
  11.         % the next item translates the image from
  12.         % top-to-bottom .PCX format to PS bottom-to-top
  13. /xform 
  14. {
  15.     [ bmap_wid 0 0 bmap_hgt neg 0 bmap_hgt ]
  16. } def
  17.  
  18. /readproc
  19. {
  20.     { currentfile picstr readhexstring pop }
  21. } def
  22.  
  23. /scaleit
  24. {
  25.     x y translate
  26.     bmap_wid bmap_hgt scale
  27.     72 res div 72 res div scale
  28.     scx scg mul scy scg mul scale
  29.  
  30.     /picstr bmap_wid 8 idiv string def
  31.  
  32. } def
  33.  
  34. /imagedata
  35. {
  36.     bmap_wid bmap_hgt bpp xform readproc image
  37. } def
  38.  
  39. /showit
  40. {
  41.     grestore
  42.     showpage
  43. } def
  44.  
  45. % Will generate <bmap_hgt> lines of image data, 
  46. % each with <bmap_wid>/8 bytes of data (in hex).
  47. %%EndProlog
  48.  
  49.