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
113 (!colorants.isEmpty() || colorPrimariesType != PRIMARIES_UNSPECIFIED)
114 && transferFunction != TRC_UNSPECIFIED);
115
116 cmsCIExyY whitePoint;
117
118 QVector<double> modifiedColorants = colorants;
119
120 KoColorProfile::colorantsForType(colorPrimariesType, modifiedColorants);
121
122 if (modifiedColorants.size()>=2) {
123 whitePoint.x = modifiedColorants[0];
124 whitePoint.y = modifiedColorants[1];
125 whitePoint.Y = 1.0;
126 }
127
128 cmsToneCurve *mainCurve = LcmsColorProfileContainer::transferFunction(transferFunction);
129
130 cmsCIExyYTRIPLE primaries;
131
132 if (modifiedColorants.size()>2 && modifiedColorants.size() <= 8) {
133 primaries = {{modifiedColorants[2], modifiedColorants[3], 1.0},
134 {modifiedColorants[4], modifiedColorants[5], 1.0},
135 {modifiedColorants[6], modifiedColorants[7], 1.0}};
136 }
137
138 cmsHPROFILE iccProfile = nullptr;
139
140 if (colorants.size() == 2) {
141 iccProfile = cmsCreateGrayProfile(&whitePoint, mainCurve);
142 } else /*if (colorants.size()>2 || colorPrimariesType != 2)*/ {
143 // generate rgb profile.
144 cmsToneCurve *curve[3];
145 curve[0] = curve[1] = curve[2] = mainCurve;
146 iccProfile = cmsCreateRGBProfile(&whitePoint, &primaries, curve);
147 }
148
149 if (!iccProfile) {
150 qWarning() << "WARNING: LCMS failed to create a profile for the requested parameters";
151 qWarning().nospace() << " transfer function: " << getTransferCharacteristicName(transferFunction) << " (" << transferFunction << ")";
152 qWarning().nospace() << " named primaries:" << getColorPrimariesName(colorPrimariesType) << " (" << colorPrimariesType << ")";
153 qWarning() << " requested colorants:" << colorants;
154 // leave the profile in invalid state and return
155 return;
156 }
157
159 name.append("Krita");
160 name.append(KoColorProfile::getColorPrimariesName(colorPrimariesType));
161 name.append(KoColorProfile::getTransferCharacteristicName(transferFunction));
162
163 cmsCIEXYZ media_blackpoint = {0.0, 0.0, 0.0};
164 cmsWriteTag (iccProfile, cmsSigMediaBlackPointTag, &media_blackpoint);
165
166 //set the color profile info on the iccProfile;
167 cmsMLU *mlu;
168 mlu = cmsMLUalloc (NULL, 1);
169 cmsMLUsetASCII (mlu, "en", "US", name.join(" ").toLatin1());
170 cmsWriteTag (iccProfile, cmsSigProfileDescriptionTag, mlu);
171 cmsMLUfree (mlu);
172 mlu = cmsMLUalloc (NULL, 1);
173 cmsMLUsetASCII (mlu, "en", "US", QString("Profile generated by Krita, Public domain.").toLatin1());
174 cmsWriteTag(iccProfile, cmsSigCopyrightTag, mlu);
175 cmsMLUfree (mlu);
176
177 setCharacteristics(colorPrimariesType, transferFunction);
178
180 cmsCloseProfile(iccProfile);
181 setFileName(name.join(" ").split(" ").join("-")+".icc");
182 init();
183}
@ PRIMARIES_UNSPECIFIED
static cmsToneCurve * transferFunction(TransferCharacteristics transferFunction)
static QByteArray lcmsProfileToByteArray(const cmsHPROFILE profile)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
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_SAFE_ASSERT_RECOVER_RETURN, 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 185 of file IccColorProfile.cpp.

186 : KoColorProfile(rhs)
187 , d(new Private(*rhs.d))
188{
189 Q_ASSERT(d->shared);
190}

References d.

◆ ~IccColorProfile()

IccColorProfile::~IccColorProfile ( )
override

Definition at line 192 of file IccColorProfile.cpp.

193{
194 Q_ASSERT(d->shared);
195}

References d.

Member Function Documentation

◆ asLcms()

LcmsColorProfileContainer * IccColorProfile::asLcms ( ) const

Definition at line 463 of file IccColorProfile.cpp.

464{
465 Q_ASSERT(d->shared->lcmsProfile);
466 return d->shared->lcmsProfile.data();
467}

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

198{
199 return new IccColorProfile(*this);
200}
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 227 of file IccColorProfile.cpp.

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

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

386{
387 if (d->shared->lcmsProfile) {
388 return d->shared->lcmsProfile->compareTRC(characteristics, error);
389 }
390 return false;
391}
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 398 of file IccColorProfile.cpp.

399{
400 if (d->shared->lcmsProfile)
401 d->shared->lcmsProfile->DelinearizeFloatValue(Value);
402}

References d.

◆ delinearizeFloatValueFast()

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

Implements KoColorProfile.

Definition at line 408 of file IccColorProfile.cpp.

409{
410 if (d->shared->lcmsProfile)
411 d->shared->lcmsProfile->DelinearizeFloatValueFast(Value);
412}

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

351{
352 if (d->shared->lcmsProfile) {
353 return d->shared->lcmsProfile->getColorantsxyY();
354 }
355 return QVector<qreal>(9);
356}

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

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

References d.

◆ getEstimatedTRC()

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

Implements KoColorProfile.

Definition at line 375 of file IccColorProfile.cpp.

376{
377 QVector <qreal> dummy(3);
378 dummy.fill(2.2);//estimated sRGB trc.
379 if (d->shared->lcmsProfile) {
380 return d->shared->lcmsProfile->getEstimatedTRC();
381 }
382 return dummy;
383}

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

479{
480 Q_ASSERT(!d->shared->profileInfo->value.uiMinMaxes.isEmpty());
481 return d->shared->profileInfo->value.uiMinMaxes;
482}

References d.

◆ getWhitePointxyY()

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

Implements KoColorProfile.

Definition at line 366 of file IccColorProfile.cpp.

367{
368 QVector <qreal> d50Dummy(3);
369 d50Dummy << 0.34773 << 0.35952 << 1.0;
370 if (d->shared->lcmsProfile) {
371 return d->shared->lcmsProfile->getWhitePointxyY();
372 }
373 return d50Dummy;
374}

References d.

◆ getWhitePointXYZ()

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

Implements KoColorProfile.

Definition at line 357 of file IccColorProfile.cpp.

358{
359 QVector <qreal> d50Dummy(3);
360 d50Dummy << 0.9642 << 1.0000 << 0.8249;
361 if (d->shared->lcmsProfile) {
362 return d->shared->lcmsProfile->getWhitePointXYZ();
363 }
364 return d50Dummy;
365}

References d.

◆ hasColorants()

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

Implements KoColorProfile.

Definition at line 324 of file IccColorProfile.cpp.

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

References d.

◆ hasTRC()

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

Implements KoColorProfile.

Definition at line 331 of file IccColorProfile.cpp.

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

References d.

◆ init()

bool IccColorProfile::init ( )
protected

Definition at line 442 of file IccColorProfile.cpp.

443{
444 if (!d->shared->lcmsProfile) {
445 d->shared->lcmsProfile.reset(new LcmsColorProfileContainer(d->shared->data.data()));
446 }
447 if (d->shared->lcmsProfile->init()) {
448 setName(d->shared->lcmsProfile->name());
449 setInfo(d->shared->lcmsProfile->info());
450 setManufacturer(d->shared->lcmsProfile->manufacturer());
451 setCopyright(d->shared->lcmsProfile->copyright());
452 if (d->shared->lcmsProfile->valid()) {
453 d->shared->profileInfo = Private::LazyProfileInfo([this] () {
454 return d->calculateFloatUIMinMax();
455 });
456 }
457 return true;
458 } else {
459 return false;
460 }
461}
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 337 of file IccColorProfile.cpp.

338{
339 if (d->shared->lcmsProfile)
340 return d->shared->lcmsProfile->isLinear();
341 return false;
342}

References d.

◆ isSuitableForDisplay()

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

Implements KoColorProfile.

Definition at line 288 of file IccColorProfile.cpp.

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

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

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

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

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

References d.

◆ isSuitableForPrinting()

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

Implements KoColorProfile.

Definition at line 280 of file IccColorProfile.cpp.

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

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

272{
273 if (d->shared->lcmsProfile) {
274 return d->shared->lcmsProfile->isSuitableForWorkspace() && d->shared->profileInfo->value.canCreateCyclicTransform;
275 }
276 return false;
277}

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

394{
395 if (d->shared->lcmsProfile)
396 d->shared->lcmsProfile->LinearizeFloatValue(Value);
397}

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

404{
405 if (d->shared->lcmsProfile)
406 d->shared->lcmsProfile->LinearizeFloatValueFast(Value);
407}

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

424{
425 QFile file(fileName());
426 file.open(QIODevice::ReadOnly);
427 QByteArray rawData = file.readAll();
429 file.close();
430 if (init()) {
431 return true;
432 }
433 qWarning() << "Failed to load profile from " << fileName();
434 return false;
435}

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

◆ operator==()

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

Implements KoColorProfile.

Definition at line 469 of file IccColorProfile.cpp.

470{
471 const IccColorProfile *rhsIcc = dynamic_cast<const IccColorProfile *>(&rhs);
472 if (rhsIcc) {
473 return d->shared == rhsIcc->d->shared;
474 }
475 return false;
476}

References d.

◆ rawData()

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

Reimplemented from KoColorProfile.

Definition at line 202 of file IccColorProfile.cpp.

203{
204 return d->shared->data->rawData();
205}

References d.

◆ save() [1/2]

bool IccColorProfile::save ( )
virtual

Definition at line 437 of file IccColorProfile.cpp.

438{
439 return false;
440}

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

208{
209 d->shared->data->setRawData(rawData);
210}

References d, and rawData().

◆ supportsAbsolute()

bool IccColorProfile::supportsAbsolute ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 310 of file IccColorProfile.cpp.

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

References d.

◆ supportsPerceptual()

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

Implements KoColorProfile.

Definition at line 296 of file IccColorProfile.cpp.

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

References d.

◆ supportsRelative()

bool IccColorProfile::supportsRelative ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 317 of file IccColorProfile.cpp.

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

References d.

◆ supportsSaturation()

bool IccColorProfile::supportsSaturation ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 303 of file IccColorProfile.cpp.

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

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

415{
416 QByteArray dummy;
417 if (d->shared->lcmsProfile) {
418 dummy = d->shared->lcmsProfile->getProfileUniqueId();
419 }
420 return dummy;
421}

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

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

References d.

◆ version()

float IccColorProfile::version ( ) const
overridevirtual

Return version

Implements KoColorProfile.

Definition at line 219 of file IccColorProfile.cpp.

220{
221 if (d->shared->lcmsProfile) {
222 return d->shared->lcmsProfile->version();
223 }
224 return 0.0;
225}

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: