-
Notifications
You must be signed in to change notification settings - Fork 4
feat(QClipboardProxy): add support for images, html and urls #76
Conversation
4adde95
to
79f391b
Compare
79f391b
to
7d3513d
Compare
7d3513d
to
7621c10
Compare
7621c10
to
984e6a0
Compare
const auto img = image(); | ||
QByteArray byteArray; | ||
QBuffer buffer(&byteArray); | ||
img.save(&buffer, "PNG"); // writes the image in PNG format inside the buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we determine whether we really have a PNG? This could be JPG or WEBP as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we always save as PNG but we could yeah, TODO :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be problematic for GIFs... we would effectively kill the animation :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I don't think we support sending GIFs as image messages atm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stand corrected. It looks like we do
@caybro did the heavy-lifting here. Thank you! |
Related: status-im/status-desktop#3395