diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2018-09-13 11:37:39 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2018-09-25 12:32:34 +0000 |
commit | 7a6a9dbb7d0e8f46c3cd56290d8506ffe5111f07 (patch) | |
tree | 0f7548bc3a873145b82379f0f80df73e9dbeb32a /src/gui/image | |
parent | b233ce66d3c25acff514157cfe5c7a4edd9ca7c9 (diff) |
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>
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qimagewriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 62eeb74727..5ce7e309bb 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -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; |