[comp.lang.c] Turboc getimage to postscript

spring@unix.cis.pitt.edu (Michael B. Spring) (11/28/90)

I am trying to export a screen dump from a VGA monitor to postscript.
The postscript code is rather simple, and works successfully using
getpixel to compose the fourbit samples to be read by the postscript
image operator.

The problem is that the fastest I can get the image into ps for is
about 15 -20 seconds -- doing 479x639 getpixels and packing them 4
bits at a time into arrays for output using fwrite.

If I use getimage, I can write the same information in 5 seconds or so.
The problem is that the data in the getimage buffer is 6 bytes header, 
followed by the data for each bit plane separately.  This is nice for
color separations, possibly, but not useful for image.

Ultimately, I will write a routine to recreate in ps what I have
depicted on the graphics screen, but I need to buy six months or so
with the screen dump.  I would like the write time to be closer to
3-5 seconds rather than 20-30 seconds.

THUS THE QUESTION?  does anyone know a fast way to collect the bit plane
information or to manipuate the getimage buffer information so as to write
out the data to a file compatible with the needs of postscript -- with all
four bits/pixel together.  ALTERNATIVELY, it appears that teh colorimage
operator in PS may provide a solution -- there is a caution about it not
being available pre release 38.  Does anyone have experience or sample
code for its use to an apple laserwriter for the purpose described.

I would appreciate email responses to spring@idis.lis.pitt.edu  -- it
would make it easier for me to find as I am not a regular reader of this
newsgroup.
 

With many thanks -- MBSpring