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*型地址
- 圖像寬度
- 圖像高度
- 圖像格式或者是圖像的每行字節數(通道*寬度)