I am looking for an include or header file to transfer an image(*.bmp)
in to my c program.is there any tool for this purpose?
If I am understanding your requirements correctly, 010 Editor (an
inexpensive Windows application) can do this interactively or
programmatically.
See
http://www.sweetscape.com/010editor/
For example, the tool exported a .bmp file exported to a C source
file:
//------------------------------------------------------------
//----------- Created with 010 Editor -----------
//------
www.sweetscape.com/010editor/ ------
//
// File : C:\WINNT\Blue Lace 16.bmp
// Address : 0 (0x0)
// Size : 1272 (0x4F8)
//------------------------------------------------------------
unsigned char hexData[1272] = {
0x42, 0x4D, 0xF8, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x0E,
0x00, 0x00, 0xC3, 0x0E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00,
0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0xC0, 0xC0,
0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00,
0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x44, 0x44,
0x44, 0x4C, 0x44, 0x44, 0x44, 0x44, 0xC4, 0xC4,
0x44, 0x44, 0x44, 0x44, 0xC4, 0xC4, 0x44, 0x44,
/* ... */
0x44, 0x44, 0x44, 0x44, 0xC4, 0x4C, 0x44, 0x44,
0x44, 0x44, 0xCC, 0xC4, 0x44, 0x44, 0x00, 0x00
};