Issue about BmpCvt.exe with 32bit bitmap

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

  • Issue about BmpCvt.exe with 32bit bitmap

    Hello all,

    I tried to use BmpCvt.exe to convert a 32bit bitmap to c file.
    I used the format "True color with alpha" which will set the draw function as "GUI_DRAW_BMP8888".
    But the c file cannot be played properly: nothing showed but only a black screen.

    I tried it in both pc simulator and my own board with the same result.
    In addition, if I use format "True color 24bpp", all's fine.

    The version of BmpCvt.exe I used is: v5.4.0.
    I add an attachment of c file converted by BmpCvt.exe.
    Any ideas? Thanks in advance.

    Kenmux
    Files

    The post was edited 1 time, last by kenmux ().

  • Hi,

    which device are you using and what is the color conversion (GUICC_xxx) in your LCDConf.c.

    If the color conversion is GUICC_M8888I you have to save bitmaps as 'True color with alpha, r/b swapped, alpha inverted'. This would explain the black screen because of the inverted alpha channel. Any pixel which should be visible will invisible if the alpha channel doesn't fit to the color conversion.

    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.
  • Hello Sven,

    The device I used is the board used in my project.
    The lcd driver is proved okay & works very well.
    I checked the LCD_CORLOR_CONVERSION again, and it's GUILCC_RGB8888.
    You know there's also a format "True color with alpha, (Both variants)" in BmpCvt.exe.
    Using this will go over the pits you mentioned, right?
    And, it gave me the same result.

    I also attached the 32bit bitmap.
    Would you please help to test it?
    Maybe the file's fault?
    I've no idea at all.
    Thanks in advance.

    Kenmux
    Files

    The post was edited 1 time, last by kenmux ().

  • Hi,

    I have found the issue. The problem is related to the Bitmap Converter. When loading an image without alpha channel (which is true for the .bmp file) the Bitmap Converter offers the possibility to save the image as 32bit per pixel. In this case it adds an alpha channel. Unfortunately, the alpha channel added to the pixel had the wrong value. In our case the alpha channel was 0xFF for every pixel which means transparent when using GUICC_8888.

    There are two ways to get around of this.
    First, convert the image into a format like png which has 32 bit per pixel, even transparency is not required, and then convert it with the Bitmap Convert.

    Second, check your emails ;)

    The fix will be released with the next emWin version.

    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,

    I have send you the file already.

    Not sure if it is a good idea to post your email address publicly, so I have deleted it from your last post.

    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.
  • Hello Sven,

    Thanks very much for your kindness!
    I'm sorry I've found your email just now.
    The gmail treated it as spam, and that folder hidden as default.
    I tested with the latest version you provided, it's okay now!

    Thanks,
    Kenmux