79 : QObject(parent)
80{
83
84
86
88
89
91
97
99
100#ifdef Q_OS_MAC
101 iccProfileDirs.append(QDir::homePath() + "/Library/ColorSync/Profiles/");
102 iccProfileDirs.append("/System/Library/ColorSync/Profiles/");
103 iccProfileDirs.append("/Library/ColorSync/Profiles/");
104#endif
105#ifdef Q_OS_WIN
106 QString winPath = QString::fromUtf8(qgetenv("windir"));
107 winPath.replace('\\','/');
108 iccProfileDirs.append(winPath + "/System32/Spool/Drivers/Color/");
109
110#endif
111#ifdef Q_OS_LINUX
112 iccProfileDirs.append(QDir::homePath() + "./share/color/icc");
113#endif
114
116 << "ctpctdmed.icc";
117
118
119 Q_FOREACH(const QString &iccProfiledir, iccProfileDirs) {
120 QDir profileDir(iccProfiledir);
121 Q_FOREACH(
const QString &entry, profileDir.entryList(
QStringList() <<
"*.icm" <<
"*.icc" <<
"*.ICM" <<
"*.ICC", QDir::NoDotAndDotDot | QDir::Files | QDir::Readable)) {
122 if (blackList.contains(entry.toLower())) continue;
123 profileFilenames << iccProfiledir + "/" + entry;
124 }
125 }
126
127
128 if (!profileFilenames.empty()) {
129 for (QStringList::Iterator it = profileFilenames.begin(); it != profileFilenames.end(); ++it) {
130
132 Q_CHECK_PTR(profile);
133
135 if (profile->
valid()) {
136
138 } else {
139 qDebug() << "Invalid profile : " << *it;
140 delete profile;
141 }
142 }
143 }
144
145
146
149
153
157
161
165
166
167
170
173
181 const QString legacyRec2020PQProfileName = "High Dynamic Range UHDTV Wide Color Gamut Display (Rec. 2020) - SMPTE ST 2084 PQ EOTF";
183
186 #ifdef HAVE_LCMS24
187 #ifdef HAVE_OPENEXR
189 #endif
190 #endif
192
196
200
201#ifdef HAVE_LCMS24
202#ifdef HAVE_OPENEXR
206#endif
207#endif
208
212
213
214
215 cmsToneCurve *
Gamma = cmsBuildGamma(0, 2.2);
216 cmsHPROFILE hProfile = cmsCreateGrayProfile(cmsD50_xyY(),
Gamma);
217 cmsFreeToneCurve(
Gamma);
220
223#ifdef HAVE_LCMS24
224#ifdef HAVE_OPENEXR
226#endif
227#endif
229
233
237#ifdef HAVE_LCMS24
238#ifdef HAVE_OPENEXR
242#endif
243#endif
244
248
249
250
254
258
262
266
267
268
271
274#ifdef HAVE_LCMS24
275#ifdef HAVE_OPENEXR
277#endif
278#endif
280
284
288
289#ifdef HAVE_LCMS24
290#ifdef HAVE_OPENEXR
294#endif
295#endif
296
300
301
302
303
304
305
309
313
317
321
322
323 registry->
addProfileAlias(
"sRGB built-in - (lcms internal)",
"sRGB built-in");
324 registry->
addProfileAlias(
"gray built-in - (lcms internal)",
"gray built-in");
325 registry->
addProfileAlias(
"Lab identity built-in - (lcms internal)",
"Lab identity built-in");
326 registry->
addProfileAlias(
"XYZ built-in - (lcms internal)",
"XYZ identity built-in");
327
328#if defined(HAVE_LCMS_FAST_FLOAT_PLUGIN)
329 cmsPlugin(cmsFastFloatExtensions());
330#endif
331}
QList< QString > QStringList
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID YCbCrAColorModelID("YCbCrA", ki18n("YCbCr/Alpha"))
const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale/Alpha"))
const KoID XYZAColorModelID("XYZA", ki18n("XYZ/Alpha"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const KoID CMYKAColorModelID("CMYKA", ki18n("CMYK/Alpha"))
const KoID LABAColorModelID("LABA", ki18n("L*a*b*/Alpha"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
@ PRIMARIES_ITU_R_BT_2020_2_AND_2100_0
void lcms2LogErrorHandlerFunction(cmsContext, cmsUInt32Number ErrorCode, const char *Text)
static KoColorSpaceEngineRegistry * instance()
static KoHistogramProducerFactoryRegistry * instance()
static void addAssetType(const QString &type, const char *basetype, const QString &relativeName, bool priority=true)
static QStringList findAllAssets(const QString &type, const QString &filter=QString(), SearchOptions options=NoSearchOptions)
static IccColorProfile * createFromLcmsProfile(const cmsHPROFILE profile)
The KoColorProfileQuery struct.
virtual bool valid() const =0
void addProfileAlias(const QString &name, const QString &to)
static KoColorSpaceRegistry * instance()
void add(KoColorSpaceFactory *item)
void addProfileToMap(KoColorProfile *p)
void addProfile(KoColorProfile *profile)