Hi all, I have a raw image:
QImage *img = new QImage(imgBufferOut, reso.width(), reso.height(), QImage::Format_RGB888); that I convert to JPG via QBuffer bufferJpeg; bufferJpeg.open(QIODevice::WriteOnly); img->save(&bufferJpeg, "JPEG"); finalJpg = bufferJpeg.data(); Now I transfer the content finalJpg in form of a Base64 encoded QString via a websocket to a web browser. Within the browser it should be displayed via const imageDataUri = "data:image/jpeg;base64," + msg.jpgBuffer; videoImage.src = imageDataUri; Now my question is how should I create the required sting ? I tried: QString jpgBufferString( finalJpg.data() ); QString encodedString = jpgBufferString.toUtf8().toBase64(); but this does not decode the image and simply shows the broken image icon in the browser. Can anyone help with this ? Thanks in advance, best Alex -- http://www.carot.de Email : alexan...@carot.de Tel.: +49 (0)177 5719797 _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest