ImageGear for Java User Guide > ImageGear Imaging Formats Reference > ImageGear Supported File Formats Reference > XBM |
Full Name | XBM (X BitMap) |
Format ID | ImGearFormats.XBM |
File Extension(s) | *.xbm |
Data Type | Raster Image |
Data Encoding | ASCII |
IG Multipage Support | No |
IG Alpha Channel Support | No |
IG Platforms Support | WIN32, WIN64, Linux32, Linux64, MAC32, MAC64 |
None
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.
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.