🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #323

device props and gs 2.5

#323
From: Andy Fyfe
Date: Mon, 31 Aug 1992 03:36
64 lines
2663 bytes
I am running gs on an AT&T 3b1.  While it is a 32-bit machines, it doesn't
have a particularly large process size -- 2.5M is the limit.  Thus I want
to reduce the maximum bitmap that gs will use from the default 10M.

I tried the following:
    % cat band1.ps
    mark
    /OutputFile
    (/tmp/pb1.out)
    /HWResolution
    [200 200]
    /HWSize
    [1699 2200]
    /BufferSpace
    256000
    /MaxBitmap
    400000
    currentdevice putdeviceprops setdevice
    % gs -sDEVICE=pbmraw band1.ps phonbook.ps
The output does go to /tmp/pb1.out, and has the requested resolution.
However, it appears gs did use a bitmap -- it did not use any temp files,
and enough memory to suggest the full 450k bitmap.

I also tried the following.  It differs from the above in using 
"(pbmraw) finddevice" rather than "currentdevice".
    % cat band2.ps
    mark
    /OutputFile
    (/tmp/pb2.out)
    /HWResolution
    [200 200]
    /HWSize
    [1699 2200]
    /BufferSpace
    256000
    /MaxBitmap
    400000
    (pbmraw) finddevice putdeviceprops setdevice
    % gs -dNODISPLAY band2.ps phonbook.ps
In this case gs does appear to not use a bitmap, as it used less memory
and 2 temporary files.

The two output files differ, however.  From displaying the pbm files,
it appears the first (where gs apparently used the bitmap) has a few
random bytes.

If the -dNODISLAY is changed to -sDEVICE=<device>, where <device> is
anything but pbmraw, then the behaviour is unchanged.  If <device>
is pbmraw, then this second case behaves exactly like the first.

By the way, the pbm file generated with
    % gs -sDEVICE=pbmraw -r200 -sOutputFile=/tmp/pb.out phonbook.ps
is identical to pb2.out (which is why band?.ps uses a width of 1699
rather than 1700, to match what the above ends up using).

This is reproducible with gs on a sun4.  The file pb2.out is identical
to what was generated on the 3b1.  The file pb1.out is not; however,
it again differs from pb2.out in a couple of bytes.

Am I doing something wrong?  I would like a file like band1.ps that
just reduces the MaxBitmap and BufferSpace for the current device,
that way it can be easily included among the other given ps files.

Andy Fyfe					andy@cs.caltech.edu
Technical Details
Message-ID: <9208310336.AA05738@kodiak.cs.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!scp.caltech.edu!andy

Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!scp.caltech.edu!andy
From: andy@scp.caltech.edu (Andy Fyfe)
Subject: device props and gs 2.5
Message-ID: <9208310336.AA05738@kodiak.cs.caltech.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 31 Aug 1992 03:36:23 GMT
Approved: bug-ghostscript@prep.ai.mit.edu
Lines: 65