home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!rtbrain!rightbrain.com
- From: glenn@rightbrain.com (Glenn Reid)
- Newsgroups: comp.lang.postscript
- Subject: Re: how to reverse video of the bitmap image?
- Message-ID: <991@rtbrain.rightbrain.com>
- Date: 3 Jan 93 20:18:18 GMT
- References: <1993Jan3.141633.20760@eng.ufl.edu>
- Sender: glenn@rightbrain.com
- Reply-To: glenn@rightbrain.com
- Distribution: usa
- Lines: 29
-
- zzang writes
- > Hello,
- > can someone tell me how to reverse video of the image?
- > for example,
- >
- > /data <....> def
- > 8 8 1 [8 0 0 8 0 0] {data} image showpage
- >
- > now how to reverse video the above image without
- > change the "data"?
-
- The simplest way is to precede the code with this:
-
- { 1 exch sub } settransfer
-
- You should probably put "gsave" and "grestore" around it to keep this
- from affecting the rest of your document. Also, you might want to
- be more careful to concatenate the transfer function with the existing
- one, sorta like this (see Green Book for more detail):
-
- [ currenttransfer /exec load 1 /exch load /sub load ] cvx settransfer
-
- Note: this only works with black-and-white images, which your example
- happens to be. There is an analogous approach for colorimage.
-
- --
- Glenn Reid NeXTmail: glenn@rightbrain.com
- RightBrain Software 415-326-2974 (NeXTfax 326-2977)
- Palo Alto, California Electronic Frontier Foundation, member #054
-