The transparent part of my PNG image was not reflected after implementation, completely covering the parent object

As the title says,How to make the transparent part work properly, that is, to display the parts of the parent object that are not covered


Could you please attach the PNG image and the code lines showing that?
Because I use also transparent PNG images in my project (transparent, indexed color palette), and it is shown correctly.

If you create a new lv_img object, and pass the PNG data (or file system path) into lv_img.set_src() function, then it should work.

like this

this green ring covered everything

I’ve check that in GIMP that it’s an indexed images.

Sometimes indexed images doesn’t behave correctly, so I recommend converting them to normal RGB.

I’ve converted your image to RGB, could you try it out?

1 Like

thanks,I found out where the problem lies because my image was compressed to 8bit format by my UI colleagues, causing the transparent part to not display properly