Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QColorSpace Class Reference

The QColorSpace class provides a color space abstraction. More...

#include <qcolorspace.h>

+ Collaboration diagram for QColorSpace:

Public Types

enum  NamedColorSpace {
  SRgb = 1 , SRgbLinear , AdobeRgb , DisplayP3 ,
  ProPhotoRgb
}
 Predefined color spaces. More...
 
enum class  Primaries {
  Custom = 0 , SRgb , AdobeRgb , DciP3D65 ,
  ProPhotoRgb
}
 Predefined sets of primary colors. More...
 
enum class  TransferFunction {
  Custom = 0 , Linear , Gamma , SRgb ,
  ProPhotoRgb
}
 Predefined transfer functions or gamma curves. More...
 

Public Member Functions

 QColorSpace () noexcept=default
 Creates a new colorspace object that represents an undefined and invalid colorspace.
 
 QColorSpace (NamedColorSpace namedColorSpace)
 Creates a new colorspace object that represents a namedColorSpace.
 
 QColorSpace (Primaries primaries, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom color space with the primaries primaries, using the transfer function transferFunction and optionally gamma.
 
 QColorSpace (Primaries primaries, float gamma)
 Creates a custom color space with the primaries primaries, using a gamma transfer function of gamma.
 
 QColorSpace (Primaries primaries, const QList< uint16_t > &transferFunctionTable)
 Creates a custom color space with the primaries gamut, using a custom transfer function described by transferFunctionTable.
 
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, TransferFunction transferFunction, float gamma=0.0f)
 Creates a custom colorspace with a primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the transfer function transferFunction and optionally gamma.
 
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, const QList< uint16_t > &transferFunctionTable)
 Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer function described by transferFunctionTable.
 
 QColorSpace (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint, const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable)
 Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer functions described by redTransferFunctionTable, greenTransferFunctionTable, and blueTransferFunctionTable.
 
 ~QColorSpace ()
 
 QColorSpace (const QColorSpace &colorSpace) noexcept
 
QColorSpaceoperator= (const QColorSpace &colorSpace) noexcept
 
 QColorSpace (QColorSpace &&colorSpace) noexcept=default
 
void swap (QColorSpace &colorSpace) noexcept
 Swaps color space other with this color space.
 
Primaries primaries () const noexcept
 Returns the predefined primaries of the color space or primaries::Custom if it doesn't match any of them.
 
TransferFunction transferFunction () const noexcept
 Returns the predefined transfer function of the color space or TransferFunction::Custom if it doesn't match any of them.
 
float gamma () const noexcept
 Returns the gamma value of color spaces with TransferFunction::Gamma, an approximate gamma value for other predefined color spaces, or 0.0 if no approximate gamma is known.
 
QString description () const noexcept
 Returns the name or short description.
 
void setDescription (const QString &description)
 Sets the name or short description of the color space to description.
 
void setTransferFunction (TransferFunction transferFunction, float gamma=0.0f)
 Sets the transfer function to transferFunction and gamma.
 
void setTransferFunction (const QList< uint16_t > &transferFunctionTable)
 Sets the transfer function to transferFunctionTable.
 
void setTransferFunctions (const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable)
 Sets the transfer functions to redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.
 
QColorSpace withTransferFunction (TransferFunction transferFunction, float gamma=0.0f) const
 Returns a copy of this color space, except using the transfer function transferFunction and gamma.
 
QColorSpace withTransferFunction (const QList< uint16_t > &transferFunctionTable) const
 Returns a copy of this color space, except using the transfer function described by transferFunctionTable.
 
QColorSpace withTransferFunctions (const QList< uint16_t > &redTransferFunctionTable, const QList< uint16_t > &greenTransferFunctionTable, const QList< uint16_t > &blueTransferFunctionTable) const
 Returns a copy of this color space, except using the transfer functions described by redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.
 
void setPrimaries (Primaries primariesId)
 Sets the primaries to those of the primariesId set.
 
void setPrimaries (const QPointF &whitePoint, const QPointF &redPoint, const QPointF &greenPoint, const QPointF &bluePoint)
 Set primaries to the chromaticities of whitePoint, redPoint, greenPoint and bluePoint.
 
void detach ()
 
bool isValid () const noexcept
 Returns true if the color space is valid.
 
