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 isSuitableForInput () const override
 
bool isSuitableForOutput () const override
 
bool isSuitableForPrinting () const override
 
bool isSuitableForWorkspace () 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 456 of file IccColorProfile.cpp.

457{
458 Q_ASSERT(d->shared->lcmsProfile);
459 return d->shared->lcmsProfile.data();
460}

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 378 of file IccColorProfile.cpp.

379{
380 if (d->shared->lcmsProfile) {
381 return d->shared->lcmsProfile->compareTRC(characteristics, error);
382 }
383 return false;
384}
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 391 of file IccColorProfile.cpp.

392{
393 if (d->shared->lcmsProfile)
394 d->shared->lcmsProfile->DelinearizeFloatValue(Value);
395}

References d.

◆ delinearizeFloatValueFast()

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

Implements KoColorProfile.

Definition at line 401 of file IccColorProfile.cpp.

402{
403 if (d->shared->lcmsProfile)
404 d->shared->lcmsProfile->DelinearizeFloatValueFast(Value);
405}

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 343 of file IccColorProfile.cpp.

344{
345 if (d->shared->lcmsProfile) {
346 return d->shared->lcmsProfile->getColorantsxyY();
347 }
348 return QVector<qreal>(9);
349}

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 336 of file IccColorProfile.cpp.

337{
338 if (d->shared->lcmsProfile) {
339 return d->shared->lcmsProfile->getColorantsXYZ();
340 }
341 return QVector<qreal>(9);
342}

References d.

◆ getEstimatedTRC()

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

Implements KoColorProfile.

Definition at line 368 of file IccColorProfile.cpp.

369{
370 QVector <qreal> dummy(3);
371 dummy.fill(2.2);//estimated sRGB trc.
372 if (d->shared->lcmsProfile) {
373 return d->shared->lcmsProfile->getEstimatedTRC();
374 }
375 return dummy;
376}

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 471 of file IccColorProfile.cpp.

472{
473 Q_ASSERT(!d->shared->profileInfo->value.uiMinMaxes.isEmpty());
474 return d->shared->profileInfo->value.uiMinMaxes;
475}

References d.

◆ getWhitePointxyY()

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

Implements KoColorProfile.

Definition at line 359 of file IccColorProfile.cpp.

360{
361 QVector <qreal> d50Dummy(3);
362 d50Dummy << 0.34773 << 0.35952 << 1.0;
363 if (d->shared->lcmsProfile) {
364 return d->shared->lcmsProfile->getWhitePointxyY();
365 }
366 return d50Dummy;
367}

References d.

◆ getWhitePointXYZ()

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

Implements KoColorProfile.

Definition at line 350 of file IccColorProfile.cpp.

351{
352 QVector <qreal> d50Dummy(3);
353 d50Dummy << 0.9642 << 1.0000 << 0.8249;
354 if (d->shared->lcmsProfile) {
355 return d->shared->lcmsProfile->getWhitePointXYZ();
356 }
357 return d50Dummy;
358}

References d.

◆ hasColorants()

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

Implements KoColorProfile.

Definition at line 317 of file IccColorProfile.cpp.

318{
319 if (d->shared->lcmsProfile) {
320 return d->shared->lcmsProfile->hasColorants();
321 }
322 return false;
323}

References d.

◆ hasTRC()

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

Implements KoColorProfile.

Definition at line 324 of file IccColorProfile.cpp.

325{
326 if (d->shared->lcmsProfile)
327 return d->shared->lcmsProfile->hasTRC();
328 return false;
329}

References d.

◆ init()

bool IccColorProfile::init ( )
protected

Definition at line 435 of file IccColorProfile.cpp.

