Krita Source Code Documentation
Loading...
Searching...
No Matches
IccColorProfile Class Reference

#include <IccColorProfile.h>

+ Inheritance diagram for IccColorProfile:

Classes

class  Container
 
class  Data
 
struct  Private
 

Public Member Functions

LcmsColorProfileContainerasLcms () const
 
KoColorProfileclone () const override
 
QString colorModelID () const override
 
bool compareTRC (TransferCharacteristics characteristics, float error) const override
 
void delinearizeFloatValue (QVector< qreal > &Value) const override
 
void delinearizeFloatValueFast (QVector< qreal > &Value) const override
 
QVector< qreal > getColorantsxyY () const override
 
QVector< qreal > getColorantsXYZ () const override
 
QVector< qreal > getEstimatedTRC () const override
 
const QVector< KoChannelInfo::DoubleRange > & getFloatUIMinMax (void) const
 
QVector< qreal > getWhitePointxyY () const override
 
QVector< qreal > getWhitePointXYZ () const override
 
bool hasColorants () const override
 
bool hasTRC () const override
 
 IccColorProfile (const IccColorProfile &rhs)
 
 IccColorProfile (const QByteArray &rawData)
 
 IccColorProfile (const QString &fileName=QString())
 
 IccColorProfile (const QVector< double > &colorants, const ColorPrimaries colorPrimariesType=PRIMARIES_UNSPECIFIED, const TransferCharacteristics transferFunction=TRC_LINEAR)
 
bool isLinear () const override
 
bool isSuitableForDisplay () const override
 
bool isSuitableForOutput () const override
 
bool isSuitableForPrinting () const override
 
void linearizeFloatValue (QVector< qreal > &Value) const override
 
void linearizeFloatValueFast (QVector< qreal > &Value) const override
 
bool load () override
 
bool operator== (const KoColorProfile &) const override
 
QByteArray rawData () const override
 
virtual bool save ()
 
virtual bool save (const QString &fileName)
 
bool supportsAbsolute () const override
 
bool supportsPerceptual () const override
 
bool supportsRelative () const override
 
bool supportsSaturation () const override
 
QString type () const override
 
QByteArray uniqueId () const override
 
bool valid () const override
 
float version () const override
 
 ~IccColorProfile () override
 
- Public Member Functions inherited from KoColorProfile
QString copyright () const
 
QString fileName () const
 
virtual ColorPrimaries getColorPrimaries () const
 getColorPrimaries
 
virtual TransferCharacteristics getTransferCharacteristics () const
 getTransferCharacteristics This function should be subclassed at some point so we can get the value from the lcms profile.
 
QString info () const
 
 KoColorProfile (const KoColorProfile &profile)
 
 KoColorProfile (const QString &fileName=QString())
 
QString manufacturer () const
 
QString name () const
 
void setFileName (const QString &filename)
 
virtual ~KoColorProfile ()
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Protected Member Functions

bool init ()
 
void setRawData (const QByteArray &rawData)
 
- Protected Member Functions inherited from KoColorProfile
void setCharacteristics (ColorPrimaries primaries, TransferCharacteristics curve)
 setCharacteristics ideally, we'd read this from the icc profile curve, but that can be tricky, instead we'll set it on profile creation.
 
void setCopyright (const QString &copyright)
 
void setInfo (const QString &info)
 
void setManufacturer (const QString &manufacturer)
 
void setName (const QString &name)
 

Private Attributes

QScopedPointer< Privated
 

Additional Inherited Members

- Static Public Member Functions inherited from KoColorProfile
static void colorantsForType (ColorPrimaries primaries, QVector< double > &colorants)
 colorantsForPrimaries fills a QVector<float> with the xy values of the whitepoint and red, green, blue colorants for a given predefined value. Will not change the vector when the primaries are set to 'undefined'.
 
static QString getColorPrimariesName (ColorPrimaries primaries)
 getColorPrimariesName
 
static QString getTransferCharacteristicName (TransferCharacteristics curve)
 getTransferCharacteristicName
 
- Public Attributes inherited from KoColorProfile
TransferCharacteristics characteristics {TRC_UNSPECIFIED}
 
QString copyright
 
QString fileName
 
QString info
 
QString manufacturer
 
QString name
 
int primaries {-1}
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Detailed Description

This class contains an ICC color profile.

Definition at line 19 of file IccColorProfile.h.

Constructor & Destructor Documentation

◆ IccColorProfile() [1/4]

