XForms: Display 24 bit images?

Sundar Vedula (srv@cs.cmu.edu)
Fri, 22 May 1998 17:07:16 -0400 (EDT)

# To subscribers of the xforms list from Sundar Vedula <srv@cs.cmu.edu> :

This is really an X question, but I guess some of you might know the
answer:

I am trying to display a 24 bit image in a TrueColor visual, in an Xforms
canvas. After the initializations, I call XMatchVisualInfo, then
XCreateImage , and then XCreatePixmap. My Xcreateimage call is

image = XCreateImage (display, visual, 24, ZPixmap, 0, data, width,
height, 32, 3*width);

I am running on an SGI, and my visual is TrueColor(confirmed). However,
the image returned is 32 bits per pixel, and therefore my image is getting
compressed to 2/3 its width on the screen. The image itself looks
greyscale, so only one band seems to be displayed.

Does anyone have advice for me? (or even better, code that works for
X display of truecolor images).

Thanks,
Sundar Vedula
Carnegie Mellon University

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/