






















void convertRgbToRgb565(int red, int green, int blue)
{
uint16_t rgb565;
QColor color(red, green, blue);
uint16_t r = color.red() >> 3;
uint16_t g = color.green() >> 2;
uint16_t b = color.blue() >> 3;
rgb565 = (r << 11) | (g << 5) | b;
printf("%s%s%s","0x",qPrintable(QString("%1").arg(rgb565,4,16,QLatin1Char('0')).toUpper()),",");//不足8位补0;
fflush (stdout);
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。