IccColorProfile::IccColorProfile ( const QString & fileName = QString())
explicit

Definition at line 93 of file IccColorProfile.cpp.

95{
96}
QScopedPointer< Private > d
KoColorProfile(const QString &fileName=QString())

◆ IccColorProfile() [2/4]

IccColorProfile::IccColorProfile ( const QByteArray & rawData)
explicit

Definition at line 98 of file IccColorProfile.cpp.

99 : KoColorProfile(QString()), d(new Private)
100{
102 init();
103}
void setRawData(const QByteArray &rawData)
QByteArray rawData() const override

References init(), rawData(), and setRawData().

◆ IccColorProfile() [3/4]

IccColorProfile::IccColorProfile ( const QVector< double > & colorants,
const ColorPrimaries colorPrimariesType = PRIMARIES_UNSPECIFIED,
const TransferCharacteristics transferFunction = TRC_LINEAR )
explicit

Definition at line 105 of file IccColorProfile.cpp.

108: KoColorProfile(QString()), d(new Private)
109{
111 (!colorants.isEmpty() || colorPrimariesType != PRIMARIES_UNSPECIFIED)
112 && transferFunction != TRC_UNSPECIFIED);
113
114 cmsCIExyY whitePoint;
115
116 QVector<double> modifiedColorants = colorants;
117
118 KoColorProfile::colorantsForType(colorPrimariesType, modifiedColorants);
119
120 if (modifiedColorants.size()>=2) {
121 whitePoint.x = modifiedColorants[0];
122 whitePoint.y = modifiedColorants[1];
123 whitePoint.Y = 1.0;
124 }
125
126 cmsToneCurve *mainCurve = LcmsColorProfileContainer::transferFunction(transferFunction);
127
128 cmsCIExyYTRIPLE primaries;
129
130 if (modifiedColorants.size()>2 && modifiedColorants.size() <= 8) {
131 primaries = {{modifiedColorants[2], modifiedColorants[3], 1.0},
132 {modifiedColorants[4], modifiedColorants[5], 1.0},
133 {modifiedColorants[6], modifiedColorants[7], 1.0}};
134 }
135
136 cmsHPROFILE iccProfile = nullptr;
137
138 if (colorants.size() == 2) {
139 iccProfile = cmsCreateGrayProfile(&whitePoint, mainCurve);
140 } else /*if (colorants.size()>2 || colorPrimariesType != 2)*/ {
141 // generate rgb profile.
142 cmsToneCurve *curve[3];
143 curve[0] = curve[1] = curve[2] = mainCurve;
144 iccProfile = cmsCreateRGBProfile(&whitePoint, &primaries, curve);
145 }
146
147 KIS_ASSERT(iccProfile);
148
150 name.append("Krita");
151 name.append(KoColorProfile::getColorPrimariesName(colorPrimariesType));
152 name.append(KoColorProfile::getTransferCharacteristicName(transferFunction));
153
154 cmsCIEXYZ media_blackpoint = {0.0, 0.0, 0.0};
155 cmsWriteTag (iccProfile, cmsSigMediaBlackPointTag, &media_blackpoint);
156
157 //set the color profile info on the iccProfile;
158 cmsMLU *mlu;
159 mlu = cmsMLUalloc (NULL, 1);
160 cmsMLUsetASCII (mlu, "en", "US", name.join(" ").toLatin1());
161 cmsWriteTag (iccProfile, cmsSigProfileDescriptionTag, mlu);
162 cmsMLUfree (mlu);
163 mlu = cmsMLUalloc (NULL, 1);
164 cmsMLUsetASCII (mlu, "en", "US", QString("Profile generated by Krita, Public domain.").toLatin1());
165 cmsWriteTag(iccProfile, cmsSigCopyrightTag, mlu);
166 cmsMLUfree (mlu);
167
168 setCharacteristics(colorPrimariesType, transferFunction);
169
171
173 cmsCloseProfile(iccProfile);
174 setFileName(name.join(" ").split(" ").join("-")+".icc");
175 init();
176}
@ PRIMARIES_UNSPECIFIED
static cmsToneCurve * transferFunction(TransferCharacteristics transferFunction)
static QByteArray lcmsProfileToByteArray(const cmsHPROFILE profile)
#define KIS_ASSERT(cond)
Definition kis_assert.h:33
static void colorantsForType(ColorPrimaries primaries, QVector< double > &colorants)
colorantsForPrimaries fills a QVector<float> with the xy values of the whitepoint and red,...
void setFileName(const QString &filename)
static QString getTransferCharacteristicName(TransferCharacteristics curve)
getTransferCharacteristicName
static QString getColorPrimariesName(ColorPrimaries primaries)
getColorPrimariesName
void setCharacteristics(ColorPrimaries primaries, TransferCharacteristics curve)
setCharacteristics ideally, we'd read this from the icc profile curve, but that can be tricky,...

