[RichTextComposerImages] Rescale QImage accordingly

Authored by poboiko on May 30 2020, 12:07 AM.

Description

[RichTextComposerImages] Rescale QImage accordingly

The width and height are currently used to set properties of
QTextImageFormat, which then are used to set "width" and "height" html
properties for img tag, so that rescaling will be done by whoever reads
generated html. The image itself is not affected.
By also rescaling the image itself, we can save some space and reduce
the size of the document
(e.g.: I tried to add a HD photo of original size 4000x2000, whose base64
was ~12mb; I resized it to 500x250, and the size reduced to 300kb)

Details

Committed
poboikoMay 30 2020, 12:21 AM
Parents
R86:7ebe642063d0: Don't crash if activateRichText was called before createActions
Branches
Unknown
Tags
Unknown