436{
437 if (!d->shared->lcmsProfile) {
438 d->shared->lcmsProfile.reset(new LcmsColorProfileContainer(d->shared->data.data()));
439 }
440 if (d->shared->lcmsProfile->init()) {
441 setName(d->shared->lcmsProfile->name());
442 setInfo(d->shared->lcmsProfile->info());
443 setManufacturer(d->shared->lcmsProfile->manufacturer());
444 setCopyright(d->shared->lcmsProfile->copyright());
445 if (d->shared->lcmsProfile->valid()) {
446 d->shared->profileInfo = Private::LazyProfileInfo([this] () {
447 return d->calculateFloatUIMinMax();
448 });
449 }
450 return true;
451 } else {
452 return false;
453 }
454}
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 330 of file IccColorProfile.cpp.

331{
332 if (d->shared->lcmsProfile)
333 return d->shared->lcmsProfile->isLinear();
334 return false;
335}

References d.

◆ isSuitableForDisplay()

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

Implements KoColorProfile.

Definition at line 281 of file IccColorProfile.cpp.

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

References d.

◆ isSuitableForInput()

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

Implements KoColorProfile.

Definition at line 257 of file IccColorProfile.cpp.

258{
259 if (d->shared->lcmsProfile) {
260 return d->shared->lcmsProfile->isSuitableForInput() && d->shared->profileInfo->value.canCreateCyclicTransform;
261 }
262 return false;
263}

References d.

◆ isSuitableForOutput()

bool IccColorProfile::isSuitableForOutput ( ) const
overridevirtual
Returns
true if 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 273 of file IccColorProfile.cpp.

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

References d.

◆ isSuitableForWorkspace()

bool IccColorProfile::isSuitableForWorkspace ( ) const
overridevirtual
Returns
true if you can use this profile can be used in Krita

Implements KoColorProfile.

Definition at line 264 of file IccColorProfile.cpp.

265{
266 if (d->shared->lcmsProfile) {
267 return d->shared->lcmsProfile->isSuitableForWorkspace() && d->shared->profileInfo->value.canCreateCyclicTransform;
268 }
269 return false;
270}

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 386 of file IccColorProfile.cpp.

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

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 396 of file IccColorProfile.cpp.

397{
398 if (d->shared->lcmsProfile)
399 d->shared->lcmsProfile->LinearizeFloatValueFast(Value);
400}

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 416 of file IccColorProfile.cpp.

417{
418 QFile file(fileName());
419 file.open(QIODevice::ReadOnly);
420 QByteArray rawData = file.readAll();
422 file.close();
423 if (init()) {
424 return true;
425 }
426 qWarning() << "Failed to load profile from " << fileName();
427 return false;
428}

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

◆ operator==()

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

Implements KoColorProfile.

Definition at line 462 of file IccColorProfile.cpp.

463{
464 const IccColorProfile *rhsIcc = dynamic_cast<const IccColorProfile *>(&rhs);
465 if (rhsIcc) {
466 return d->shared == rhsIcc->d->shared;
467 }
468 return false;
469}

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 430 of file IccColorProfile.cpp.

431{
432 return false;
433}

◆ 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 303 of file IccColorProfile.cpp.

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

References d.

◆ supportsPerceptual()

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

Implements KoColorProfile.

Definition at line 289 of file IccColorProfile.cpp.

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

References d.

◆ supportsRelative()

bool IccColorProfile::supportsRelative ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 310 of file IccColorProfile.cpp.

311{
312 if (d->shared->lcmsProfile) {
313 return d->shared->lcmsProfile->supportsRelative();
314 }
315 return false;
316}

References d.

◆ supportsSaturation()

bool IccColorProfile::supportsSaturation ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 296 of file IccColorProfile.cpp.

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

References d.

◆ type()

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

Reimplemented from KoColorProfile.

Definition at line 116 of file IccColorProfile.h.

117 {
118 return "icc";
119 }

◆ uniqueId()

QByteArray IccColorProfile::uniqueId ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 407 of file IccColorProfile.cpp.

408{
409 QByteArray dummy;
410 if (d->shared->lcmsProfile) {
411 dummy = d->shared->lcmsProfile->getProfileUniqueId();
412 }
413 return dummy;
414}

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 138 of file IccColorProfile.h.


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