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"
16#include <qcontainerfwd.h>
22#include <qversionnumber.h>
32class RgbColorSpacePrivate final
35 [[nodiscard]]
static QMap<cmsUInt32Number, QString> getIntentList();
38 explicit RgbColorSpacePrivate(RgbColorSpace *backLink);
43 ~RgbColorSpacePrivate() noexcept = default;
53 qreal m_cielabD50BlackpointL = 0;
56 qreal m_cielabD50WhitepointL = 100;
64 qreal m_oklabBlackpointL = 0;
67 qreal m_oklabWhitepointL = 1;
70 QString m_profileAbsoluteFilePath;
73 cmsProfileClassSignature m_profileClass;
76 cmsColorSpaceSignature m_profileColorModel;
79 QString m_profileCopyright;
82 QDateTime m_profileCreationDateTime;
85 qint64 m_profileFileSize = -1;
88 bool m_profileHasClut = false;
91 bool m_profileHasMatrixShaper = false;
94 QVersionNumber m_profileIccVersion;
97 QString m_profileManufacturer;
100 double m_profileMaximumCielchD50Chroma = CielchD50Values::maximumChroma;
103 double m_profileMaximumOklchChroma = OklchValues::maximumChroma;
106 QString m_profileModel;
109 QString m_profileName;
112 cmsColorSpaceSignature m_profilePcsColorModel;
115 std::optional<cmsCIEXYZ> m_profileTagBlackpoint;
118 std::optional<cmsCIEXYZ> m_profileTagBluePrimary;
121 std::optional<cmsCIEXYZ> m_profileTagGreenPrimary;
124 std::optional<cmsCIEXYZ> m_profileTagRedPrimary;
127 QStringList m_profileTagSignatures;
130 std::optional<cmsCIEXYZ> m_profileTagWhitepoint;
132 cmsHTRANSFORM m_transformCielabD50ToRgb16Handle =
nullptr;
134 cmsHTRANSFORM m_transformCielabD50ToRgbHandle =
nullptr;
136 cmsHTRANSFORM m_transformRgbToCielabD50Handle =
nullptr;
139 static
void deleteTransform(cmsHTRANSFORM *transformHandle);
140 [[nodiscard]]
double detectMaximumCielchD50Chroma() const;
141 [[nodiscard]]
double detectMaximumOklchChroma() const;
142 [[nodiscard]]
bool initialize(cmsHPROFILE rgbProfileHandle);
143 [[nodiscard]] static QDateTime profileCreationDateTime(cmsHPROFILE profileHandle);
144 [[nodiscard]] static QVersionNumber profileIccVersion(cmsHPROFILE profileHandle);
145 [[nodiscard]] static QString profileInformation(cmsHPROFILE profileHandle, cmsInfoType infoType, const QString &languageTerritory);
146 [[nodiscard]] static std::optional<cmsCIEXYZ> profileReadCmsciexyzTag(cmsHPROFILE profileHandle, cmsTagSignature signature);
147 [[nodiscard]] static QStringList profileTagSignatures(cmsHPROFILE profileHandle);
176 static inline const QMap<cmsUInt32Number, QString> intentList = getIntentList();
185 static constexpr
double chromaDetectionHuePrecision = gamutPrecisionCielab;
199 static constexpr
double chromaDetectionIncrementFactor = 1.02;
211 static constexpr qreal cielabDeviationLimit = 0.5;
223 static constexpr qreal oklabDeviationLimit = 0.001;
226 Q_DISABLE_COPY(RgbColorSpacePrivate)
230 ConstPropagatingRawPointer<RgbColorSpace> q_pointer;
The namespace of this library.