下你所需,载你所想!
汇集开发技术源码资料

C语言:RGB26转RGB16

:491B :1 :2022-10-12 15:15:42

部分简介

C语言:RGB26转RGB16如果开发者对于本文件有需要的可以参考。
public static int RgbGet16(int R, int G, int B) {
UInt16 temp = 0;
UInt16 output = 0;
temp |= (UInt16)(R >> 3);
output |= (UInt16)(temp << 11);
temp = 0;
temp |= (UInt16)(G >> 2);
output |= (UInt16)(temp << 5);
temp = 0;
temp |= (UInt16)(B >> 3);
output |= (UInt16)(temp);
int color16 = output;
return color16;
}

C语言:RGB26转RGB16

热门推荐

相关文章