On Friday, 26 January 2024 04:55:59 PST Alexander Carôt via Interest wrote:
> QString jpgBufferString( finalJpg.data() );

This here will corrupt the data, because you can't load arbitrary binary data 
into QString like this: it's trying to decode as UTF-8 and failing.

> QString encodedString = jpgBufferString.toUtf8().toBase64();

You should encode to Base64 at the QByteArray level first, before going to 
QString. So:

 QString encodedString = QString::fromLatin1(finalJpg.toBase64());

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to