RGB565 to RGB24
来源:互联网 发布:matlab合并两个矩阵 编辑:程序博客网 时间:2024/04/29 02:41
//在用QT显示摄想头捕获的图象时用到的
//创建一个QImage对象,用来保存RGB24图象
int x, y, r, g, b, i = 0;
QRgb *point;
unsigned char *image = get_image(fd, width, height, palette, &size); //从摄像头获取RGB565图象
QImage *img = new QImage; //保存转换后的图象
if(img->create(width, height, depth, 0, QImage:IngoreEndian)
{
for(y = 0; y < height; y++)
{
for(x = 0; x < width; x++)
{
r = ((int)img[i+1] & 0xf8) >> 3;
g = (((int)img[i] & 0xe0) >> 5) | (((int)img[i+1] & 0x07) << 3);
b = (int)img & 0x1f;
point = (QRgb *)image->scanLine(y) + x;
*point = qRgb(r, g, b);
i += 2;
}
}
}
//创建一个QImage对象,用来保存RGB24图象
int x, y, r, g, b, i = 0;
QRgb *point;
unsigned char *image = get_image(fd, width, height, palette, &size); //从摄像头获取RGB565图象
QImage *img = new QImage; //保存转换后的图象
if(img->create(width, height, depth, 0, QImage:IngoreEndian)
{
for(y = 0; y < height; y++)
{
for(x = 0; x < width; x++)
{
r = ((int)img[i+1] & 0xf8) >> 3;
g = (((int)img[i] & 0xe0) >> 5) | (((int)img[i+1] & 0x07) << 3);
b = (int)img & 0x1f;
point = (QRgb *)image->scanLine(y) + x;
*point = qRgb(r, g, b);
i += 2;
}
}
}
- RGB565 to RGB24, RGB555 & RGB24
- RGB565 to RGB24, RGB555 & RGB24
- RGB565 to RGB24
- RGB565 to RGB24
- RGB565 to RGB24, RGB555 & RGB2
- RGB565到RGB24转换
- RGB565到RGB24转换
- RGB24互转RGB565
- RGB565,RGB24,YUV
- rgb24转rgb555/rgb565优化
- S3C6410 FramBuffer编程(四) --- RGB565、RGB24简介,以及RGB565转换为RGB24
- S3C6410 FramBuffer编程(四) --- RGB565、RGB24简介,以及RGB565转换为RGB24
- RGB565颜色表,附RGB888转RGB565工具,RGB24转RGB565工具
- linux 下将rgb24转化为rgb565的格式
- YUV422 to RGB565
- YUV422 to RGB565 Convert
- RGB565 to gray
- 颜色转换rgb24 to yuv420
- asp.net中调用javascript函数实现多功能日期控件示例
- 学习C++应该看的几本书(转)
- 将对象转为byte[]
- WPF学习手记-02 The Application and the Window
- GOOGLE地球浏览器分析(八):Google Earth 2007年最新进展
- RGB565 to RGB24
- 如何使用Java自带的正则表达式
- AJAX.net 客户端JS调用服务端事件 UpdatePannel无刷新更新
- 试发第一帖
- ecos环境答建要点
- MFC通用类的使用
- MindJet重新学习看图说话的能力
- 如何窃取权限
- Active Record simple query