References KoColorProfile::colorantsForType(), d, KoColorProfile::getColorPrimariesName(), KoColorProfile::getTransferCharacteristicName(), init(), KIS_ASSERT, LcmsColorProfileContainer::lcmsProfileToByteArray(), KoColorProfile::name, KoColorProfile::primaries, PRIMARIES_UNSPECIFIED, KoColorProfile::setCharacteristics(), KoColorProfile::setFileName(), setRawData(), LcmsColorProfileContainer::transferFunction(), and TRC_UNSPECIFIED.

◆ IccColorProfile() [4/4]

IccColorProfile::IccColorProfile ( const IccColorProfile & rhs)

Definition at line 178 of file IccColorProfile.cpp.

179 : KoColorProfile(rhs)
180 , d(new Private(*rhs.d))
181{
182 Q_ASSERT(d->shared);
183}

References d.

◆ ~IccColorProfile()

IccColorProfile::~IccColorProfile ( )
override

Definition at line 185 of file IccColorProfile.cpp.

186{
187 Q_ASSERT(d->shared);
188}

References d.

Member Function Documentation

◆ asLcms()

LcmsColorProfileContainer * IccColorProfile::asLcms ( ) const

Definition at line 441 of file IccColorProfile.cpp.

442{
443 Q_ASSERT(d->shared->lcmsProfile);
444 return d->shared->lcmsProfile.data();
445}

References d.

◆ clone()

KoColorProfile * IccColorProfile::clone ( ) const
overridevirtual

Create a copy of this profile. Data that shall not change during the life time of the profile shouldn't be duplicated but shared, like for instance ICC data.

Data that shall be changed like a palette or hdr information such as exposure must be duplicated while cloning.

Implements KoColorProfile.

Definition at line 190 of file IccColorProfile.cpp.

191{
192 return new IccColorProfile(*this);
193}
IccColorProfile(const QString &fileName=QString())

References IccColorProfile().

◆ colorModelID()

QString IccColorProfile::colorModelID ( ) const
overridevirtual
Returns
a string for a color model id.

Reimplemented from KoColorProfile.

Definition at line 220 of file IccColorProfile.cpp.

221{
222 QString model;
223
224 switch (d->shared->lcmsProfile->colorSpaceSignature()) {
225 case cmsSigRgbData:
226 model = "RGBA";
227 break;
228 case cmsSigLabData:
229 model = "LABA";
230 break;
231 case cmsSigCmykData:
232 model = "CMYKA";
233 break;
234 case cmsSigGrayData:
235 model = "GRAYA";
236 break;
237 case cmsSigXYZData:
238 model = "XYZA";
239 break;
240 case cmsSigYCbCrData:
241 model = "YCbCrA";
242 break;
243 default:
244 // In theory we should be able to interpret the colorspace signature as a 4 char array...
245 model = QString();
246 }
247
248 return model;
249}

References d.

◆ compareTRC()

bool IccColorProfile::compareTRC ( TransferCharacteristics characteristics,
float error ) const
overridevirtual

Comparing profile's TRC against the other with defined error threshold, returns true if profile TRC is matched.

Implements KoColorProfile.

Definition at line 363 of file IccColorProfile.cpp.

364{
365 if (d->shared->lcmsProfile) {
366 return d->shared->lcmsProfile->compareTRC(characteristics, error);
367 }
368 return false;
369}
TransferCharacteristics characteristics

References KoColorProfile::characteristics, and d.

◆ delinearizeFloatValue()

void IccColorProfile::delinearizeFloatValue ( QVector< qreal > & Value) const
overridevirtual

Delinearizes first 3 values of QVector, leaving other values unchanged. Returns the same QVector if it is not possible to delinearize. Effectively undoes LinearizeFloatValue.

Implements KoColorProfile.

Definition at line 376 of file IccColorProfile.cpp.

377{
378 if (d->shared->lcmsProfile)
379 d->shared->lcmsProfile->DelinearizeFloatValue(Value);
380}

References d.

