cancel
Showing results for 
Search instead for 
Did you mean: 

Decoding bmp ?

antonius
Senior
Posted on April 11, 2014 at 11:21

Guys,

Does anyone of you have experience on decoding bmp ?

I want to display bmp file to my LCD...

Any clues ?

thanks

#i-have-a-clue
90 REPLIES 90
Posted on April 29, 2014 at 02:13

Pretty sure the printf() there isn't appropriate.

Yes, start by filling the panel with colour, and confirm those actually work, or if the colour is wrong.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 29, 2014 at 02:17

Can you display white properly in your LCD ?

I will check tomorrow, but pretty sure it does.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 29, 2014 at 03:03

The SSD1289 has a Transparency bit in Register 0x11, but it's application with respect to the data stream is not discussed further.

You could presumably do a test

if (rgb == 0xFFFF) rgb = 0xFFFE;
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on April 29, 2014 at 08:43

Like this :

 if (rgb == 0xFFFF) rgb = 0xFFFE;

              rgb = ((rgb & 0xF80000) >> 8) | ((rgb & 0x00FC00) >> 5) | ((rgb & 0x0000F8) >> 3);

              LCD_SetPoint(y/3, x/3, rgb);

I got no response, still dot dot white on the screen...

Posted on April 29, 2014 at 09:18

No like this, do you have no sense of logic and sequence?

rgb = ((rgb & 0xF80000) >> 8) | ((rgb & 0x00FC00) >> 5) | ((rgb & 0x0000F8) >> 3); // convert to colour space of display
if (rgb == 0xFFFF) rgb = 0xFFFE; // address transparent/white issue
LCD_SetPoint(y/3, x/3, rgb); // paint dot on screen

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on April 29, 2014 at 09:52

it's changing to FFFE but not in a solid LCD, there are some black spots on LCD...why is it ?

antonius
Senior
Posted on April 29, 2014 at 09:55

solid color with this :

if (rgb == 0xFFFF) rgb = 0xF7DE;

antonius
Senior
Posted on April 29, 2014 at 09:57

or

if (rgb == 0xFFFF) rgb = 0xFFFD; works allright..

Posted on April 29, 2014 at 21:07

You are asking me questions about a board and screen that I don't have, and cannot independently verify/test.

It is possible that x/3 or y/3 exceed the dimensions of the display.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 29, 2014 at 23:08

The SSD1298 on the STM32F407 does appear to display the primary colours properly, and doesn't have issues with transparent/clear 0xFFFF. Painted the Blue/White flag without issue.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..