IMAGE_LoadBMP with 8bpp bitmaps

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • IMAGE_LoadBMP with 8bpp bitmaps

      Hello.

      I'm using emWin library on ST Discovery board (STemWin) and I have problem with loading 8bpp BMP file into IMAGE widget (using IMAGE_LoadBMP function).
      I'm loading whole file into RAM. Other types of bitmap (24bpp, 16bpp, 4bpp) are working fine. It looks like 8bpp palette is not loaded correctly. Anyone knows what's the problem and how to fix it? Is emWin using some predefined palette to load 8bpp bitmaps (and ignoring the palette which is in the file)?

      I'm attaching screen from my LCD and 4 example bitmaps which are visible on the LCD.


      4 bpp bitmap - ok
      8 bpp bitmap - incorrect
      16 bpp bitmap - ok
      24 bpp bitmap - ok


      Best regards,
      Krzysztof Szewczyk
    • Hi Krzysztof,

      I have given it a try but on my end it is working fine.

      Which version of emWin are you using (check out GUI_Version.h)?

      Attached is my test application and the BMP I have used.

      Best regards,
      Sven
      Files
      • 8bpp_BMP.zip

        (12.81 kB, downloaded 257 times, last: )
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hi,

      I have noticed too late that you also provided your BMP files.

      I have checked it with your 8bpp BMP as well but it is also working.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hi,

      sorry for the late reply. There were several fixes regarding BMP files in version 5.48 and 5.46. I could imagine this fixes the issue you are reporting.

      If possible try to get hands on a more recent version of emWin.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.