mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
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:
parent
f8767e0c5d
commit
b1823f12e5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user