Transparent image

Hello All,

I try to place two image on top of each other and I’d like to set the image background transparent. I saw tons of solution but none of them for v9.2. Could anybody advise me a solution?
Thanks.

Janos

what kind of images you use ?

I’m using c array as image source. I convert it from png files with lvgl image converter tool.
When I simple place them on the screen they are transparent, but when I place them on the top of each other, the secondly placed image covers the first one. But I’d like to see both of them. Thanks.

Have your file this ?

   .header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,

or some format with A8

No, it’s not set. However this value is not defined in v9.2.
I use LV_COLOR_FORMAT_RGB565
I also wanted to try LV_COLOR_FORMAT_RGB565A8, but I’m not sure how can I add index value to my array.

Simply use png with 32 bit and convert to A8 .

Thanks for your answer. Based on your hints I found the problem. I choose wrong format during image conversion on LVGL site.
Now I convert with RGB565A8 and set the .header.cf = LV_COLOR_FORMAT_RGB565A8 and works fine.