Software to convert array to BMP

Hello:

Is anyone familiar with a free program or online convertor that I can convert a array back to the image so I can edit.

//Software to convert back into a image??

static const uint8_t PROGMEM clock_Icon [] = { 
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x01, 0x80, 0x00,
0x00, 0x07, 0xE0, 0x60, 0x00, 0x3F, 0xFC, 0x70, 0x00, 0xFF, 0xFF, 0x38, 0x01, 0xF9, 0x9F, 0xFC,
0x03, 0xE1, 0x87, 0xEC, 0x07, 0xC1, 0x83, 0xE0, 0x0F, 0xC0, 0x03, 0xF0, 0x0E, 0xE0, 0x07, 0x70,
0x1E, 0x60, 0x06, 0x78, 0x1C, 0x18, 0x00, 0x38, 0x1C, 0x1C, 0x00, 0x38, 0x38, 0x0E, 0x60, 0x1C,
0x38, 0x07, 0xE0, 0x1C, 0x3F, 0x03, 0xC0, 0xFC, 0x3F, 0x01, 0x80, 0xFC, 0x38, 0x01, 0x00, 0x1C,
0x38, 0x01, 0x00, 0x1C, 0x1C, 0x01, 0x00, 0x38, 0x1C, 0x00, 0x00, 0x38, 0x1E, 0x60, 0x06, 0x78,
0x0E, 0xE0, 0x07, 0x70, 0x0F, 0xC0, 0x03, 0xF0, 0x07, 0xC1, 0x83, 0xE0, 0x03, 0xE1, 0x87, 0xC0,
0x01, 0xF9, 0x9F, 0x80, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xFC, 0x00, 0x00, 0x07, 0xE0, 0x00
};

You could insert a .BMP header. Write the array to an SD card. Edit the file on a PC. Write back to an SD Card.
Or use an online converter to create a C array.

Quite honestly, it is easier to just start on the PC in the first place. Search for your desired icon with Google. Edit the JPG, PNG, BMP or whatever with IrfanView or similar. Scale to size. Convert to monochrome.

Use an Online converter to create the C array.

David.

Found GIMP can do it, as you suggest just cut n paste the array into a text file and add the header and import as a XBM into Gimp. Out of curiosity how does one calculate the dimensions from a array. As below what would the bmp define dimensions be?

//Sample text file for conversion into gimp
#define Untitled_width xx?
#define Untitled_height xx?

static unsigned char clock_icon [] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x01, 0x80, 0x00,
0x00, 0x07, 0xE0, 0x60, 0x00, 0x3F, 0xFC, 0x70, 0x00, 0xFF, 0xFF, 0x38, 0x01, 0xF9, 0x9F, 0xFC,
0x03, 0xE1, 0x87, 0xEC, 0x07, 0xC1, 0x83, 0xE0, 0x0F, 0xC0, 0x03, 0xF0, 0x0E, 0xE0, 0x07, 0x70,
0x1E, 0x60, 0x06, 0x78, 0x1C, 0x18, 0x00, 0x38, 0x1C, 0x1C, 0x00, 0x38, 0x38, 0x0E, 0x60, 0x1C,
0x38, 0x07, 0xE0, 0x1C, 0x3F, 0x03, 0xC0, 0xFC, 0x3F, 0x01, 0x80, 0xFC, 0x38, 0x01, 0x00, 0x1C,
0x38, 0x01, 0x00, 0x1C, 0x1C, 0x01, 0x00, 0x38, 0x1C, 0x00, 0x00, 0x38, 0x1E, 0x60, 0x06, 0x78,
0x0E, 0xE0, 0x07, 0x70, 0x0F, 0xC0, 0x03, 0xF0, 0x07, 0xC1, 0x83, 0xE0, 0x03, 0xE1, 0x87, 0xC0,
0x01, 0xF9, 0x9F, 0x80, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xFC, 0x00, 0x00, 0x07, 0xE0, 0x00 };

Your array looks like 8 lines of 16 bytes = 1024 bits. So probably a 32x32 monochrome icon.

Yes GIMP can do all your scaling, colours, ... and even produce a XBM array.

David.

Thanks, guess a bit of trial and error, go for a square first and see how it displays