Maixduino icon indicating copy to clipboard operation
Maixduino copied to clipboard

ST7789 LCD.drawImage() Colour Format

Open TheMindVirus opened this issue 4 years ago • 1 comments

I tried using the COLOR_YELLOW definition from Sipeed_ST7789.h with LCD.drawImage(). It displayed purple instead of yellow. If I use LCD.fillScreen() the colour works as expected. LCD.drawImage() needs to support the same colour format of RGB565 Big Endian, not what it follows currently (which looks like BRG844 Big Endian).

TheMindVirus avatar Jul 15 '20 02:07 TheMindVirus

I'm trying to use RGB565 in Sipeed_ST7789 too without good results this line should be able to generate a gray color in RGB565

uint16_t cor = ((v & 0b11111000) << 8) | ((v & 0b11111100) << 3) | (v >> 3);

but doesn't, +1 to @TheMindVirus issue thanks

dimitre avatar Aug 22 '20 22:08 dimitre