bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invert colors with ghostscript


From: Jeffrey H. Coffield
Subject: Re: Invert colors with ghostscript
Date: Tue, 08 Apr 2008 23:59:01 GMT
User-agent: Thunderbird 2.0.0.12 (X11/20080213)



Nuno J. Silva wrote:
I've been doing research on how to invert the colors of a document which
is being viewed with gv (or any other ghostscript-based viewer).
ATM, the only thing I found is a small trick which works with some
files, not all (adding the command "{1 exch sub} settransfer" at the
beginning  of the file), but this does not work with every file, and as
postscript and pdf documents are formats to be used with printers, not
screens, all of them are generated using white background and black
foreground (that being the right color set for printing), it would be,
IMHO, cleaner if this sort of "magic" was made by gv, or better, by
ghostscript.

So, I wonder if there's any ghostscript options to invert colors (white
is changed for black (and vice-versa), images are turned into negatives,
etc.).


Perhaps you need to also use setcolortransfer and redefine showpage to be something like this:

/showpage {showpage 0 0 pagewidth pageheight rectfill} bind def

to turn the background from white to black

Jeff C.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]