Open Mike-Kuznetsov opened 1 month ago
Set the colour depth before creating the sprite to save memory.
Use the pushSprite function. pushColors always assumes data is 16 bit so 4 of the sprite 4bit pixels will be sent to each 16 bit panel pixel. This means only 1/4 of the pixels get filled.
pushSprite converts each 4 bit pixel into a 16 bit value and sends it to the screen. Note that a 4 bit sprite has a 16 color palette associated with it.
I have a Lilygo T-RGB. It's resolution is 480x480 so GIFs display pretty slow. I wanted to try to lower the color depth from 16 bit to 4 bit to make it work faster. But it makes the device read 4bit images like 16bit images so for example instead of displaying 100 4bit pixels it displays 25 16bit pixels.
Maybe i do something wrong, maybe i need to do some extra steps, maybe i need to change something in the library, maybe my setup works only with 16bit colors. I've tried to change uint16_t to uint8_t in the Lilygo's library panel class but it doesn't change anything. I would like to get any info on why this happens.
It's a good library and of course i'm not sure that the problem is in the library but i would like to get any suggestions on how to make gifs work faster or on how to change color depth properly.
Simplified example from Lilygo T-RGB library. Thank you