From MAILER-DAEMON Sun Apr 06 11:18:02 2008
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1JiWd8-0003kH-4j
	for mharc-bug-ghostscript@gnu.org; Sun, 06 Apr 2008 11:18:02 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1JiPFW-0008Td-Ja
	for bug-ghostscript@gnu.org; Sun, 06 Apr 2008 03:25:10 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1JiPFN-0008SV-R8
	for bug-ghostscript@gnu.org; Sun, 06 Apr 2008 03:25:09 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1JiPFN-0008SS-LI
	for bug-ghostscript@gnu.org; Sun, 06 Apr 2008 03:25:01 -0400
Received: from moderators.individual.net ([130.133.4.7])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <news@cuese.datemas.de>) id 1JiPFN-0003oQ-Ab
	for bug-ghostscript@gnu.org; Sun, 06 Apr 2008 03:25:01 -0400
Received: from news.datemas.de ([193.201.53.67] helo=cuese.datemas.de)
	by moderators.individual.net (Exim 4.69)
	for gnu-ghostscript-bug@moderators.isc.org with esmtp
	(envelope-from <news@cuese.datemas.de>)
	id <1JiPFJ-0004vu-AW>; Sun, 06 Apr 2008 09:24:57 +0200
Received: by cuese.datemas.de (Postfix, from userid 9)
	id E2CB13040E7; Sun,  6 Apr 2008 09:24:55 +0200 (CEST)
To: gnu-ghostscript-bug@moderators.isc.org
Path: news.datemas.de!not-for-mail
From: nunojsilva@invalid.invalid (Nuno J. Silva)
Newsgroups: gnu.ghostscript.bug
Date: Sun, 06 Apr 2008 08:24:09 +0100
Organization: Datemas.de http://www.datemas.de
Lines: 28
Message-ID: <87tzifxx7q.fsf@invalid.invalid>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Trace: news.datemas.de
	qPpNuhbWoZFLZe1Ks93FfedlhlL/fjYqkPQOqy3jda9wlbntgsLJakkWxCatKMEDh35J1vxZR3zjx8Rk2UoZSBck++Lq+KFXep6Z1SGj4ufLWEaSMs3us8WUEGmaCJdnBgNp1f4l0w2HjyYC5SNMnSQkgYc6Bx/KYIMm8j7O6I4=
X-Complaints-To: abuse@datemas.de
NNTP-Posting-Date: Sun, 6 Apr 2008 07:24:54 +0000 (UTC)
Cancel-Lock: sha1:7LMkKdaRkN+UiotfkeIgFwsPPqw=
User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux)
Content-Transfer-Encoding: quoted-printable
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3)
X-Mailman-Approved-At: Sun, 06 Apr 2008 11:18:01 -0400
Cc: 
Subject: Invert colors with ghostscript
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 06 Apr 2008 07:25:10 -0000


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).=20

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.).

--=20
Nuno J. Silva (aka njsg)
LEIC student at Instituto Superior T=C3=A9cnico
Lisbon, Portugal
Homepage: http://njsg.no.sapo.pt/
Gopherspace: gopher://sdf-eu.org/11/users/njsg
Registered Linux User #402207 - http://counter.li.org

-=3D-=3D-
Windows 95 has been operating for 2 hours, 32 minutes. No errors
reported. CALL GUINESS BOOK OF WORLD RECORDS NOW!



From MAILER-DAEMON Tue Apr 08 20:00:57 2008
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1JjNkG-0006lV-Mx
	for mharc-bug-ghostscript@gnu.org; Tue, 08 Apr 2008 20:00:56 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1JjNkE-0006jM-Bv
	for bug-ghostscript@gnu.org; Tue, 08 Apr 2008 20:00:54 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1JjNkB-0006hh-JI
	for bug-ghostscript@gnu.org; Tue, 08 Apr 2008 20:00:52 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1JjNkB-0006he-GE
	for bug-ghostscript@gnu.org; Tue, 08 Apr 2008 20:00:51 -0400
Received: from pinatubo-2.switch.ch ([130.59.1.10] helo=pinatubo.switch.ch)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <news@newssvr11.news.prodigy.net>) id 1JjNkA-0002s9-U3
	for bug-ghostscript@gnu.org; Tue, 08 Apr 2008 20:00:51 -0400
Received: from [216.82.250.83] (helo=mail120.messagelabs.com)
	by pinatubo.switch.ch with esmtp (Exim 4.63)
	(envelope-from <news@newssvr11.news.prodigy.net>) id 1JjNih-0000PJ-2L
	for gnu-ghostscript-bug@moderators.isc.org;
	Wed, 09 Apr 2008 01:59:19 +0200
X-VirusChecked: Checked
X-Env-Sender: news@newssvr11.news.prodigy.net
X-Msg-Ref: server-6.tower-120.messagelabs.com!1207699155!22290853!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,-
X-Originating-IP: [144.160.20.53]
Received: (qmail 20218 invoked from network); 8 Apr 2008 23:59:16 -0000
Received: from sbcsmtp6.sbc.com (HELO mlph073.enaf.sfdc.sbc.com)
	(144.160.20.53)
	by server-6.tower-120.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2008 23:59:16 -0000
Received: from enaf.sfdc.sbc.com (localhost.localdomain [127.0.0.1])
	by mlph073.enaf.sfdc.sbc.com (8.14.0/8.14.0) with ESMTP id
	m38NxE1C029849 for <gnu-ghostscript-bug@moderators.isc.org>;
	Tue, 8 Apr 2008 19:59:15 -0400