◆ delinearizeFloatValueFast()

void IccColorProfile::delinearizeFloatValueFast ( QVector< qreal > & Value) const
overridevirtual

Implements KoColorProfile.

Definition at line 386 of file IccColorProfile.cpp.

387{
388 if (d->shared->lcmsProfile)
389 d->shared->lcmsProfile->DelinearizeFloatValueFast(Value);
390}

References d.

◆ getColorantsxyY()

QVector< qreal > IccColorProfile::getColorantsxyY ( ) const
overridevirtual
Returns
a qvector <double>(9) with the RGB colorants in xyY

Implements KoColorProfile.

Definition at line 328 of file IccColorProfile.cpp.

329{
330 if (d->shared->lcmsProfile) {
331 return d->shared->lcmsProfile->getColorantsxyY();
332 }
333 return QVector<qreal>(9);
334}

References d.

◆ getColorantsXYZ()

QVector< qreal > IccColorProfile::getColorantsXYZ ( ) const
overridevirtual
Returns
a qvector <double>(9) with the RGB colorants in XYZ

Implements KoColorProfile.

Definition at line 321 of file IccColorProfile.cpp.

322{
323 if (d->shared->lcmsProfile) {
324 return d->shared->lcmsProfile->getColorantsXYZ();
325 }
326 return QVector<qreal>(9);
327}

References d.

◆ getEstimatedTRC()

QVector< qreal > IccColorProfile::getEstimatedTRC ( ) const
overridevirtual
Returns
estimated gamma for RGB and Grayscale profiles

Implements KoColorProfile.

Definition at line 353 of file IccColorProfile.cpp.

354{
355 QVector <qreal> dummy(3);
356 dummy.fill(2.2);//estimated sRGB trc.
357 if (d->shared->lcmsProfile) {
358 return d->shared->lcmsProfile->getEstimatedTRC();
359 }
360 return dummy;
361}

References d.

◆ getFloatUIMinMax()

const QVector< KoChannelInfo::DoubleRange > & IccColorProfile::getFloatUIMinMax ( void ) const

Returns the set of min/maxes for each channel in this profile. These (sometimes approximate) min and maxes are suitable for UI building. Furthermore, then only apply to the floating point uses of this profile, and not the integer variants.

Definition at line 456 of file IccColorProfile.cpp.

457{
458 Q_ASSERT(!d->shared->profileInfo->value.uiMinMaxes.isEmpty());
459 return d->shared->profileInfo->value.uiMinMaxes;
460}

References d.

◆ getWhitePointxyY()

QVector< qreal > IccColorProfile::getWhitePointxyY ( ) const
overridevirtual
Returns
a qvector <double>(3) with the whitepoint in xyY

Implements KoColorProfile.

Definition at line 344 of file IccColorProfile.cpp.

345{
346 QVector <qreal> d50Dummy(3);
347 d50Dummy << 0.34773 << 0.35952 << 1.0;
348 if (d->shared->lcmsProfile) {
349 return d->shared->lcmsProfile->getWhitePointxyY();
350 }
351 return d50Dummy;
352}

References d.

◆ getWhitePointXYZ()

QVector< qreal > IccColorProfile::getWhitePointXYZ ( ) const
overridevirtual
Returns
a qvector <double>(3) with the whitepoint in XYZ

Implements KoColorProfile.

Definition at line 335 of file IccColorProfile.cpp.

336{
337 QVector <qreal> d50Dummy(3);
338 d50Dummy << 0.9642 << 1.0000 << 0.8249;
339 if (d->shared->lcmsProfile) {
340 return d->shared->lcmsProfile->getWhitePointXYZ();
341 }
342 return d50Dummy;
343}

References d.

◆ hasColorants()

bool IccColorProfile::hasColorants ( ) const
overridevirtual
Returns
if the profile has colorants.

Implements KoColorProfile.

Definition at line 302 of file IccColorProfile.cpp.

303{
304 if (d->shared->lcmsProfile) {
305 return d->shared->lcmsProfile->hasColorants();
306 }
307 return false;
308}

References d.

◆ hasTRC()

bool IccColorProfile::hasTRC ( ) const
overridevirtual
Returns
if the profile has a TRC(required for linearisation).

Implements KoColorProfile.

Definition at line 309 of file IccColorProfile.cpp.

310{
311 if (d->shared->lcmsProfile)
312 return d->shared->lcmsProfile->hasTRC();
313 return false;
314}

References d.

