443 views
in System Integration by
Good day,

Is the pixel format within Embedded Wizard fixed at RGB8888 ?

I find that bitmap creation (the call to EwCreateBitmap) is quite hungry for RAM, when I call EwCreateBitmap( EW_PIXEL_FORMAT_NATIVE...)

I tried changing the call to EwCreateBitmap( EW_PIXEL_FORMAT_SCREEN...), because I want to save RAM, and my profile configuration is STM.STM32.RGB565 (2 bytes per pixel instead of 4 bytes per pixel)

Am I trying to do something which is not supported?

Kind Regards,

Rob

1 Answer

0 votes
by

Hello Rob,

the screen color format represents the color format of the framebuffer, which can be RGBA8888, RGB888, RGB565, RGBA4444,...Index8. The name of the Platform Package (e.g. STM.STM32.RGB565) indicates this screen color format.

Nevertheless, the native color format (this means the internal operation format of the Graphics Engine) may be different than the screen color format:

In case of RGBA8888, RGBA4444 or Index8 Platfrom Package, the native color format and the screen color format is identical.

In case of RGB888 or RGB565 Platform Package, however, the native color format is still RGBA8888. The reason is very simple: Using RGBA8888 as internal operation format makes it possible to support alpha blending during the graphics composition and to support images with an alpha channel although the framebuffer does not contain transparency information.

As a consequence, all temporary or dynamically created bitmaps have to be created either as EW_PIXEL_FORMAT_NATIVE or EW_PIXEL_FORMAT_ALPHA8. This makes it possible to provide alpha information within the bitmap.

To answer your question: Bitmaps created as EW_PIXEL_FORMAT_SCREEN cannot be used as sources for any drawing operations, due to the missing alpha information - so this will not work.

For more details, please have a look to EwCreateBitmap().

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...