mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-11 12:06:37 +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
9add7e4a4d
commit
592c8a4f38
@ -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