Saturday, December 16th 2017, 7:38pm UTC+1

You are not logged in.

  • Login
  • Register

rhum

Beginner

Date of registration: Nov 21st 2017

Posts: 3

1

Tuesday, November 21st 2017, 3:42pm

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?

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 443

2

Wednesday, November 22nd 2017, 10:16am

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

rhum

Beginner

Date of registration: Nov 21st 2017

Posts: 3

3

Wednesday, December 6th 2017, 10:08am

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!

Similar threads