🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7603

Re: Weird black prints

#7603
From: Ned Batchelder, PostScript Eng.
Date: Fri, 11 Nov 1988 16:33
25 lines
1497 bytes
The reason for the black page is not a bug in the printer: it is what your
PostScript program asked for. The transfer function is being inverted with
{ 1 exch sub } settransfer. When showpage executes, it performs the
equivalent of an erasepage, which sets the entire page image to white, but
the white is interpreted via the transfer function, so it actually ends up
as black.

There are two ways to fix this problem. Both involve changing the program
that generated the PostScript file (psraster?). The first is to not invert
the transfer function. This would involve inverting the hex data instead. This
is the right thing to do, because the way the transfer function was inverted
is bad: it should have taken into account the existing transfer function,
but it doesn't. It simply clobbered it. The second way to fix it is much
more likely to be the one picked, and that is simply to take the code:
	showpage
	grestore
	gsave
and make it be:
	grestore
	showpage
	gsave
That way the showpage executes in the graphic context that existed before 
the transfer function was changed, so the page will be erased properly.

--Ned.
Technical Details
Message-ID: <8811111334.AA13015@decwrl.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!purdue!decwrl!hannah.dec.com!batcheldern

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!purdue!decwrl!hannah.dec.com!batcheldern
From: batcheldern@hannah.dec.com (Ned Batchelder, PostScript Eng.)
Newsgroups: comp.lang.postscript
Subject: Re: Weird black prints
Message-ID: <8811111334.AA13015@decwrl.dec.com>
Date: 11 Nov 88 16:33:00 GMT
Organization: Digital Equipment Corporation
Lines: 25