QImageWriter: Fix default compressionratio

Before asking a image format handler to save an image, QImageWriter
sets the value of all supported options. For options like quality and
gamma, the default value is an illegal value (-1 and 0.0 resp.),
effectively telling the handler that the application has not requested
any particular value. But in the case of compressionratio, the default
was 0, a legal value. Fix by changing it to -1.

Change-Id: Iad6d4c2dbe269b25863e7d4967aa9ed2a7d1247f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
bb10
Eirik Aavitsland 2018-09-13 11:37:39 +02:00
parent b233ce66d3
commit 7a6a9dbb7d
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ QImageWriterPrivate::QImageWriterPrivate(QImageWriter *qq)
deleteDevice = false;
handler = 0;
quality = -1;
compression = 0;
compression = -1;
gamma = 0.0;
optimizedWrite = false;
progressiveScanWrite = false;