Memory devices and M888 color conversion

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

  • Memory devices and M888 color conversion

    Dear Segger Team.

    By now we have used emwin 5.32 in ABGR mode (with color conversion GUICC_M888) where we used to display RLE alpha channel only encoded bitmaps as button images.
    This has worked so far but now we tried to update to 5.40 and we found that memory devices are losing the transparancy information when they call the color conversion api.

    In 5.32 (ABGR) it was possible to use GUICC_M888_SetCustColorConv to assign custom conversion routines for bulk color <-> index conversion. However this does not work with 5.40 (ARGB) and the existing color conversion removes the alpha channel information although 32 bit memory devices are used.

    As a result images with alpa channel information are not shown the same way in ARGB mode as it is done in ABGR mode.
    To work around this it would be necessary to be able to assigne custom conversion routines for single and bulk conversion also in ARGB mode. We use a STM32 and this could be done using DMA2D without to lose the transparency feature even when GUIC_M888 is used.

    In ABGR we can use our own conversion routines with DMA2D which keeps the alpha channel information during mixing and blending but this is not possible in ARGB

    Is there any solution for that problem?
  • Hi,

    The color conversion GUICC_888 and GUICC_M888 do not contain transparency information. You might try to use GUICC_8888 or GUICC_M8888I.

    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.
  • The problem is not the color conversion but the different behaviour of GUICC_M888_SetCustColorConv in ARGB mode.
    The function does not store the function pointer. Instead it silently uses its own color conversion routine although the user wants to use a custom routine that is using DMA2D. As a result the custom color conversion routine will never be called which leads to a loss of transparency information in 32 bit memory devices.

    I expect that regardless of the mode (ARGB or ABGR) GUICC_M888_SetCustColorConv should allow to set a custom conversion routine, but this is not the case in ARGB mode and should be fixed!