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 28, 2014 at 15:31

I'd look at the BMP, but the JPG/PNG provided so far are not usable by me, attach the real BMP to your post as an attachment.

Also please don't use line-numbering when posting code, it just makes it more difficult to paste.
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 28, 2014 at 16:25

Does you display go white when you write 0xFFFF as the colour? If it doesn't I'd look more carefully at how it's set up and connected.

LCD_Clear(0xFFFF);

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 28, 2014 at 16:35

It's not going to be white, looks like transparent ?

Posted on April 28, 2014 at 17:07

Ok, so what's the right RGB colour space number for White?

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 00:24

Well, I have no clue on how to know white color for this LCD ?

How to test white color for it ? thanks

Posted on April 29, 2014 at 01:30

Well I think there is a problem with your display, or it's attachment. What you should probably do is test the primary colours, and try reading back the values programmed into the buffer.

/* LCD colour */
#define White 0xFFFF
#define Black 0x0000
#define Blue 0x001F
#define Red 0xF800
#define Magenta 0xF81F
#define Green 0x07E0
#define Cyan 0x7FFF
#define Yellow 0xFFE0

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 01:36

In this function ?

void LCD_Clear(uint16_t Color)
{
uint32_t index=0;
LCD_SetCursor(0,0); 
LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
for(index=0;index<76800;index++)
{
LCD_RAM=Color;
printf(Color);
}
}

antonius
Senior
Posted on April 29, 2014 at 01:43

I've made a test function :

void LCD_Color_test()
{
LCD_Clear(Black);
delay_ms(1000);
LCD_Clear(White);
delay_ms(1000);
LCD_Clear(Grey);
delay_ms(1000);
LCD_Clear(Blue);
delay_ms(1000);
LCD_Clear(Blue2);
delay_ms(1000);
LCD_Clear(Red);
delay_ms(1000);
LCD_Clear(Magenta);
delay_ms(1000);
LCD_Clear(Green);
delay_ms(1000);
LCD_Clear(Cyan);
delay_ms(1000);
LCD_Clear(Yellow);
}

Can you display white properly in your LCD ? thanks
antonius
Senior
Posted on April 29, 2014 at 01:51

It can do Grey, but can not do White, why is it ?