◆ init()

bool IccColorProfile::init ( )
protected

Definition at line 420 of file IccColorProfile.cpp.

421{
422 if (!d->shared->lcmsProfile) {
423 d->shared->lcmsProfile.reset(new LcmsColorProfileContainer(d->shared->data.data()));
424 }
425 if (d->shared->lcmsProfile->init()) {
426 setName(d->shared->lcmsProfile->name());
427 setInfo(d->shared->lcmsProfile->info());
428 setManufacturer(d->shared->lcmsProfile->manufacturer());
429 setCopyright(d->shared->lcmsProfile->copyright());
430 if (d->shared->lcmsProfile->valid()) {
431 d->shared->profileInfo = Private::LazyProfileInfo([this] () {
432 return d->calculateFloatUIMinMax();
433 });
434 }
435 return true;
436 } else {
437 return false;
438 }
439}
KisLazyStorage< KisLazyValueWrapper< ProfileInfo >, std::function< ProfileInfo()> > LazyProfileInfo
void setCopyright(const QString &copyright)
void setName(const QString &name)
void setManufacturer(const QString &manufacturer)
void setInfo(const QString &info)

References d, KoColorProfile::setCopyright(), KoColorProfile::setInfo(), KoColorProfile::setManufacturer(), and KoColorProfile::setName().

◆ isLinear()

bool IccColorProfile::isLinear ( ) const
overridevirtual
Returns
if the profile's TRCs are linear.

Implements KoColorProfile.

Definition at line 315 of file IccColorProfile.cpp.

316{
317 if (d->shared->lcmsProfile)
318 return d->shared->lcmsProfile->isLinear();
319 return false;
320}

References d.

◆ isSuitableForDisplay()

bool IccColorProfile::isSuitableForDisplay ( ) const
overridevirtual
Returns
true if this profile is suitable to use for display

Implements KoColorProfile.

Definition at line 266 of file IccColorProfile.cpp.

267{
268 if (d->shared->lcmsProfile) {
269 return d->shared->lcmsProfile->isSuitableForDisplay();
270 }
271 return false;
272}

References d.

◆ isSuitableForOutput()

bool IccColorProfile::isSuitableForOutput ( ) const
overridevirtual
Returns
true if you can use this profile can be used to convert color from a different profile to this one

Implements KoColorProfile.

Definition at line 250 of file IccColorProfile.cpp.

251{
252 if (d->shared->lcmsProfile) {
253 return d->shared->lcmsProfile->isSuitableForOutput() && d->shared->profileInfo->value.canCreateCyclicTransform;
254 }
255 return false;
256}

References d.

◆ isSuitableForPrinting()

bool IccColorProfile::isSuitableForPrinting ( ) const
overridevirtual
Returns
true if this profile is suitable to use for printing

Implements KoColorProfile.

Definition at line 258 of file IccColorProfile.cpp.

259{
260 if (d->shared->lcmsProfile) {
261 return d->shared->lcmsProfile->isSuitableForPrinting();
262 }
263 return false;
264}

References d.

◆ linearizeFloatValue()

void IccColorProfile::linearizeFloatValue ( QVector< qreal > & Value) const
overridevirtual

Linearizes first 3 values of QVector, leaving other values unchanged. Returns the same QVector if it is not possible to linearize.

Implements KoColorProfile.

Definition at line 371 of file IccColorProfile.cpp.

372{
373 if (d->shared->lcmsProfile)
374 d->shared->lcmsProfile->LinearizeFloatValue(Value);
375}

References d.

◆ linearizeFloatValueFast()

void IccColorProfile::linearizeFloatValueFast ( QVector< qreal > & Value) const
overridevirtual

More imprecise versions of the above(limited to 16bit, and can't delinearize above 1.0.) Use this for filters and images.

Implements KoColorProfile.

Definition at line 381 of file IccColorProfile.cpp.

382{
383 if (d->shared->lcmsProfile)
384 d->shared->lcmsProfile->LinearizeFloatValueFast(Value);
385}

References d.

◆ load()

bool IccColorProfile::load ( )
overridevirtual

Load the profile in memory.

Returns
true if the profile has been successfully loaded

Reimplemented from KoColorProfile.

Definition at line 401 of file IccColorProfile.cpp.

402{
403 QFile file(fileName());
404 file.open(QIODevice::ReadOnly);
405 QByteArray rawData = file.readAll();
407 file.close();
408 if (init()) {
409 return true;
410 }
411 qWarning() << "Failed to load profile from " << fileName();
412 return false;
413}

References KoColorProfile::fileName, init(), rawData(), and setRawData().

◆ operator==()

bool IccColorProfile::operator== ( const KoColorProfile & rhs) const
overridevirtual

Implements KoColorProfile.

Definition at line 447 of file IccColorProfile.cpp.

448{
449 const IccColorProfile *rhsIcc = dynamic_cast<const IccColorProfile *>(&rhs);
450 if (rhsIcc) {
451 return d->shared == rhsIcc->d->shared;
452 }
453 return false;
454}

References d.

◆ rawData()

QByteArray IccColorProfile::rawData ( ) const
overridevirtual
Returns
an array with the raw data of the profile

Reimplemented from KoColorProfile.

Definition at line 195 of file IccColorProfile.cpp.

196{
197 return d->shared->data->rawData();
198}

References d.

◆ save() [1/2]

bool IccColorProfile::save ( )
virtual

Definition at line 415 of file IccColorProfile.cpp.

416{
417 return false;
418}

◆ save() [2/2]

bool KoColorProfile::save ( const QString & fileName)
virtual

Override this function to save the profile.

Parameters
fileNamedestination
Returns
true if the profile has been successfully saved

Reimplemented from KoColorProfile.

Definition at line 61 of file KoColorProfile.cpp.

47{
48 Q_UNUSED(filename);
49 return false;
50}

◆ setRawData()

void IccColorProfile::setRawData ( const QByteArray & rawData)
protected

Definition at line 200 of file IccColorProfile.cpp.

201{
202 d->shared->data->setRawData(rawData);
203}

References d, and rawData().

◆ supportsAbsolute()

bool IccColorProfile::supportsAbsolute ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 288 of file IccColorProfile.cpp.

289{
290 if (d->shared->lcmsProfile) {
291 return d->shared->lcmsProfile->supportsAbsolute();
292 }
293 return false;
294}

References d.

◆ supportsPerceptual()

bool IccColorProfile::supportsPerceptual ( ) const
overridevirtual
Returns
which rendering intents are supported

Implements KoColorProfile.

Definition at line 274 of file IccColorProfile.cpp.

275{
276 if (d->shared->lcmsProfile) {
277 return d->shared->lcmsProfile->supportsPerceptual();
278 }
279 return false;
280}

References d.

◆ supportsRelative()

bool IccColorProfile::supportsRelative ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 295 of file IccColorProfile.cpp.

296{
297 if (d->shared->lcmsProfile) {
298 return d->shared->lcmsProfile->supportsRelative();
299 }
300 return false;
301}

References d.

◆ supportsSaturation()

bool IccColorProfile::supportsSaturation ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 281 of file IccColorProfile.cpp.

282{
283 if (d->shared->lcmsProfile) {
284 return d->shared->lcmsProfile->supportsSaturation();
285 }
286 return false;
287}

References d.

◆ type()

QString IccColorProfile::type ( ) const
inlineoverridevirtual
Returns
the type of this profile (icc, ctlcs etc)

Reimplemented from KoColorProfile.

Definition at line 112 of file IccColorProfile.h.

113 {
114 return "icc";
115 }

◆ uniqueId()

QByteArray IccColorProfile::uniqueId ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 392 of file IccColorProfile.cpp.

393{
394 QByteArray dummy;
395 if (d->shared->lcmsProfile) {
396 dummy = d->shared->lcmsProfile->getProfileUniqueId();
397 }
398 return dummy;
399}

References d.

◆ valid()

bool IccColorProfile::valid ( ) const
overridevirtual
Returns
true if the profile is valid, false if it isn't been loaded in memory yet, or if the loaded memory is a bad profile

Implements KoColorProfile.

Definition at line 205 of file IccColorProfile.cpp.

206{
207 if (d->shared->lcmsProfile) {
208 return d->shared->lcmsProfile->valid();
209 }
210 return false;
211}

References d.

◆ version()

float IccColorProfile::version ( ) const
overridevirtual

Return version

Implements KoColorProfile.

Definition at line 212 of file IccColorProfile.cpp.

213{
214 if (d->shared->lcmsProfile) {
215 return d->shared->lcmsProfile->version();
216 }
217 return 0.0;
218}

References d.

Member Data Documentation

◆ d

QScopedPointer<Private> IccColorProfile::d
private

Definition at line 134 of file IccColorProfile.h.


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