wrong color space.
==> Format_RGB32
Try: QVideoFrame::Format_YUYV or QVideoFrame::Format_UYVY
Domanda
i have raw image buffer. i am converting it into jpeg using following code:
height = 240;
width = 320;
raw_image=capture(width, height);//(c code uvc capture)
QImage tmpImage = QImage(raw_image, width, height, QImage::Format_RGB32 ); //image.format=RGB888
QByteArray im;
QBuffer bufferJpeg(&im);
bufferJpeg.open(QIODevice::WriteOnly);
tmpImage.save(&bufferJpeg, "JPG");
tmpImage.save("image1.jpg","JPG");
it is capturing and converting it into jpeg.but the captured image is not proper. i have attached the image for reference
and for QImage tmpImage = QImage(raw_image, width, height, QImage::Format_RGB16 ); image is
for QImage tmpImage = QImage(raw_image, width, height, QImage::Format_RGB444);
How can i get the proper image? thanks in advance.
Soluzione
wrong color space.
==> Format_RGB32
Try: QVideoFrame::Format_YUYV or QVideoFrame::Format_UYVY