[comp.windows.x] Displaying Sun Raster files inside Viewport widget

nancie@hal.CSS.GOV (Nancie Matson) (04/19/91)

I'm trying to read in a SunRaster file into an XImage structure
so that I can display it on a Pixmap, and later to the screen.  I
keep getting a BadMatch error when I try to put the XImage
structure onto the Pixmap.  

Has anyone tried to do this?  Reading the SunRaster was easy,
except there is no information about the bitmap_unit, etc.
I've tried all the options (8,16 and 32), but none seems to
make a difference.

I create a Pixmap of depth 1 with the same width and height of
the image (it's bigger that the screen).  I also create the
XImage structure with the same width, height, and depth, so I'm
not sure what the BadMatch is referring to.

I'd be happy to send some code, if anyone has any insights.

Please e-mail to save Net band-width :^)


Thanks,

---------------------------------------------------------------
Nancie P. Matson    NET:  nancie@hal.CSS.GOV
ENSCO INC.          MAIL: 445 Pineda Ct.  Melbourne, Fl.  32940
---------------------------------------------------------------