X Bitmap (XBM)

 

General Description

XBM is a simple monochrome text based bitmap format that is primarily intended for storage of cursor and icon bitmaps for use in the X graphics user interface. The data is formatted and stored as a C language file and can directly be compiled into a software program.

 

Supporting Platforms and Applications

This format is popular under UNIX for storage of icons.

 

PMView Support

PMView reads X10 and X11 X Window Bitmaps. The X10 format is obsolete and consequently PMView will only save XBM files in the X11 format.

 

When reading XBM files, PMView scans the first 20 rows and seeks for the width, height, and image data. PMView tries to find the following definitions:

 

#define FOO_width

#define FOO_height

static char FOO_bits[] = {

 

Where FOO is the name of the bitmap.

 

If PMView cannot find these definitions within the 20 first rows of the file, it will stop searching and not accept the file as a valid XBM file (though it is still possible that it is valid). The file may, for instance, have more than20 lines of C language source code before the definitions and bitmap data. If this is the case you can edit the file with a standard text editor and move the bitmap definition to the beginning of the file in order to make PMView recognize it as an XBM file.