Article View: gnu.ghostscript.bug
Article #354Setting device props in Ghostscript 2.5
From: L. Peter Deutsch
Date: Tue, 08 Sep 1992 04:14
Date: Tue, 08 Sep 1992 04:14
34 lines
2129 bytes
2129 bytes
In <9208310527.AA10317@cookie-crisp>
<9208310336.AA05738@kodiak.cs.caltech.edu>, Andy Fyfe asks why
setting device properties (specifically, BufferSpace and MaxBitmap)
in a separate file using putdeviceprops doesn't seem to take effect,
and why PBM output with and without using a band file seems to differ
slightly.
Setting device properties doesn't have the proper effect because of a
bug in Ghostscript 2.5, which will be corrected in 2.5.1. Note,
however, that Ghostscript always allocates the amount of buffer
memory implied by command line parameters; a subsequent
putdeviceprops may free the memory and reallocate it with a different
size, but if the initial allocation fails, Ghostscript will signal a
VMerror and stop. Fyfe suggests using a little prefix file that
invokes putdeviceprops, but a better way to handle this is with
Ghostscript's new ability (as of 2.5) to interpret a file as
containing additional switches. For example, if the file band1
contains
-sBufferSpace=400000 -sMaxBitmap=400000
then
gs @band1 file.ps
is equivalent to
gs -sBufferSpace=400000 -sMaxBitmap=400000 file.ps
Of course the customary Unix shell provides equivalent facilities,
but the DOS shell does not.
As for the other question, the output differs because in one case,
unused bits in the last byte (if the width is not a multiple of 8
bits) are always zero, and in the other case, they may contain
garbage.
L. Peter Deutsch :: Aladdin Enterprises :: P.O. box 60264, Palo Alto, CA 94306
ghost@aladdin.com, ...decwrl!aladdin!ghost ; voice 415-322-0103 ; fax 322-1734
"Implementation is the sincerest form of flattery." new--->^^^^^^^^^^^^
Technical Details
Message-ID:
<9209072114.1.UUL1.3#5127@aladdin.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!aladdin.COM!ghostShow Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!aladdin.COM!ghost From: ghost@aladdin.COM (L. Peter Deutsch) Subject: Setting device props in Ghostscript 2.5 Message-ID: <9209072114.1.UUL1.3#5127@aladdin.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 8 Sep 1992 04:14:20 GMT Approved: bug-ghostscript@prep.ai.mit.edu Lines: 38