QByteArray iccProfile () const
 Returns an ICC profile representing the color space.
 
QColorTransform transformationToColorSpace (const QColorSpace &colorspace) const
 Generates and returns a color space transformation from this color space to colorspace.
 
 operator QVariant () const
 Returns the color space as a QVariant.
 

Static Public Member Functions

static QColorSpace fromIccProfile (const QByteArray &iccProfile)
 Creates a QColorSpace from ICC profile iccProfile.
 

Friends

class QColorSpacePrivate
 
bool operator== (const QColorSpace &colorSpace1, const QColorSpace &colorSpace2)
 Returns true if colorspace colorSpace1 is equal to colorspace colorSpace2; otherwise returns false.
 
bool operator!= (const QColorSpace &colorSpace1, const QColorSpace &colorSpace2)
 Returns true if colorspace colorSpace1 is not equal to colorspace colorSpace2; otherwise returns false.
 
Q_GUI_EXPORT QDebug operator<< (QDebug dbg, const QColorSpace &colorSpace)
 

Related Symbols

(Note that these are not member symbols.)

QDataStreamoperator<< (QDataStream &stream, const QColorSpace &colorSpace)
 Writes the given colorSpace to the given stream as an ICC profile.
 
QDataStreamoperator>> (QDataStream &stream, QColorSpace &colorSpace)
 Reads a color space from the given stream and stores it in the given colorSpace.
 

Detailed Description

The QColorSpace class provides a color space abstraction.

Since
5.14

\inmodule QtGui

Color values can be interpreted in different ways, and based on the interpretation can live in different spaces. We call this {color spaces}.

QColorSpace provides access to creating several predefined color spaces and can generate QColorTransforms for converting colors from one color space to another.

QColorSpace can also represent color spaces defined by ICC profiles or embedded in images, that do not otherwise fit the predefined color spaces.

A color space can generally speaking be conceived as a combination of set of primary colors and a transfer function. The primaries defines the axes of the color space, and the transfer function how values are mapped on the axes. The primaries are defined by three primary colors that represent exactly how red, green, and blue look in this particular color space, and a white color that represents where and how bright pure white is. The range of colors expressible by the primary colors is called the gamut, and a color space that can represent a wider range of colors is also known as a wide-gamut color space.

The transfer function or gamma curve determines how each component in the color space is encoded. These are used because human perception does not operate linearly, and the transfer functions try to ensure that colors will seem evenly spaced to human eyes.

Definition at line 20 of file qcolorspace.h.

Member Enumeration Documentation

◆ NamedColorSpace

Predefined color spaces.

