|author||Topi Reinio <firstname.lastname@example.org>||2020-03-17 23:51:45 +0100|
|committer||Topi Reinio <email@example.com>||2020-03-26 15:26:35 +0100|
Doc: Mark gamma-related functions deprecated in QImageReader/Writer
Change-Id: I0a9fbcca7a10a6555f5879cc4955f046eaa56602 Reviewed-by: Lars Knoll <firstname.lastname@example.org> Reviewed-by: Paul Wicking <email@example.com>
Diffstat (limited to 'src/gui/image/qimagewriter.cpp')
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 6e74b23f76..33f5e491c7 100644
@@ -47,19 +47,18 @@
- QImageWriter supports setting format specific options, such as the
- gamma level, compression level and quality, prior to storing the
+ QImageWriter supports setting format specific options, such as
+ compression level and quality, prior to storing the
image. If you do not need such options, you can use QImage::save()
or QPixmap::save() instead.
To store an image, you start by constructing a QImageWriter
object. Pass either a file name or a device pointer, and the
image format to QImageWriter's constructor. You can then set
- several options, such as the gamma level (by calling setGamma())
- and quality (by calling setQuality()). canWrite() returns \c true if
- QImageWriter can write the image (i.e., the image format is
- supported and the device is open for writing). Call write() to
- write the image to the device.
+ several options, such as quality (by calling setQuality()).
+ canWrite() returns \c true if QImageWriter can write the image
+ (i.e., the image format is supported and the device is open for
+ writing). Call write() to write the image to the device.
If any error occurs when writing the image, write() will return
false. You can then call error() to find the type of error that
@@ -81,7 +80,7 @@
\snippet qimagewriter/main.cpp 0
- \sa QImageReader, QImageIOHandler, QImageIOPlugin
+ \sa QImageReader, QImageIOHandler, QImageIOPlugin, QColorSpace
@@ -500,6 +499,8 @@ int QImageWriter::compression() const
#if QT_DEPRECATED_SINCE(5, 15)
+ \obsolete Use QColorSpace conversion on the QImage instead.
This is an image format specific function that sets the gamma
level of the image to \a gamma. For image formats that do not
support setting the gamma level, this value is ignored.
@@ -515,6 +516,8 @@ void QImageWriter::setGamma(float gamma)
+ \obsolete Use QImage::colorSpace() and QColorSpace::gamma() instead.
Returns the gamma level of the image.