[comp.windows.x] FBM utilities

ron@woan.austin.ibm.com (Ronald S. Woan) (08/31/89)

Is there a utility to display a Fuzzy BitMap (FBM) file in an X-Window
or convert it to an X-Bitmap?  Something similar to XPBM is what I am
looking for, except with color support...

Alternatively, is there a way of displaying sunraster files on an
IBM RT running X11R3?

						Thanks,
						Ron



+---All Views Expressed Are My Own And Are Not Necessarily Shared By---+
+---------------------------My Employer--------------------------------+
+ Ronald S. Woan                             ron@woan.austin.ibm.com   +
+ outside       @cs.utexas.edu:ibmaus!auschs!woan.austin.ibm.com!ron   +

hadley@ics.uci.edu (T. Hadley) (09/06/89)

In article <622@awdprime.UUCP> ron@woan.austin.ibm.com (Ronald S. Woan) writes:
>Is there a utility to display a Fuzzy BitMap (FBM) file in an X-Window
>or convert it to an X-Bitmap?  Something similar to XPBM is what I am
>looking for, except with color support...
>
>Alternatively, is there a way of displaying sunraster files on an
>IBM RT running X11R3?

   My system:
   Sun 3/110 (cgfour0), 3/60 (cgfour0), SUNOS 4.0.1, X11R3:
   (IBM RT? Well, I don't know.. but read on)

   Looking at the source code for xwud/xwd I said to myself,
      "Why can't I code a quick and dirty `write_x11' FBM routine using
       xwud/xwd's file format so I can view with xwud?"

   I did. But then I noticed that xwud doesn't handle color correctly.
   That is, it uses the default colormap.
   
   HOWEVER .. There was a routine in xuwd, "ModifyColors", that 
   was commented out (portability reasons??).
   Quick as a flash, I uncommented it, made a few quick corrections,
   and ( .. fanfare .. ) I now have a color displayer for FBM files!

   The next logical step was to figure out how to put a full color
   bitmap on the root screen of my color window. So I added to xwud.c
   XPutImage(dpy, XDefaultRootWindow(dpy), ... (backing_store WhenMapped?)
   ..., and XSetCloseDownMode to hold the color resources I'd allocated 
   and (.. fanfare2 ..) :
   I'm looking at Monument Valley in 128 colors as my background! 
   (128 because I like to leave 126 for other applications 
   that alloc but don't install colormaps).

   So with my `setup' I can use the FBM routines, view the results using
   my modified xwud, and set the root background as desired. FBM gives
   me access to all those gif files lying around and makes it trivial
   to stretch them out to full screen (1192x900). Oh yeah, FBM handles
   sunraster so I can use those, too.

   Note the machine/os/X11 I'm using above. Since the X11 image format is
   not currently fully supported (yes? no?) I dare say there may be
   some major portability problems with what I've outlined above.
   But, hey, it works for me.

   I suspect that R4 will better support the image format.

>+ Ronald S. Woan                             ron@woan.austin.ibm.com   +
>+ outside       @cs.utexas.edu:ibmaus!auschs!woan.austin.ibm.com!ron   +
   

   



--
Tedd Hadley (hadley@ics.uci.edu)