summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-03-17 23:51:45 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-03-26 15:26:35 +0100
commitc81b172781a35590a4f0345aa35e947d8e780694 (patch)
treedec6857ace186e66550f3a96b660864d5e923347 /src
parenta320b57f1d8532fc5ab00aed7a78c7f2f828da53 (diff)
Doc: Mark gamma-related functions deprecated in QImageReader/Writer
Change-Id: I0a9fbcca7a10a6555f5879cc4955f046eaa56602 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qimagereader.cpp4
-rw-r--r--src/gui/image/qimagewriter.cpp19
2 files changed, 14 insertions, 9 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 3eb1e01863..5cb7e1328e 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -101,7 +101,7 @@
This can be disabled by setting the environment variable
\c QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING.
- \sa QImageWriter, QImageIOHandler, QImageIOPlugin, QMimeDatabase
+ \sa QImageWriter, QImageIOHandler, QImageIOPlugin, QMimeDatabase, QColorSpace
\sa QImage::devicePixelRatio(), QPixmap::devicePixelRatio(), QIcon, QPainter::drawPixmap(), QPainter::drawImage(), Qt::AA_UseHighDpiPixmaps
*/
@@ -1152,6 +1152,7 @@ bool QImageReader::autoTransform() const
#if QT_DEPRECATED_SINCE(5, 15)
/*!
\since 5.6
+ \obsolete Use QColorSpace conversion on the QImage instead.
This is an image format specific function that forces images with
gamma information to be gamma corrected to \a gamma. For image formats
@@ -1169,6 +1170,7 @@ void QImageReader::setGamma(float gamma)
/*!
\since 5.6
+ \obsolete Use QImage::colorSpace() and QColorSpace::gamma() instead.
Returns the gamma level of the decoded image. If setGamma() has been
called and gamma correction is supported it will return the gamma set.
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 6e74b23f76..33f5e491c7 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -47,19 +47,18 @@
\ingroup painting
\ingroup io
- 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.
\sa setGamma()