mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
Use binary search to find the right file size
This commit is contained in:
parent
c17a8e7d51
commit
f434e6559b
3 changed files with 47 additions and 22 deletions
|
@ -1123,7 +1123,8 @@ bool RsHtml::makeEmbeddedImage(const QImage &originalImage, QString &embeddedIma
|
|||
{
|
||||
RsScopeTimer s("Embed image");
|
||||
QImage opt;
|
||||
ImageUtil::optimizeSize(embeddedImage, originalImage, opt, maxPixels, 6000);
|
||||
ImageUtil::optimizeSize(embeddedImage, originalImage, opt, maxPixels, 6000-500);
|
||||
// -500 bytes: keep space for html stuff
|
||||
}
|
||||
|
||||
QString RsHtml::plainText(const QString &text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue