🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #456

Problems with 2 and 4 bit color.

#456
From: Timothy Gallivan
Date: Mon, 05 Oct 1992 05:34
26 lines
1783 bytes
Hi,

I have been trying for quite some time to get Ghostscript to produce
REAL 2 and 4 bit images for a bitmapped driver I have written. No matter
what I try, Ghostscript refuses to stick 2 or 4 pixels in each byte of
the image it produces. I have been told that GS is capable of this, but
I sure can't figure out how.  Can anyone PLEASE give me a clue about
what is required to twist Ghostscript's arm in this matter.

It appears to me that calling gdev_mem_device_for_bits(4) and setting
the elements of the color_info structure to the appropriate 4-bit color
values (mainly depth=4) should be all that is necessary, but I can't get
it to work. All of this is done when the device is opened, after the
driver figures out what hardware it must write to. I have checked that
the proper routines are being called (mem_mapped4_copy_mono for
example), but I can make no sense out of the bitmap that GS produces.
For speed and memory reasons, I need to access the bitmap directly,
rather than through the higher level GS routines which return scan lines
one at a time.

By the way, the driver has it's own map_color_rgb and map_rgb_color
routines, which appear to be working correctly. Any help will be greatly
appreciated.

Tim Gallivan
timg@landau.ph.utexas.edu
Technical Details
Message-ID: <9210050534.AA01599@lifshitz.ph.utexas.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!lifshitz.ph.utexas.edu!timg

Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!lifshitz.ph.utexas.edu!timg
From: timg@lifshitz.ph.utexas.edu (Timothy Gallivan)
Subject: Problems with 2 and 4 bit color.
Message-ID: <9210050534.AA01599@lifshitz.ph.utexas.edu>
Summary: Can't write driver using the above.
Sender: gnulists@ai.mit.edu
Organization: University of Texas Center for Relativity
Distribution: gnu
Date: Mon, 5 Oct 1992 05:34:43 GMT
Approved: bug-ghostscript@prep.ai.mit.edu
Lines: 28