This program uses the GBM library to load a bitmap, and then displays it in an XWindows window.
usage: xgbmv [-display dpy] [-geometry geom] [-h] [-e] fn.ext{,opt}
flags: -display dpy XWindows display specification
-geometry geom XWindows geometry specification
-h halftone (if PseudoColor visual)
-e error-diffuse (if PseudoColor visual)
fn.ext{,opt} bitmap filename with options
... bitmap formats listed here
opt's bitmap format specific options
The Window stays up until q, x or Esc
is pressed when the window has focus.
Or the middle (third) mouse button is clicked upon it.
This program supports 8x8x8 24bpp TrueColor or DirectColor visuals. It also supports 8bpp PseudoColor visuals.
Its not optimally efficient. On a TrueColor or DirectColor visual it ships 24bpp data over the network, whether or not the bitmap is 24bpp. Similarly, for when using a PseudoColor visual, 8bpp data is sent.
The image display quality isn't brillant on PseudoColor visuals. We allocate a 2x2x2 palette and either truncate, halftone or error-diffuse to this palette.
This even happens for palettised images. By having a small, common palette, the odds of being able to display a larger number of images at the same time, without running out of color map entries is significantly improved.
This document, and the XGBMV package are available from my home page at http://www.nyangau.fsnet.co.uk/.
The package contains this document and full source to the XGBMV program. Also available from my site is the GBM module that this code uses.
The source code is highly portable C code.
The only UNIX I've tested on is Linux.
Other UNIXes probably need XLIBS changing in the makefile.
This program, including its source code, are public domain. Caveat Emptor.