8.2.0 - image drawing renders actual color defined for transparency in LV_IMG_CF_INDEXED_8BIT images; 8.1.0 and prior did not

Performing library maintenance on my app - upgraded from 8.0.2 to 8.1.0, with no issues. Upgraded to 8.2.0, and images with colors that match LV_COLOR_CHROMA_KEY now render that color to the display (pure green) instead of appearing transparent. Downloaded code from master branch, still an issue.
(Update) - The images at issue are LV_IMG_CF_INDEXED_8BIT, which previously respected the transparent color. LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED are fine.

I can see that the rendering engine had significant architectural upgrades in 8.2.0, but do not see any reference to 8.2.0 breaking the rendering of transparent images. Latest documentation for images still states:

Can have 256 different colors in a palette (always chroma keyed)

Help appreciated!

It’s really not mentioned in the docs, my mistake.

In v8.1 on indexed images both chroma keying and alpha channel worked. During the rework you mentioned I needed to remove one of them, and removed chroma key as you can simply set the any color to have alpha=0 (i.e. transparent)

I’ve pushed a fix to the docs and comments here: https://github.com/lvgl/lvgl/commit/9a1e385b2b3498ed70704bf0ed33e4bd263747d8

Thanks for the update. I updated the 4th byte of each colour index that matched the chroma key to 0x00 for all my images and it’s solved. Thanks!

1 Like