convert RGB565 to RGB666

发布时间 2023-03-25 14:43:30作者: 电子DIY工作坊

RGB(565) is converted to RGB(666) by appending the MSBs R5[4] respectively B5[4] as the low order bit, while G6[5:0] remains untouched:

R6[5:0] = (R5[4:0] << 1) + (R5[4] >> 5) 
G6[5:0] = (R6[5:0])
B6[5:0] = (B5[4:0] << 1) + (B5[4] >> 5)