mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 21:34:10 -05:00
Handle an edge case in imageutil
This commit is contained in:
parent
2e0063da05
commit
a988b1dd8b
@ -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…
x
Reference in New Issue
Block a user