I have a buffer of type unsigned char* , which I fill with a JPG image. I want to use this buffer to draw an image on the screen of my application in QLabel.
I did this, but the image is incorrect.
Can someone tell me what is the best way to do this?
QPixmap pix = QPixmap::fromImage( QImage(buff, 460, 345, QImage::Format_RGB888)); //Not sure what format to use for a jpg image? one_img->setPixmap(pix); //one_img is of type QLabel.
source share