RGB565 means that in a 16-bit integer, the low 5 bits correspond to the high 5 bits of blue, the high 5 bits correspond to the high 5 bits of red, and the middle 6 bits correspond to the high 6 bits of green< /p>
To change it to RGB888, use three consecutive bytes to store three 8-digit numbers of red, green and blue respectively
It can be converted like this:
unsigned short int uRGB565=0x1234; //A random color value
unsigned char RGB888[3];
RGB888[0]=(uRGB565>>8)&0x0f8; //The highest conversion 5 bits into 8-bit red high-order 5 bits
RGB888[1]=(uRGB565>>3)&0x0fc; //Convert the middle 6 bits into 8-bit green high-order 6 bits
RGB888[2]=(uRGB565<<3)&0x0f8; //Convert the low 5 bits into the high 5 bits of 8-bit blue
During conversion, the lower part of the 8-bit color value is taken becomes a value of 0, or it can be set to a value of all 1, so that the brightest color will not change. The method is: RGB888[0]|=7; RGB888[1]|=3; RGB888[2]|=7; p>