Handle an edge case in imageutil

This commit is contained in:
hunbernd 2020-01-05 20:59:16 +01:00
parent 2e0063da05
commit a988b1dd8b

View File

@ -142,6 +142,7 @@ bool ImageUtil::optimizeSizeHtml(QString &html, const QImage& original, QImage &
QByteArray bytearray;
if(maxBytes > 0){
maxBytes = maxBytes * 3/4 - 50; //base64 and html stuff
if(maxBytes < 1) maxBytes = 1;
}
if(optimizeSizeBytes(bytearray, original, optimized, maxPixels, maxBytes))