XForms: Problem displaying images

Ravi Mehrotra (ravi@csnpl.ren.nic.in)
Tue, 14 Sep 1999 12:34:34 +0530

# To subscribers of the xforms list from Ravi Mehrotra <ravi@csnpl.ren.nic.in> :

Hi,

I am using XForms version 0.89 on a Linux 2.2.6 Pentium II machine.
I have a True color image with depth 16. I use the following code to
display the image in a canvas.

void load_cb(FL_OBJECT *ob, long data)
{
FL_IMAGE *pic;

pic=flimage_alloc();
pic=flimage_load("picture.ppm");
pic->display(pic, FL_ObjWin(canvas));
XFlush(fl_display);
sleep(1);
fl_set_object_position(canvas,canvas->x+50,canvas->y+50);
pic->display(pic, FL_ObjWin(canvas));
XFlush(fl_display);
}

The picture shows up OK. However, after the canvas is moved, the
picture appears as a faint ghost without color. This happens if I
start my Xserver with depth 16 or 24. The problem disappears if
I start up the Xserver with depth 8 but then I am limited in colors.

Is there a bug or am I doing something wrong ? I will appreciate any
help.

Thanks.

Ravi Mehrotra
National Physical Laboratory
New Delhi 110012
India
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/