Thread View: comp.lang.postscript
3 messages
3 total messages
Started by zzang
Sun, 03 Jan 1993 14:16
how to reverse video of the bitmap image?
Author: zzang
Date: Sun, 03 Jan 1993 14:16
Date: Sun, 03 Jan 1993 14:16
13 lines
659 bytes
659 bytes
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"?
Thanks very much in advance!
--zhuo
Re: how to reverse video of the bitmap image?
Author: Ben Goren
Date: Sun, 03 Jan 1993 19:12
Date: Sun, 03 Jan 1993 19:12
3 lines
475 bytes
475 bytes
Is there anything wrong with {1 exch sub}settransfer?
b&
Re: how to reverse video of the bitmap image?
Author: Glenn Reid
Date: Sun, 03 Jan 1993 20:18
Date: Sun, 03 Jan 1993 20:18
29 lines
1386 bytes
1386 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads