refactor: default clipboard image base64 to JPG instead of PNG

Hardcoding this is already far from ideal. We should at least use the
same type that's later used in desktop before sending images to
status-go, **before** this gets fixed properly.

The next step will be to detect codecs and use them them dynamically.
This commit is contained in:
Pascal Precht 2022-11-25 15:02:01 +01:00 committed by Michał
parent f8767e0c5d
commit b1823f12e5
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ QString QClipboardProxy::imageBase64() const
const auto img = image();
QByteArray byteArray;
QBuffer buffer(&byteArray);
img.save(&buffer, "PNG"); // writes the image in PNG format inside the buffer
return QStringLiteral("data:image/png;base64,") + byteArray.toBase64();
img.save(&buffer, "JPG");
return QStringLiteral("data:image/jpeg;base64,") + byteArray.toBase64();
}
bool QClipboardProxy::hasUrls() const