This is contributed by Christophe Fiorio (fiorio@lirmm.fr)

It outlines a method you can use to to display an image in a form:

GC      fl_get_form_gc(FL_FORM *);
Window  fl_get_form_window(FL_FORM *);

 unsigned char *abuffer; /* this is an array containing the pixels of
                          * the image */
 int imagewidth,imageheight; 

 XImage *xi;
 GC drawgc;
 XColor    col[256];
 Colormap colormap;
 Window window;
 Display *display;
 int i;

 static FL_FORM *theinimage = NULL;

 #define X_MAX_COLOR 65535


 theinimage = fl_bgn_form(FL_NO_BOX,imagewidth,imageheight);
 fl_end_form();
 fl_show_form(theinimage,FL_PLACE_MOUSE,FL_TRANSIENT,NULL); 
  for(i = 0; i < 256; i++)	
   {
     col[i].pixel = i;
     col[i].flags = DoRed | DoGreen | DoBlue;
     col[i].red = (unsigned short)(i * X_MAX_COLOR/256);
     col[i].green = (unsigned short)(i * X_MAX_COLOR/256 );
     col[i].blue = (unsigned short)(i * X_MAX_COLOR/256 );
   }
  drawgc = fl_state[fl_get_form_vclass(theinimage)].gc[0];
  window = theinimage->window;
  display = FL_FormDisplay(theinimage);
  
  colormap = XCreateColormap(display,window,DefaultVisual(display,DefaultScreen(display)), 
			     AllocAll);
  XStoreColors(display,colormap,col,256);
  XSetWindowColormap(display,window,colormap); 

  xi = XCreateImage(display,DefaultVisual(display,DefaultScreen(display)),8,
                    ZPixmap,0,abuffer,width,height,XBitmapPad(display),width);
  XPutImage(display,window,drawgc,xi,0,0,0,0,xi->width,xi->height);
  XFree((char *)xi);

