mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 20:36:36 -05:00
keep PNG for avatars
This commit is contained in:
parent
0a8f4b1b6e
commit
31bdd6c226
6 changed files with 7 additions and 7 deletions
|
|
@ -1094,7 +1094,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
|
|||
QImage image(icon.pixmap(height,height).toImage());
|
||||
QByteArray byteArray;
|
||||
QBuffer buffer(&byteArray);
|
||||
image.save(&buffer, "JPG"); // writes the image in PNG format inside the buffer
|
||||
image.save(&buffer, "PNG"); // writes the image in PNG format inside the buffer
|
||||
QString iconBase64 = QString::fromLatin1(byteArray.toBase64().data());
|
||||
strPreName = QString("<img src=\"data:image/png;base64,%1\" alt=\"[unsigned]\" />").arg(iconBase64);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue