OSDN Git Service

default to compression level 1 for images like qCompress()
authorIvailo Monev <xakepa10@gmail.com>
Sat, 26 Feb 2022 15:17:14 +0000 (17:17 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 26 Feb 2022 15:17:14 +0000 (17:17 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qimagewriter.cpp

index 59d4a9f..a13e500 100644 (file)
@@ -161,7 +161,7 @@ QImageWriterPrivate::QImageWriterPrivate()
     deleteDevice(false),
     handler(nullptr),
     quality(-1),
-    compression(0),
+    compression(1),
     gamma(0.0),
     imageWriterError(QImageWriter::UnknownError),
     errorString(QT_TRANSLATE_NOOP(QImageWriter, QLatin1String("Unknown error")))
@@ -347,7 +347,7 @@ void QImageWriter::setCompression(int compression)
 }
 
 /*!
-    Returns the compression of the image.
+    Returns the compression of the image. Default value is 1.
 
     \sa setCompression()
 */