- Qt 5.15
- Qt GUI
- C++ Classes
- QImageReader
- Qt 5.15.15 Reference Documentation

# Obsolete Members for QImageReader

The following members of class QImageReader are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` float | gamma() const
`(obsolete)` void | setGamma(float gamma)

## Member Function Documentation

### float QImageReader::gamma() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

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. If gamma level is not supported by the image format, `0.0` is returned.

This function was introduced in Qt 5.6.

See also setGamma().

### void QImageReader::setGamma(float gamma)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

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 gamma. For image formats that do not support gamma correction, this value is ignored.

To gamma correct to a standard PC color-space, set gamma to `1/2.2`.

This function was introduced in Qt 5.6.

See also gamma().