Hello all,
I need to display an icon image on the cell of a table.
However, the displayed image is always empty. I find the reason is that the created char arrays are different.
For example:
extern const unsigned char penguin[]={
0x42,0x4d,0xe2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,
0x00,0x00,0x90,0x00,0x00,0x00,0x6d,0x0b,0x00,0x00,0x6d,0x0b,0x00,0x00,0x07,0x00,
0x00,0x00,0x07,0x00,0x00,0x00,0xdc,0xc0,0xb2,0x00,0x80,0x80,0x80,0x00,0x00,0x00,
0x00,0x00,0xc0,0xc0,0xc0,0x00,0x10,0x10,0x10,0x00,0xff,0xff,0xff,0x00,0x08,0xa0,
0xe0,0x00,0x00,0x66,0x61,0x22,0x22,0x21,0x66,0x00,0x06,0x66,0x66,0x55,0x22,0x26,
0x66,0x60,0x66,0x66,0x65,0x55,0x55,0x26,0x66,0x66,0x66,0x66,0x65,0x55,0x55,0x36,
0x66,0x66,0x06,0x66,0x55,0x55,0x55,0x56,0x22,0x60,0x00,0x63,0x55,0x35,0x55,0x55,
0x22,0x20,0x00,0x23,0x55,0x35,0x55,0x55,0x22,0x20,0x00,0x02,0x55,0x33,0x55,0x55,
0x22,0x10,0x00,0x02,0x55,0x53,0x55,0x55,0x22,0x00,0x00,0x01,0x25,0x55,0x55,0x51,
0x21,0x00,0x00,0x00,0x21,0x55,0x55,0x52,0x10,0x00,0x00,0x00,0x02,0x66,0x55,0x22,
0x00,0x00,0x00,0x00,0x02,0x66,0x63,0x21,0x00,0x00,0x00,0x00,0x02,0x66,0x63,0x20,
0x00,0x00,0x00,0x00,0x02,0x42,0x25,0x20,0x00,0x00,0x00,0x00,0x02,0x32,0x32,0x20,
0x00,0x00,0x00,0x00,0x01,0x22,0x22,0x10,0x00,0x00,0x00,0x00,0x00,0x12,0x21,0x00,
0x00,0x00
};
From the table example with Fox Toolkit.
/* created by reswrap from file aaa.gif */ <= I created
const
unsigned char aaa[]={
0x47,0x49,0x46,0x38,0x39,0x61,0x12,0x00,0x12,0x00,0x11,0x00,0x00,0x21,0xf9,0x04,
0x01,0x00,0x00,0x02,0x00,0x2c,0x00,0x00,0x00,0x00,0x12,0x00,0x12,0x00,0x81,0x00,
0x00,0x00,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x23,0x94,0x8f,0xa9,
0xcb,0x08,0x0f,0x9b,0x88,0x87,0x2a,0x20,0x17,0x9e,0xf0,0xb5,0x9d,0x78,0xda,0x37,
0x32,0x60,0x68,0x92,0xe1,0x79,0x81,0x62,0xd6,0x65,0xf2,0x4c,0xd7,0xb6,0x5d,0x00,
0x00,0x3b
};
/* created by reswrap from file aaa2.gif */ <= I created
const unsigned char aaa2[]={
0x47,0x49,0x46,0x38,0x39,0x61,0x12,0x00,0x12,0x00,0x22,0x00,0x00,0x21,0xf9,0x04,
0x01,0x00,0x00,0x05,0x00,0x2c,0x00,0x00,0x00,0x00,0x12,0x00,0x12,0x00,0x82,0x00,
0x00,0x00,0xff,0x00,0x00,0x80,0x80,0x80,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x43,0x58,0xba,0xdc,0x2d,0xc2,0x39,0xb2,
0x62,0x09,0x38,0x48,0xaa,0xec,0xca,0xda,0xc2,0x79,0x4e,0xa6,0x8c,0xcb,0x30,0x94,
0x67,0xc7,0xa8,0x4d,0x88,0xbe,0x2c,0x45,0x16,0x70,0x4c,0xd8,0xcd,0x1a,0x07,0xb3,
0x54,0xad,0x43,0xf2,0x31,0x34,0x9c,0x82,0x07,0x16,0x52,0x34,0x89,0x11,0x9f,0xe9,
0xe9,0x30,0x5e,0x30,0x92,0x54,0x2e,0xcb,0xed,0x7a,0x1d,0x09,0x00,0x3b
};
Now, the question is what the format of the image the cell of table support?
1> the size of the image
16x16? 18x18?
2> the color level of the image
2 colors, 16 colors, 256 colors?
3> convert the icon to array
reswrap.exe -o aa.txt aa.gif is this correct?
Thank you
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!