Received: from clph029.sldc.sbc.com (clph029.sldc.sbc.com [132.201.23.26])
	by mlph073.enaf.sfdc.sbc.com (8.14.0/8.14.0) with ESMTP id
	m38Nx7wU029806 for <gnu-ghostscript-bug@moderators.isc.org>;
	Tue, 8 Apr 2008 19:59:07 -0400
Received: from sldc.sbc.com (localhost.localdomain [127.0.0.1])
	by clph029.sldc.sbc.com (8.14.0/8.14.0) with ESMTP id m38Nx7I1013499
	for <gnu-ghostscript-bug@moderators.isc.org>;
	Tue, 8 Apr 2008 18:59:07 -0500
Received: from newssvr11.news.prodigy.net (flpi143-int.ffdc.sbc.com
	[207.115.30.211])
	by clph029.sldc.sbc.com (8.14.0/8.14.0) with ESMTP id m38Nx2um012963
	for <gnu-ghostscript-bug@moderators.isc.org>;
	Tue, 8 Apr 2008 18:59:02 -0500
Received: from newssvr11.news.prodigy.net (newssvr11.news.prodigy.net
	[127.0.0.1])
	by newssvr11.news.prodigy.net (8.14.0/8.14.0) with ESMTP id
	m38Nx2CN022435 for <gnu-ghostscript-bug@moderators.isc.org>;
	Tue, 8 Apr 2008 19:59:02 -0400
Received: from localhost (localhost [[UNIX: localhost]])
	by newssvr11.news.prodigy.net (8.14.0/8.14.0/Submit) id m38Nx19w022434; 
	Tue, 8 Apr 2008 19:59:01 -0400
To: gnu-ghostscript-bug@moderators.isc.org
Path: cbb6f965!not-for-mail
From: "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com>
User-Agent: Thunderbird 2.0.0.12 (X11/20080213)
MIME-Version: 1.0
Newsgroups: gnu.ghostscript.bug
References: <mailman.10069.1207495082.18990.bug-ghostscript@gnu.org>
In-Reply-To: <mailman.10069.1207495082.18990.bug-ghostscript@gnu.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 28
Message-ID: <9FTKj.1238$CW.314@newssvr11.news.prodigy.net>
NNTP-Posting-Host: 216.103.32.162
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr11.news.prodigy.net 1207699141 ST000 216.103.32.162 (Tue,
	08 Apr 2008 19:59:01 EDT)
NNTP-Posting-Date: Tue, 08 Apr 2008 19:59:01 EDT
Organization: at&t http://my.att.net/
X-UserInfo1: SCSYQN_@OXVMBUPYGJJ\OTTDEB\@PD\MNPWZKB]MPXHNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL
Date: Tue, 08 Apr 2008 23:59:01 GMT
X-detected-kernel: by monty-python.gnu.org: Genre and OS details not
	recognized.
Cc: 
Subject: Re: Invert colors with ghostscript
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Apr 2008 00:00:54 -0000



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.



From MAILER-DAEMON Mon Apr 14 07:33:54 2008
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1JlMwc-0007vs-Pr
	for mharc-bug-ghostscript@gnu.org; Mon, 14 Apr 2008 07:33:54 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1JlMwa-0007t7-RH
	for bug-ghostscript@gnu.org; Mon, 14 Apr 2008 07:33:52 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1JlMwZ-0007qL-3O
	for bug-ghostscript@gnu.org; Mon, 14 Apr 2008 07:33:52 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1JlMwY-0007q1-UO
	for bug-ghostscript@gnu.org; Mon, 14 Apr 2008 07:33:50 -0400
Received: from web15902.mail.cnb.yahoo.com ([202.165.103.83])
	by monty-python.gnu.org with smtp (Exim 4.60)
	(envelope-from <zhaoshuzi@yahoo.com.cn>) id 1JlMwX-0007r8-RX
	for bug-ghostscript@gnu.org; Mon, 14 Apr 2008 07:33:50 -0400
Received: (qmail 58472 invoked by uid 60001); 14 Apr 2008 11:33:35 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn;
	h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
	b=pCTwSYZSXTlBCbfrFHHCg4o75VMbnoWx+1IN0ynFEIjki24cXLCKbs+2DoXBruTd4E1Jmu8J3zXvqn7WVeI94tdv9ww0AYhL3aM5ADAxE71+g27h7avvaw7P69DgEvsDVac9lF9IYINfy4FAqeXDIVErTWD2APt969GctpGGQYs=;
X-YMail-OSG: YNF503MVM1n7ULySsj_Mtart_q7rkRWrpaFVDs7qbLwzJAnhp.4FJB7tE1sJq8spkBUsE6bu4ZV0i2EkEI2ulfrM6Jg3BIn5Eknk8f9DWEPxE55PkjU-
Received: from [58.35.146.24] by web15902.mail.cnb.yahoo.com via HTTP;
	Mon, 14 Apr 2008 19:33:35 CST
Date: Mon, 14 Apr 2008 19:33:35 +0800 (CST)
From: shuzi zhao <zhaoshuzi@yahoo.com.cn>
To: bug-ghostscript@gnu.org
MIME-Version: 1.0
Message-ID: <601408.8511.qm@web15902.mail.cnb.yahoo.com>
X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X
	10.2-10.4) (2)
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.5
Subject: How can i control the color ?
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Apr 2008 11:33:53 -0000

Hi all,
  I'm using ghostscript to print something to a color laserjet in my program, but I don't know how to specify the black-and-white property. Does anyone know which parameter should I use in the invoking command ?
   
  Thank you all!
  Kevin


       
---------------------------------
 ÑÅ»¢ÓÊÏä£¬ÄúµÄÖÕÉúÓÊÏä£¡

