mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-30 17:17:21 -04:00
Handle an edge case in imageutil
This commit is contained in:
parent
2e0063da05
commit
a988b1dd8b
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ bool ImageUtil::optimizeSizeHtml(QString &html, const QImage& original, QImage &
|
||||||
QByteArray bytearray;
|
QByteArray bytearray;
|
||||||
if(maxBytes > 0){
|
if(maxBytes > 0){
|
||||||
maxBytes = maxBytes * 3/4 - 50; //base64 and html stuff
|
maxBytes = maxBytes * 3/4 - 50; //base64 and html stuff
|
||||||
|
if(maxBytes < 1) maxBytes = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(optimizeSizeBytes(bytearray, original, optimized, maxPixels, maxBytes))
|
if(optimizeSizeBytes(bytearray, original, optimized, maxPixels, maxBytes))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue