ImageGear for C and C++ on Windows v20.3 - Updated
XBM
User Guide > File Formats and Compressions > File Formats > File Formats Reference > XBM

Full Name XBM (X BitMap)
Format ID IG_FORMAT_XBM = 43
File Extension(s) *.xbm
Data Type Raster Image
Data Encoding ASCII
Color Profile Support No
Multi-Page Support No
Alpha Channel Support No

ImageGear Supported Versions:

ImageGear Supported Features:

ImageGear Read Support:

ImageGear Write Support:

ImageGear Filter Control Parameters:

None

Comments:

The XBM format is intended as a convenient storage method for small monochrome images, for example, cursor and icon bitmaps. It can, however, support images of any size, but since it supports no native compression scheme, an exterior compression program is used when compacting is desired. The bitmap data is stored as ASCII data with C language syntax, making the file easy to insert into C program code. XBM data can be stored as a standalone graphics file, or within a C program header file. See also XPM, XWD.

XBM files begin with two to four #define statements in substitution of a header. These identify the image width and height, and optionally, the coordinates of a Hotspot, if one exists.

The image data follows and is more free-form than the other bitmap data formats described in this chapter. It consists of one variable-length static array of pixel values. Each value (in version 11) consists of one byte of data, and therefore represents 8 1-bit pixels. The first pixel (0,0) is represented by the high bit of the first byte in the array. Due to this one-array format, there is nothing in the data that explicitly marks the rows of the bitmap.

References Used

Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.

Kay, David C. and John R. Levine. Graphics File Formats. Windcrest Books, 1992.

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats. Sebastopol, CA: O'Reilly & Associates, Inc., 1994.

Is this page helpful?
Yes No
Thanks for your feedback.