Difference between bitmap formats

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

    • Difference between bitmap formats

      Hi all what is the difference when i save a bitmap as true color with alpha,r/b swapped, alpha inverted. and high color with alpha[555],red and blue swapped.
      because I am seeing major difference implementation wise.
      In the first case i am not able to set background color for transparent image as in second case there is no problem. I have read the document and only difference is Depth for true color format is 32 bit and for high color 16 bit, and transparency factor is not there in high color format whereas it is there in true color.
      So I thought transparency factor is troubling but when oi tried some other format where transparency is also set and depth is 32 bit(True color 8888 with alpha channel, compressed) but this also works fine , but here compression is used.
      can you tell me how these all works and what is the impact on performance.
    • Hi,

      First you should know what color conversion is used in your LCDConf.c. Just search for GUICC_.
      This tells you what the best bitmap format is in regards of performance.

      GUICC_M8888I - Most common color conversion for 32bit per pixel, best image format is true color with alpha, r/b swapped, alpha inverted.

      GUICC_8888 - Pretty uncommon nowadays, best format is True color with alpha.

      GUICC_M565 - swappes r and b channel, depends on the LCD controller, best format is high color[565], red and blue swapped.
      GUICC_565 - r and b not swapped, best format is high color[565].

      GUICC_555/GUICC_M555 - same as above but with only 15bit color information.

      True color with alpha, r/b swapped, alpha inverted defines the color bits as follows:
      AAAAAAAA RRRRRRRR GGGGGGGG BBBBBBBB - where an alpha value of 0xFF means opaque and 0x00 transparent.

      high color with alpha[555], red and blue swapped is like:
      AAAAAAAA 0 RRRRR GGGGG BBBBB - here an alpha value of 0xFF means transparent, only 15 bits color so 1 bit is not used.

      They are named swapped because the initial version of these color conversions have the red and blue channel swapped, e.g. True color with alpha:
      AAAAAAAA BBBBBBBB GGGGGGGG RRRRRRRR

      Which color conversion is set in your LCDConf.c?
      Is the define GUI_USE_ARGB set to one in your GUIConf.h? (changing this effects emWin only while building the library)

      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.