mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2879 from zapek/fix-image-jpeg-uri-mimetype
Fix image data URI
This commit is contained in:
commit
e888e89437
@ -274,7 +274,9 @@ bool ImageUtil::optimizeSizeHtml(QString &html, const QImage& original, QImage &
|
||||
if(optimizeSizeBytes(bytearray, original, optimized,has_transparency?"PNG":"JPG",maxPixels, maxBytes))
|
||||
{
|
||||
QByteArray encodedByteArray = bytearray.toBase64();
|
||||
html = "<img src=\"data:image/png;base64,";
|
||||
html = "<img src=\"data:image/";
|
||||
html.append(has_transparency ? "png" : "jpeg");
|
||||
html.append(";base64,");
|
||||
html.append(encodedByteArray);
|
||||
html.append("\">");
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user