summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qicc.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-12 18:18:21 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-02 09:44:55 +0200
commit76c097c4d7eb873052de031fbc2d21579aa3947a (patch)
tree828ba096338d79be400d32c29538f38c7600016c /src/gui/painting/qicc.cpp
parent97d651711480be05a060b37baa6c86bf75c3df30 (diff)
Improve our color space terminology
Replace our use of 'gamut' with 'primaries'. One is the axes of the color space, the other the volume of representable values. For the currently supported color spaces those are mostly equivalent, but when we later add support for scRgb, this would be misleading as it has the same primaries as sRGB but a much wider gamut, and we would like to use the same primaries/"gamut" id for it. Also few people would know what "the sRGB gamut" is, but "the sRGB primaries" is easily googable. Change-Id: I3348ccaae27a071ec77a4356331b9bbbf92e0d19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qicc.cpp')
-rw-r--r--src/gui/painting/qicc.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/painting/qicc.cpp b/src/gui/painting/qicc.cpp
index 1941981d30..6cb7b57493 100644
--- a/src/gui/painting/qicc.cpp
+++ b/src/gui/painting/qicc.cpp
@@ -677,26 +677,26 @@ bool fromIccProfile(const QByteArray &data, QColorSpace *colorSpace)
if (!parseXyzData(data, tagIndex[Tag::wtpt], colorspaceDPtr->whitePoint))
return false;
- colorspaceDPtr->gamut = QColorSpace::Gamut::Custom;
+ colorspaceDPtr->primaries = QColorSpace::Primaries::Custom;
if (colorspaceDPtr->toXyz == QColorMatrix::toXyzFromSRgb()) {
- qCDebug(lcIcc) << "fromIccProfile: sRGB gamut detected";
- colorspaceDPtr->gamut = QColorSpace::Gamut::SRgb;
+ qCDebug(lcIcc) << "fromIccProfile: sRGB primaries detected";
+ colorspaceDPtr->primaries = QColorSpace::Primaries::SRgb;
} else if (colorspaceDPtr->toXyz == QColorMatrix::toXyzFromAdobeRgb()) {
- qCDebug(lcIcc) << "fromIccProfile: Adobe RGB gamut detected";
- colorspaceDPtr->gamut = QColorSpace::Gamut::AdobeRgb;
+ qCDebug(lcIcc) << "fromIccProfile: Adobe RGB primaries detected";
+ colorspaceDPtr->primaries = QColorSpace::Primaries::AdobeRgb;
} else if (colorspaceDPtr->toXyz == QColorMatrix::toXyzFromDciP3D65()) {
- qCDebug(lcIcc) << "fromIccProfile: DCI-P3 D65 gamut detected";
- colorspaceDPtr->gamut = QColorSpace::Gamut::DciP3D65;
+ qCDebug(lcIcc) << "fromIccProfile: DCI-P3 D65 primaries detected";
+ colorspaceDPtr->primaries = QColorSpace::Primaries::DciP3D65;
} else if (colorspaceDPtr->toXyz == QColorMatrix::toXyzFromBt2020()) {
- qCDebug(lcIcc) << "fromIccProfile: BT.2020 gamut detected";
- colorspaceDPtr->gamut = QColorSpace::Gamut::Bt2020;
+ qCDebug(lcIcc) << "fromIccProfile: BT.2020 primaries detected";
+ colorspaceDPtr->primaries = QColorSpace::Primaries::Bt2020;
}
if (colorspaceDPtr->toXyz == QColorMatrix::toXyzFromProPhotoRgb()) {
- qCDebug(lcIcc) << "fromIccProfile: ProPhoto RGB gamut detected";
- colorspaceDPtr->gamut = QColorSpace::Gamut::ProPhotoRgb;
+ qCDebug(lcIcc) << "fromIccProfile: ProPhoto RGB primaries detected";
+ colorspaceDPtr->primaries = QColorSpace::Primaries::ProPhotoRgb;
}
// Reset the matrix to our canonical values:
- if (colorspaceDPtr->gamut != QColorSpace::Gamut::Custom)
+ if (colorspaceDPtr->primaries != QColorSpace::Primaries::Custom)
colorspaceDPtr->setToXyzMatrix();
// Parse TRC tags