Pages: [1]   Go Down
Author Topic: format of the bitmap .c file  (Read 770 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 84
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?

Code:
// 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

Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2383
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 84
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the file got from the corresponding bmp file :

Code:
// 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
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2383
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From (what I think) is the right webpage.

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

Quote
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
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2383
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Mark
Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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
Logged

Pages: [1]   Go Up
Jump to: