tom-2015 / rpi-ws2812-server

Raspberry Pi WS2812 (web) server tool
172 stars 39 forks source link

Displaying animated GIF always makes the background transparent, so never clears the previous frame. #73

Open heurist1 opened 1 year ago

heurist1 commented 1 year ago

I was trying to use the server to display an animated GIF of snow on a 16x32 display using the draw_image command. The background got set to transparent regardless of the background color or transparency in the GIF file. This meant that the snow only ever built up and the previous positions of flakes never got erased.

I believe the best fix that also maintains backwards compatibility would be to add an additional parameter, defaulted to the current behaviour, but allowing the background pixels to be written as they are in the file.

I will submit a pull request with my suggested change,