BmpCVT color conversion

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

    • BmpCVT color conversion

      I am confused with "Options->Save colors in ARGB mode" flag. I am using a display with 64K colors in ARGB mode. I want to convert Windows BMP files to HighColor (565). Whatever I do,
      I can't create the right color order -> blue and red are always swapped. I created both HighColor(565) and HighColor(565) swapped files. Colors inside the file are correctly swapped, but
      color encoding method in the bitmap description complement that so images are always shown in the same (wrong) way. Also, changing that Options flag and re-creating the files never
      results in any file difference. Interestingly, if I paletize the images first, colors are shown correctly.
      I am using the latest version of BmpCvt (5.46a) and GUI (5.46) and I would appreciate some guidance here.
      Also, when I try to open 64K color BMP file, BmpCVT locks so I have to kill it using TaskManager (example ZIP file with BMP image attached).

        (4.6 kB, downloaded 70 times, last: )

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

    • Hi,

      I was able to reproduce the behavior with your BMP file. This needs further investigation.

      If I get you right you want to convert an image (a BMP file in this case) into a 16 bit per pixel bitmap to be drawn with emWin.

      You don't have to use a 16 bit BMP to do so. Simply create a BMP file (e.g. with paint or GIMP) and save it with 24 bpp.

      Now open the BMP file with the Bitmap Converter and go to: File -> Save As -> choose: "C" bitmap file (*.c)

      Now you can decide between several color formats. Depending on your LCD configuration (the color conversion you are using, e.g. GUICC_M565 or GUICC_565) you should use one of the following:

      High Color (565) - This is 16 bit in BGR order to be used with GUICC_565
      High Color (565), red and blue swapped - This is 16 bit in RGB order to be used with GUICC_M565

      If you want to convert a 32 bpp image into an emWin bitmap it might be necessary to convert it to 24 bpp. You can do this in the bitmap converter under:

      Image -> Convert to -> RGB (24 bpp)

      The option 'Save colors in ARGB mode' option effects only pallete based bitmaps. This is not the case here.

      Another possibility might be that the LCD configuration is not properly set up. You might want to try to set a different color conversion in your LCDConf.c. for example, instead of using GUICC_M565 use GUICC_565.

    • BMPCVT issues

      Thanks for you response. I am familiar with color modes - what confuses me is this: - it does not matter what kind of file (565 or swapped 565 format) I choose - the resulting image is always shown the same way. I would expect that if I choose the wrong format (e.g. 565 instead of swapped 565), color should be swapped too. However, that's not the case. Files are differently organized, but encoding method is also changed -> therefore EmWin always displays the same image. If I manually change encoding method in c-file, it is then show the right way.
      I have configured lcdconf.c the right way, tested it with blue/red bars and they are shown correctly, the problem is only with these 565-formated BMP's.

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