How to display pictures with transparency #2224
Replies: 4 comments 5 replies
-
Use: |
Beta Was this translation helpful? Give feedback.
-
The library does not support image transparency for this case. However you could use the PNGdec library and a png image with transparency. Your processor would need ~40kbytes of RAM free to be able to decode png images. You would need to write a function to draw a masked image. I may have a function for this available if you are unable to code one. |
Beta Was this translation helpful? Give feedback.
-
Here is an example that draws a transparent png compressed image. The ESP8266 may not have sufficient RAM to run it. |
Beta Was this translation helpful? Give feedback.
-
I just tested the example in the zip file and it works great. But I can see a little room for improvements: I tried this with an icon that has a semi-transparent shadow: This shadow does not appear on the display. I think the example above only handles "binary" transparancy. We would have to use true alpha blending to get this shadow displayed instead of passing a threshold to "png.getAlphaMask" ? Here you can see a (non-transparent) jpg image with see shadow together with the same image as a png file where the shadow is missing: Here's the original file: Any ideas? :-) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to disp a pic in 240*240 lcd driver by spi, and pic's is transparency
I use the code as below,but the background color of the displayed picture is white
how can i make it to display pictures with transparency
Beta Was this translation helpful? Give feedback.
All reactions