home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / postscri / 6140 < prev    next >
Encoding:
Internet Message Format  |  1993-01-03  |  1.3 KB

  1. Path: sparky!uunet!portal!rtbrain!rightbrain.com
  2. From: glenn@rightbrain.com (Glenn Reid)
  3. Newsgroups: comp.lang.postscript
  4. Subject: Re: how to reverse video of the bitmap image?
  5. Message-ID: <991@rtbrain.rightbrain.com>
  6. Date: 3 Jan 93 20:18:18 GMT
  7. References: <1993Jan3.141633.20760@eng.ufl.edu>
  8. Sender: glenn@rightbrain.com
  9. Reply-To: glenn@rightbrain.com
  10. Distribution: usa
  11. Lines: 29
  12.  
  13. zzang writes
  14. > Hello,
  15. > can someone tell me how to reverse video of the image?
  16. > for example,
  17. > /data <....> def
  18. > 8 8 1 [8 0 0 8 0 0] {data} image showpage
  19. > now how to reverse video the above image without
  20. > change the "data"?
  21.  
  22. The simplest way is to precede the code with this:
  23.  
  24. { 1 exch sub } settransfer
  25.  
  26. You should probably put "gsave" and "grestore" around it to keep this
  27. from affecting the rest of your document.  Also, you might want to
  28. be more careful to concatenate the transfer function with the existing
  29. one, sorta like this (see Green Book for more detail):
  30.  
  31. [ currenttransfer /exec load 1 /exch load /sub load ] cvx settransfer
  32.  
  33. Note: this only works with black-and-white images, which your example
  34. happens to be.  There is an analogous approach for colorimage.
  35.  
  36. --
  37.  Glenn Reid                NeXTmail: glenn@rightbrain.com
  38.  RightBrain Software        415-326-2974 (NeXTfax 326-2977)
  39.  Palo Alto, California        Electronic Frontier Foundation, member #054
  40.