Add support for background image chroma key

What do you want to achieve?

  1. Enable support for true color chroma key where if an image pixel matches the
    LV_COLOR_CHROMA_KEY. That pixel will not be drawn.

    Default LVGL chroma key is set to pure green

/*Images pixels with this color will not be drawn if they are chroma keyed)*/ #define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00)         /*pure green*/

Exported image must have = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED,

Do you see alternative options and workaround to achieve it?

You can export your image with additional alpha byte (i.e. save png with a bit depth of 32), but that increase memory use significantly, by as much as 40%. If you have a lot of images and use large screens, you will run out of flash memory very quickly.

Mention some use cases

All cases where you want to display image icons and logos that need to blend with the parent background

It seems we really need a per image property config panel to set the output color format of the images.

We are thinking about it.

1 Like