\value SRgb The sRGB color space, which Qt operates in by default. It is a close approximation of how most classic monitors operate, and a mode most software and hardware support. \l{http://www.color.org/chardata/rgb/srgb.xalter}{ICC registration of sRGB}. \value SRgbLinear The sRGB color space with linear gamma. Useful for gamma-corrected blending. \value AdobeRgb The Adobe RGB color space is a classic wide-gamut color space, using a gamma of 2.2. \l{http://www.color.org/chardata/rgb/adobergb.xalter}{ICC registration of Adobe RGB (1998)} \value DisplayP3 A color-space using the primaries of DCI-P3, but with the whitepoint and transfer function of sRGB. Common in modern wide-gamut screens. \l{http://www.color.org/chardata/rgb/DCIP3.xalter}{ICC registration of DCI-P3} \value ProPhotoRgb The Pro Photo RGB color space, also known as ROMM RGB is a very wide gamut color space. \l{http://www.color.org/chardata/rgb/rommrgb.xalter}{ICC registration of ROMM RGB}

Enumerator
SRgb 
SRgbLinear 
AdobeRgb 
DisplayP3 
ProPhotoRgb 

Definition at line 24 of file qcolorspace.h.

◆ Primaries

enum class QColorSpace::Primaries
strong

Predefined sets of primary colors.

\value Custom The primaries are undefined or does not match any predefined sets. \value SRgb The sRGB primaries \value AdobeRgb The Adobe RGB primaries \value DciP3D65 The DCI-P3 primaries with the D65 whitepoint \value ProPhotoRgb The ProPhoto RGB primaries with the D50 whitepoint

Enumerator
Custom 
SRgb 
AdobeRgb 
DciP3D65 
ProPhotoRgb 

Definition at line 32 of file qcolorspace.h.

◆ TransferFunction

enum class QColorSpace::TransferFunction
strong

Predefined transfer functions or gamma curves.

\value Custom The custom or null transfer function \value Linear The linear transfer functions \value Gamma A transfer function that is a real gamma curve based on the value of gamma() \value SRgb The sRGB transfer function, composed of linear and gamma parts \value ProPhotoRgb The ProPhoto RGB transfer function, composed of linear and gamma parts

Enumerator
Custom 
Linear 
Gamma 
SRgb 
ProPhotoRgb 

Definition at line 40 of file qcolorspace.h.

Constructor & Destructor Documentation

◆ QColorSpace() [1/10]

QColorSpace::QColorSpace ( )
defaultnoexcept

Creates a new colorspace object that represents an undefined and invalid colorspace.

◆ QColorSpace() [2/10]

QColorSpace::QColorSpace ( NamedColorSpace  namedColorSpace)

Creates a new colorspace object that represents a namedColorSpace.

Definition at line 524 of file qcolorspace.cpp.

References isValid(), ProPhotoRgb, Q_ASSERT, QColorSpacePrivate, qWarning, and s_predefinedColorspacePrivates.

+ Here is the call graph for this function:

◆ QColorSpace() [3/10]

QColorSpace::QColorSpace ( QColorSpace::Primaries  primaries,
QColorSpace::TransferFunction  transferFunction,
float  gamma = 0.0f 
)

Creates a custom color space with the primaries primaries, using the transfer function transferFunction and optionally gamma.

Definition at line 549 of file qcolorspace.cpp.

◆ QColorSpace() [4/10]

QColorSpace::QColorSpace ( QColorSpace::Primaries  primaries,
float  gamma 
)

Creates a custom color space with the primaries primaries, using a gamma transfer function of gamma.

Definition at line 558 of file qcolorspace.cpp.

◆ QColorSpace() [5/10]

QColorSpace::QColorSpace ( QColorSpace::Primaries  gamut,
const QList< uint16_t > &  transferFunctionTable 
)

Creates a custom color space with the primaries gamut, using a custom transfer function described by transferFunctionTable.

The table should contain at least 2 values, and contain an monotonically increasing list of values from 0 to 65535.

Since
6.1

Definition at line 572 of file qcolorspace.cpp.

◆ QColorSpace() [6/10]

QColorSpace::QColorSpace ( const QPointF whitePoint,
const QPointF redPoint,
const QPointF greenPoint,
const QPointF bluePoint,
QColorSpace::TransferFunction  transferFunction,
float  gamma = 0.0f 
)

Creates a custom colorspace with a primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the transfer function transferFunction and optionally gamma.

Definition at line 581 of file qcolorspace.cpp.

References gamma(), primaries(), QColorSpacePrivate, qWarning, and transferFunction().

+ Here is the call graph for this function:

◆ QColorSpace() [7/10]

QColorSpace::QColorSpace ( const QPointF whitePoint,
const QPointF redPoint,
const QPointF greenPoint,
const QPointF bluePoint,
const QList< uint16_t > &  transferFunctionTable 
)

Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer function described by transferFunctionTable.

Since
6.1

Definition at line 600 of file qcolorspace.cpp.

◆ QColorSpace() [8/10]

QColorSpace::QColorSpace ( const QPointF whitePoint,
const QPointF redPoint,
const QPointF greenPoint,
const QPointF bluePoint,
const QList< uint16_t > &  redTransferFunctionTable,
const QList< uint16_t > &  greenTransferFunctionTable,
const QList< uint16_t > &  blueTransferFunctionTable 
)

Creates a custom color space with primaries based on the chromaticities of the primary colors whitePoint, redPoint, greenPoint and bluePoint, and using the custom transfer functions described by redTransferFunctionTable, greenTransferFunctionTable, and blueTransferFunctionTable.

Since
6.1

Definition at line 614 of file qcolorspace.cpp.

◆ ~QColorSpace()

QColorSpace::~QColorSpace ( )
default

◆ QColorSpace() [9/10]

QColorSpace::QColorSpace ( const QColorSpace colorSpace)
defaultnoexcept

◆ QColorSpace() [10/10]

QColorSpace::QColorSpace ( QColorSpace &&  colorSpace)
defaultnoexcept

Member Function Documentation

◆ description()

QString QColorSpace::description ( ) const
noexcept

Returns the name or short description.

If a description hasn't been given in setDescription(), the original name of the profile is returned if the profile is unmodified, a guessed name is returned if the profile has been recognized as a known color space, otherwise an empty string is returned.

Since
6.2

Definition at line 1009 of file qcolorspace.cpp.

References QColorSpacePrivate::description, QString::isEmpty(), and QColorSpacePrivate::userDescription.

Referenced by setDescription(), QIcc::toIccProfile(), and QPNGImageWriter::writeImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ detach()

void QColorSpace::detach ( )

Definition at line 852 of file qcolorspace.cpp.

References QExplicitlySharedDataPointer< T >::detach(), and QColorSpacePrivate.

Referenced by QIcc::fromIccProfile(), fromIccProfile(), setDescription(), setPrimaries(), setPrimaries(), setTransferFunction(), setTransferFunction(), and setTransferFunctions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromIccProfile()

QColorSpace QColorSpace::fromIccProfile ( const QByteArray iccProfile)
static

Creates a QColorSpace from ICC profile iccProfile.

Note
Not all ICC profiles are supported. QColorSpace only supports RGB-XYZ ICC profiles that are three-component matrix-based.

If the ICC profile is not supported an invalid QColorSpace is returned where you can still read the original ICC profile using iccProfile().

See also
iccProfile()

Definition at line 894 of file qcolorspace.cpp.

References detach(), QIcc::fromIccProfile(), iccProfile(), and QColorSpacePrivate::iccProfile.

Referenced by operator>>(), QJpegHandlerPrivate::read(), QTiffHandler::read(), QWebpHandler::read(), and QPngHandlerPrivate::readPngHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gamma()

float QColorSpace::gamma ( ) const
noexcept

Returns the gamma value of color spaces with TransferFunction::Gamma, an approximate gamma value for other predefined color spaces, or 0.0 if no approximate gamma is known.

See also
transferFunction()

Definition at line 669 of file qcolorspace.cpp.

References QColorSpacePrivate::gamma, and Q_UNLIKELY.

Referenced by QColorSpace(), setTransferFunction(), withTransferFunction(), and QPNGImageWriter::writeImage().

+ Here is the caller graph for this function:

◆ iccProfile()

QByteArray QColorSpace::iccProfile ( ) const

Returns an ICC profile representing the color space.

If the color space was generated from an ICC profile, that profile is returned, otherwise one is generated.

Note
Even invalid color spaces may return the ICC profile if they were generated from one, to allow applications to implement wider support themselves.
See also
fromIccProfile()

Definition at line 872 of file qcolorspace.cpp.

References QColorSpacePrivate::iccProfile, QByteArray::isEmpty(), isValid(), Q_UNLIKELY, and QIcc::toIccProfile().

Referenced by fromIccProfile(), and QPNGImageWriter::writeImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValid()

bool QColorSpace::isValid ( ) const
noexcept

Returns true if the color space is valid.

Definition at line 907 of file qcolorspace.cpp.

References QColorMatrix::isValid(), QColorTrc::isValid(), QColorSpacePrivate::toXyz, and QColorSpacePrivate::trc.

Referenced by QColorSpace(), convert_ARGB_to_gray16(), convert_ARGB_to_gray8(), convert_Indexed8_to_Grayscale8(), convert_RGBA64_to_gray16(), convert_RGBA64_to_gray8(), QImage::convertedToColorSpace(), QImage::convertToColorSpace(), destStoreGray16(), destStoreGray8(), iccProfile(), readImage(), QPngHandlerPrivate::readPngHeader(), QPngHandlerPrivate::readPngImage(), QIcc::toIccProfile(), transformationToColorSpace(), withTransferFunction(), withTransferFunction(), and withTransferFunctions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator QVariant()

QColorSpace::operator QVariant ( ) const

Returns the color space as a QVariant.

Since
5.15

Definition at line 996 of file qcolorspace.cpp.

References QVariant::fromValue().

+ Here is the call graph for this function:

◆ operator=()

QColorSpace & QColorSpace::operator= ( const QColorSpace colorSpace)
inlinenoexcept

Definition at line 68 of file qcolorspace.h.

References copy(), and swap().

+ Here is the call graph for this function:

◆ primaries()

QColorSpace::Primaries QColorSpace::primaries ( ) const
noexcept

Returns the predefined primaries of the color space or primaries::Custom if it doesn't match any of them.

Definition at line 642 of file qcolorspace.cpp.

References Custom, QColorSpacePrivate::primaries, and Q_UNLIKELY.

Referenced by QColorSpace(), and setPrimaries().

+ Here is the caller graph for this function:

◆ setDescription()

void QColorSpace::setDescription ( const QString description)

Sets the name or short description of the color space to description.

If set to empty description() will return original or guessed descriptions instead.

Since
6.2

Definition at line 1024 of file qcolorspace.cpp.

References description(), detach(), and QColorSpacePrivate::userDescription.

+ Here is the call graph for this function:

◆ setPrimaries() [1/2]

void QColorSpace::setPrimaries ( const QPointF whitePoint,
const QPointF redPoint,
const QPointF greenPoint,
const QPointF bluePoint 
)

Set primaries to the chromaticities of whitePoint, redPoint, greenPoint and bluePoint.

See also
primaries()

Definition at line 828 of file qcolorspace.cpp.

References QString::clear(), Custom, QColorSpacePrivate::description, detach(), QColorSpacePrivate::identifyColorSpace(), primaries(), QColorSpacePrivate::primaries, QColorSpacePrivate, QColorSpacePrivate::toXyz, and QColorSpacePrivate::whitePoint.

+ Here is the call graph for this function:

◆ setPrimaries() [2/2]

void QColorSpace::setPrimaries ( QColorSpace::Primaries  primariesId)

Sets the primaries to those of the primariesId set.

See also
primaries()

Definition at line 805 of file qcolorspace.cpp.

References QString::clear(), Custom, QColorSpacePrivate::description, detach(), QColorSpacePrivate::identifyColorSpace(), QColorSpacePrivate::primaries, QColorSpacePrivate, and QColorSpacePrivate::setToXyzMatrix().

+ Here is the call graph for this function:

◆ setTransferFunction() [1/2]

void QColorSpace::setTransferFunction ( const QList< uint16_t > &  transferFunctionTable)

Sets the transfer function to transferFunctionTable.

Since
6.1
See also
withTransferFunction()

Definition at line 705 of file qcolorspace.cpp.

References QString::clear(), Custom, QColorSpacePrivate::description, detach(), QColorSpacePrivate::gamma, QColorSpacePrivate::identifyColorSpace(), QColorSpacePrivate, QBasicAtomicInteger< T >::ref(), QSharedData::ref, QColorSpacePrivate::setTransferFunction(), and QColorSpacePrivate::setTransferFunctionTable().

+ Here is the call graph for this function:

◆ setTransferFunction() [2/2]

void QColorSpace::setTransferFunction ( QColorSpace::TransferFunction  transferFunction,
float  gamma = 0.0f 
)

Sets the transfer function to transferFunction and gamma.

See also
transferFunction(), gamma(), withTransferFunction()

Definition at line 681 of file qcolorspace.cpp.

References QString::clear(), Custom, QColorSpacePrivate::description, detach(), gamma(), QColorSpacePrivate::gamma, QColorSpacePrivate::identifyColorSpace(), QColorSpacePrivate, QColorSpacePrivate::setTransferFunction(), transferFunction(), and QColorSpacePrivate::transferFunction.

Referenced by QPngHandlerPrivate::readPngImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTransferFunctions()

void QColorSpace::setTransferFunctions ( const QList< uint16_t > &  redTransferFunctionTable,
const QList< uint16_t > &  greenTransferFunctionTable,
const QList< uint16_t > &  blueTransferFunctionTable 
)

Sets the transfer functions to redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.

Since
6.1
See also
withTransferFunctions()

Definition at line 727 of file qcolorspace.cpp.

References QString::clear(), QColorSpacePrivate::description, detach(), QColorSpacePrivate::gamma, QColorSpacePrivate::identifyColorSpace(), QColorSpacePrivate, QBasicAtomicInteger< T >::ref(), QSharedData::ref, and QColorSpacePrivate::setTransferFunctionTables().

+ Here is the call graph for this function:

◆ swap()

void QColorSpace::swap ( QColorSpace other)
inlinenoexcept

Swaps color space other with this color space.

This operation is very fast and never fails.

Definition at line 78 of file qcolorspace.h.

◆ transferFunction()

QColorSpace::TransferFunction QColorSpace::transferFunction ( ) const
noexcept

Returns the predefined transfer function of the color space or TransferFunction::Custom if it doesn't match any of them.

See also
gamma(), setTransferFunction(), withTransferFunction()

Definition at line 655 of file qcolorspace.cpp.

References Custom, Q_UNLIKELY, and QColorSpacePrivate::transferFunction.

Referenced by QColorSpace(), QRasterPaintEngine::alphaPenBlt(), loadCubeMap(), setTransferFunction(), and withTransferFunction().

+ Here is the caller graph for this function:

◆ transformationToColorSpace()

QColorTransform QColorSpace::transformationToColorSpace ( const QColorSpace colorspace) const

Generates and returns a color space transformation from this color space to colorspace.

Definition at line 981 of file qcolorspace.cpp.

References QExplicitlySharedDataPointer< T >::get(), isValid(), and QColorSpacePrivate::transformationToColorSpace().

Referenced by QImage::convertToColorSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withTransferFunction() [1/2]

QColorSpace QColorSpace::withTransferFunction ( const QList< uint16_t > &  transferFunctionTable) const

Returns a copy of this color space, except using the transfer function described by transferFunctionTable.

Since
6.1
See also
transferFunction(), setTransferFunction()

Definition at line 772 of file qcolorspace.cpp.

References isValid(), and out.

+ Here is the call graph for this function:

◆ withTransferFunction() [2/2]

QColorSpace QColorSpace::withTransferFunction ( QColorSpace::TransferFunction  transferFunction,
float  gamma = 0.0f 
) const

Returns a copy of this color space, except using the transfer function transferFunction and gamma.

See also
transferFunction(), gamma(), setTransferFunction()

Definition at line 754 of file qcolorspace.cpp.

References Custom, gamma(), QColorSpacePrivate::gamma, isValid(), out, transferFunction(), and QColorSpacePrivate::transferFunction.

Referenced by QPNGImageWriter::writeImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withTransferFunctions()

QColorSpace QColorSpace::withTransferFunctions ( const QList< uint16_t > &  redTransferFunctionTable,
const QList< uint16_t > &  greenTransferFunctionTable,
const QList< uint16_t > &  blueTransferFunctionTable 
) const

Returns a copy of this color space, except using the transfer functions described by redTransferFunctionTable, greenTransferFunctionTable and blueTransferFunctionTable.

Since
6.1
See also
setTransferFunctions()

Definition at line 789 of file qcolorspace.cpp.

References isValid(), and out.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QColorSpace::operator!= ( const QColorSpace colorSpace1,
const QColorSpace colorSpace2 
)
friend

Returns true if colorspace colorSpace1 is not equal to colorspace colorSpace2; otherwise returns false.

Definition at line 108 of file qcolorspace.h.

◆ operator<<() [1/2]

QDataStream & operator<< ( QDataStream stream,
const QColorSpace colorSpace 
)
related

Writes the given colorSpace to the given stream as an ICC profile.

See also
QColorSpace::iccProfile(), {Serializing Qt Data Types}

Definition at line 1043 of file qcolorspace.cpp.

◆ operator<< [2/2]

Q_GUI_EXPORT QDebug operator<< ( QDebug  dbg,
const QColorSpace colorSpace 
)
friend

Definition at line 1069 of file qcolorspace.cpp.

◆ operator==

bool QColorSpace::operator== ( const QColorSpace colorSpace1,
const QColorSpace colorSpace2 
)
friend

Returns true if colorspace colorSpace1 is equal to colorspace colorSpace2; otherwise returns false.

Definition at line 106 of file qcolorspace.h.

◆ operator>>()

QDataStream & operator>> ( QDataStream stream,
QColorSpace colorSpace 
)
related

Reads a color space from the given stream and stores it in the given colorSpace.

See also
QColorSpace::fromIccProfile(), {Serializing Qt Data Types}

Definition at line 1059 of file qcolorspace.cpp.

References fromIccProfile().

+ Here is the call graph for this function:

◆ QColorSpacePrivate


The documentation for this class was generated from the following files: