2.7k views
in GUI Development by

Hi 

We use following software components.

- Embedded Wizard Studio Pro v9.0
- STM_STM32_PlatformPackage
- STM32-RGB565-Professional-AddOn

 


 

The left is RGB565 and right is RGB888.

There is a difference in the middle green gradient.

Is it possible to have a smooth gradient in RGB565?

thanks.

 

1 Answer

0 votes
by

Hello,

with RGB565 the possible color space is limited. The green color component can change in 64 steps. The red and blue components can even change in 32 steps. The ugly gradient effect is thus inevitable with the limited number of steps. The following screenshot made with a graphic editor (e.g. Photoshop) demonstrates the problem.

In the screenshot you see a sharp color border. The both colors on the left and on the right of the border differ only in a value for the green color component. On the left the component has the value 158. On the right it is 154. In the here used graphic editior the values are expressed in the range 0 .. 255 and the difference between the values is 4. This value 4 for the green color component corresponds to the size of a single step possible for this component. (We have 64 steps * 4 = 256). The border results thus from the smallest difference between two colors:

What you can do:

- If the affected graphic is a bitmap resource, then by using an adequate graphic editor (e.g. Photoshop) you can apply additional dithering to the image. The image will then appear a little bit noisy but without the sharp borders.

- If the affected graphic is rendered dynamically by using vector graphic functionality, there is no way for further tricks. Due to performance limitations performing the dithering at the runtime when graphical shapes are drawn is not supported.

Hope it helps you further.

Best regards

Paul Banach

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

...