tom-2015 / rpi-ws2812-server

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

white leds on by draw_image with LED Typ 9 SK6812_STRIP_GBRW #64

Closed CBMOD closed 3 years ago

CBMOD commented 3 years ago

i have a file with 34x1 pixel, with used only colour red colour and black i used readpng 1,;render; >>> only red Led's on >>> OK i used:

config_2D 1,34,1; draw_image 1,;render; (i used the same file) >>> by the red pixels are red and white Led's, by black Pixels are white Led's on

tom-2015 commented 3 years ago

The 2D functions are not optimized for use with the SK6812 RBGW chips. The white LEDs are on because it uses the Alpha (transparancy) value that is fully on (255) for the white LEDs.

If you only have a 32x1 pixel strip better use the 1D readpng function.

CBMOD commented 3 years ago

it's only a test with the 1x34 stripe... ;-) i remove the alpha channel - same problem

and the repeatet gif animation i cant never stop it a new draw command dont overwrite the first draw command

Seite_009
tom-2015 commented 3 years ago

When drawing animated GIF use the max_loops parameter to specify how many times to repeat. Another option is to start the GIF in a different thread, you can then stop it by killing the thread.

Removing alpha from the image will not solve the problem. I've changed something in the main.c file that should prevent this problem. Can you try download and recompile see if it fixes this?

CBMOD commented 3 years ago

it work's !! great job 🥇