4#ifndef RGBCOLORSPACE_P_H
5#define RGBCOLORSPACE_P_H
10#include "cielchd50values.h"
11#include "constpropagatingrawpointer.h"
12#include "helperconstants.h"
13#include "oklchvalues.h"
14#include "rgbcolorspace.h"
17#include <qcontainerfwd.h>
22#include <qversionnumber.h>
31class RgbColorSpacePrivate final
45 explicit RgbColorSpacePrivate(RgbColorSpace *backLink);
50 ~RgbColorSpacePrivate() noexcept = default;
69 std::map<
double, QColor> m_chromaticityBoundaryByCielchD50Hue360;
86 std::map<
double, QColor> m_chromaticityBoundaryByOklabHue360;
94 qreal m_cielabD50BlackpointL = 0;
97 qreal m_cielabD50WhitepointL = 100;
105 qreal m_oklabBlackpointL = 0;
108 qreal m_oklabWhitepointL = 1;
111 QString m_profileAbsoluteFilePath;
114 cmsProfileClassSignature m_profileClass;
117 cmsColorSpaceSignature m_profileColorModel;
120 QString m_profileCopyright;
123 QDateTime m_profileCreationDateTime;
126 qint64 m_profileFileSize = -1;
129 bool m_profileHasClut = false;
132 bool m_profileHasMatrixShaper = false;
135 RgbColorSpace::RenderingIntentDirections m_profileRenderingIntentDirections;
138 QVersionNumber m_profileIccVersion;
141 QString m_profileManufacturer;
144 double m_profileMaximumCielchD50Chroma = CielchD50Values::maximumChroma;
147 double m_profileMaximumOklchChroma = OklchValues::maximumChroma;
150 QString m_profileModel;
153 QString m_profileName;
156 cmsColorSpaceSignature m_profilePcsColorModel;
159 std::optional<cmsCIEXYZ> m_profileTagBlackpoint;
162 std::optional<cmsCIEXYZ> m_profileTagBluePrimary;
165 std::optional<cmsCIEXYZ> m_profileTagGreenPrimary;
168 std::optional<cmsCIEXYZ> m_profileTagRedPrimary;
171 QStringList m_profileTagSignatures;
174 std::optional<cmsCIEXYZ> m_profileTagWhitepoint;
176 cmsHTRANSFORM m_transformCielabD50ToRgb16Handle =
nullptr;
178 cmsHTRANSFORM m_transformCielabD50ToRgbHandle =
nullptr;
180 cmsHTRANSFORM m_transformRgbToCielabD50Handle =
nullptr;
183 static
void deleteTransform(cmsHTRANSFORM *transformHandle);
184 void initializeChromaticityBoundaries();
185 [[nodiscard]]
bool initialize(cmsHPROFILE rgbProfileHandle);
186 [[nodiscard]] Q_INVOKABLE QColor maxChromaColorByHue360(
double oklabHue360, RgbColorSpacePrivate::LchSpace type) const;
187 [[nodiscard]] static QDateTime profileCreationDateTime(cmsHPROFILE profileHandle);
188 [[nodiscard]] static QVersionNumber profileIccVersion(cmsHPROFILE profileHandle);
189 [[nodiscard]] static QString profileInformation(cmsHPROFILE profileHandle, cmsInfoType infoType, const QString &languageTerritory);
190 [[nodiscard]] static std::optional<cmsCIEXYZ> profileReadCmsciexyzTag(cmsHPROFILE profileHandle, cmsTagSignature signature);
191 [[nodiscard]] static QStringList profileTagSignatures(cmsHPROFILE profileHandle);
206 static constexpr
double chromaDetectionIncrementFactor = 1.02;
218 static constexpr qreal cielabDeviationLimit = 0.5;
230 static constexpr qreal oklabDeviationLimit = 0.001;
233 Q_DISABLE_COPY(RgbColorSpacePrivate)
237 ConstPropagatingRawPointer<RgbColorSpace> q_pointer;
The namespace of this library.