Qt uchar * 转 QImage


1 QImage(uchar * data, int width, int height, Format format)
2 
3 QImage(const uchar * data, int width, int height, Format format)
4 
5 QImage(uchar * data, int width, int height, int bytesPerLine, Format format)
6 
7 QImage(const uchar * data, int width, int height, int bytesPerLine, Format format)
1 QImage Image; 
2 Image = QImage(uchar * data, width, height, QImage::Format_RGB888);

从构造函数可以得知:

  • 指向图像数据的uchar*型地址
  • 图像宽度
  • 图像高度
  • 图像格式或者是图像的每行字节数(通道*宽度)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM