Monday, January 11, 2010

X BitMap File

In GIMP if you want to convert the bitmap file to C code it possible.
Save your bitmap file as .xbm extension file.
Format :
XBM data typically appears in headers (.h files) and consist of a series of static unsigned char arrays containing the monochrome pixel data. They feature one array per image stored in the header.
The following piece of C code exemplifies an XBM file:


#define test_width 16
#define test_height 7
static char test_bits[] = {
0x13, 0x00, 0x15, 0x00, 0x93, 0xcd, 0x55, 0xa5, 0x93, 0xc5, 0x00, 0x80,
0x00, 0x60 };
http://en.wikipedia.org/wiki/X_BitMap

Thanks to Wikipedia for the information.

No comments:

Post a Comment