format of the bitmap .c file

Hello everybody,

In a .c file created with "ImageConverter 565" that represent a bitmap, I like to know what represent each word. For instance, in this file, are each word a color value, an address, a mix ?

// Generated by  : ImageConverter 565 v1.2
// Generated from: yyy.gif
// Time generated: 27/08/2013 20:13:05
// Dimensions    : 4x12 pixels
// Size          : 96 Bytes

#include <avr/pgmspace.h>

prog_uint16_t yyy[0x30] PROGMEM ={
0xB5B5, 0xDED5, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0x6B6A, 0xFFFF, 0xFFFF, 0xFFFF, 0xB5B5, 0xFFFF, 0xFFFF,   // 0x0010 (16)
0xFFFF, 0xDEDF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x9495, 0xFFFF, 0xFFFF, 0xFFFF, 0x6B6A, 0xFFFF, 0xFFFF, 0xFFFF, 0x2120, 0xFFFF,   // 0x0020 (32)
0xFFFF, 0xFFFF, 0x212A, 0xFFFF, 0xFFFF, 0xFFFF, 0x4A4A, 0xFFFF, 0xFFFF, 0xFFFF, 0x9495, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x4A4A,   // 0x0030 (48)
};

Thanks for your help.

Pierre

GIF's are not "bitmaps" from the size it looks like a simple dump of the if, in which case you need to look up the gif documentation to understand the data.

Mark

Here is the file got from the corresponding bmp file :

// Generated by  : ImageConverter 565 v1.2
// Generated from: yyy.bmp
// Time generated: 27/08/2013 20:49:50
// Dimensions    : 4x12 pixels
// Size          : 96 Bytes

#include <avr/pgmspace.h>

prog_uint16_t yyy[0x30] PROGMEM ={
0xB5B5, 0xDED5, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0x6B6A, 0xFFFF, 0xFFFF, 0xFFFF, 0xB5B5, 0xFFFF, 0xFFFF,   // 0x0010 (16)
0xFFFF, 0xDEDF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x9495, 0xFFFF, 0xFFFF, 0xFFFF, 0x6B6A, 0xFFFF, 0xFFFF, 0xFFFF, 0x2120, 0xFFFF,   // 0x0020 (32)
0xFFFF, 0xFFFF, 0x212A, 0xFFFF, 0xFFFF, 0xFFFF, 0x4A4A, 0xFFFF, 0xFFFF, 0xFFFF, 0x9495, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x4A4A,   // 0x0030 (48)
};

Is is exactly the same. So I dont think that the original format as any exffect on the .c file.

Pierre

It looks to me to be raw image data.

The image, as the comments show, is 4x12 pixels. 4x12 = 48.

The data is 96 bytes. 96 / 48 = 2. So two bytes per pixel. Given the name of the program, that's what I'd expect.

565 is a 16-bit RGB colour space definition - 5 bits of red, 6 of green (the eye is more sensitive to green) and 5 of blue: RRRRRGGG GGGBBBBB

So each word is a single pixel in 565 RGB format, probably in a left-to-right, top-to-bottom arrangement.

From (what I think) is the right webpage.

http://www.henningkarlsen.com/electronics/t_imageconverter565.php

This tool can be used to convert images into the formats required for my UTFT libraries for

So it could be any thing - but majenko may well be right.

Mark

You can try do a simple test. Pass to this tool a picture with RED, GREEN and BLUE squares in a simple size and just see the output.

Bye

If I am right, the image you have there should look like this: but I'm not sure that's right. Maybe if you did a larger image I could test it better.

The UTFT lib may allow "a transparent" pixel, not just colors.

Mark

majenko:
It looks to me to be raw image data.

The image, as the comments show, is 4x12 pixels. 4x12 = 48.

The data is 96 bytes. 96 / 48 = 2. So two bytes per pixel. Given the name of the program, that's what I'd expect.

565 is a 16-bit RGB colour space definition - 5 bits of red, 6 of green (the eye is more sensitive to green) and 5 of blue: RRRRRGGG GGGBBBBB

So each word is a single pixel in 565 RGB format, probably in a left-to-right, top-to-bottom arrangement.

You couldn't be more correct :slight_smile:

Each word is a RGB565 encoded value for a pixel starting from the upper left corner, going alone each line to end up in the lower right corner.

UTFT does not support transparency.

/Henning