[ba.windows.x] XGetImage screen dump from SUN3 to non-PostScript Tek printer

chapman@lll-lcc.UUCP (Carol Chapman) (10/11/89)

Well, I'm back from vacation, and am forced to look once more at why I
can't seem to use XGetImage to make a screen dump to a non-PostScript
printer (we have a Tektronix color printer).  People on the net have
given me some good advice, and I think I've made some progress, but
"no cigar".

Our computers are SUN3's.  I am writing to a SUN rasterfile which I
then send to the printer using "lpr -v -Ptcpr screen_ras.ras".  The
printer no longer chokes, but the image I'm trying to send comes out
as a blank piece of paper.  When I run xviewsun to examine the
rasterfile, I get:

Hmm, screen_ras.ras is a 1136x880 color image with 8 planes.  ( <- correct)
Image only used 2 of 256 colors in its colormap.  ( <- something wrong here)

Then xviewsun shows me a window with nothing in it.  I have the
following settings in the XImage structure:
format = ZPixmap
depth = 8
bits_per_pixel = 8
byte_order = 2 (MSB)
bitmap_unit = 16
bitmap_bit_order = 2
bitmap_pad = 16

By default, red_mask, green_mask and blue_mask are set to 0.  Since
I'm using PseudoColor, do I need to change them?  I tried setting them
each to 8, but it made no difference.

Am I using the correct settings within the XImage structure?  They
*seem* right to me for a SUN3.  Any guesses as to what is wrong??  I
am really sick of looking at this problem!!

thanx,
carol

-- 
-------------------------------------------------------------------------------
Livermore Lab            (chapman@lll-crg.llnl.gov or chapman@lll-lcc.llnl.gov)
P.O. Box 808, L-153      Tel. (415) 423-7876
Livermore, CA  94550     "Never own anything that you have to FEED or PAINT."