Skip to main content
antonius
Associate III
April 11, 2014
Question

Decoding bmp ?

  • April 11, 2014
  • 90 replies
  • 37501 views
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
    This topic has been closed for replies.

    90 replies

    Tesla DeLorean
    Guru
    April 29, 2014
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 29, 2014
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    antonius
    antoniusAuthor
    Associate III
    April 29, 2014
    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...

    Tesla DeLorean
    Guru
    April 29, 2014
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    antonius
    antoniusAuthor
    Associate III
    April 29, 2014
    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
    antoniusAuthor
    Associate III
    April 29, 2014
    Posted on April 29, 2014 at 09:55

    solid color with this :

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

    antonius
    antoniusAuthor
    Associate III
    April 29, 2014
    Posted on April 29, 2014 at 09:57

    or

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

    Tesla DeLorean
    Guru
    April 29, 2014
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 29, 2014
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    antonius
    antoniusAuthor
    Associate III
    April 29, 2014
    Posted on April 30, 2014 at 00:22

    may be I need to change my initialization code for handling this 0xFFFF issue ? thanks