|
Krita Source Code Documentation
|
#include <KoColorProfile.h>
Inheritance diagram for KoColorProfile:Public Member Functions | |
| virtual KoColorProfile * | clone () const =0 |
| virtual QString | colorModelID () const |
| virtual bool | compareTRC (TransferCharacteristics characteristics, float error) const =0 |
| QString | copyright () const |
| virtual void | delinearizeFloatValue (QVector< qreal > &Value) const =0 |
| virtual void | delinearizeFloatValueFast (QVector< qreal > &Value) const =0 |
| QString | fileName () const |
| virtual QVector< qreal > | getColorantsxyY () const =0 |
| virtual QVector< qreal > | getColorantsXYZ () const =0 |
| virtual ColorPrimaries | getColorPrimaries () const |
| getColorPrimaries | |
| virtual QVector< qreal > | getEstimatedTRC () const =0 |
| virtual TransferCharacteristics | getTransferCharacteristics () const |
| getTransferCharacteristics This function should be subclassed at some point so we can get the value from the lcms profile. | |
| virtual QVector< qreal > | getWhitePointxyY () const =0 |
| virtual QVector< qreal > | getWhitePointXYZ () const =0 |
| virtual bool | hasColorants () const =0 |
| virtual bool | hasTRC () const =0 |
| QString | info () const |
| virtual bool | isLinear () const =0 |
| virtual bool | isSuitableForDisplay () const =0 |
| virtual bool | isSuitableForOutput () const =0 |
| virtual bool | isSuitableForPrinting () const =0 |
| KoColorProfile (const KoColorProfile &profile) | |
| KoColorProfile (const QString &fileName=QString()) | |
| virtual void | linearizeFloatValue (QVector< qreal > &Value) const =0 |
| virtual void | linearizeFloatValueFast (QVector< qreal > &Value) const =0 |
| virtual bool | load () |
| QString | manufacturer () const |
| QString | name () const |
| virtual bool | operator== (const KoColorProfile &) const =0 |
| virtual QByteArray | rawData () const |
| virtual bool | save (const QString &fileName) |
| void | setFileName (const QString &filename) |
| virtual bool | supportsAbsolute () const =0 |
| virtual bool | supportsPerceptual () const =0 |
| virtual bool | supportsRelative () const =0 |
| virtual bool | supportsSaturation () const =0 |
| virtual QString | type () const |
| virtual QByteArray | uniqueId () const =0 |
| virtual bool | valid () const =0 |
| virtual float | version () const =0 |
| virtual | ~KoColorProfile () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Static Public Member Functions | |
| 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 | |
| TransferCharacteristics | characteristics {TRC_UNSPECIFIED} |
| QString | copyright |
| QString | fileName |
| QString | info |
| QString | manufacturer |
| QString | name |
| int | primaries {-1} |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Protected Member Functions | |
| 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 ©right) |
| void | setInfo (const QString &info) |
| void | setManufacturer (const QString &manufacturer) |
| void | setName (const QString &name) |
Private Attributes | |
| Private *const | d |
Contains information needed for color transformation.
Definition at line 15 of file KoColorProfile.cpp.
|
explicit |
| fileName | file name to load or save that profile |
Definition at line 25 of file KoColorProfile.cpp.
| KoColorProfile::KoColorProfile | ( | const KoColorProfile & | profile | ) |
Definition at line 31 of file KoColorProfile.cpp.
|
virtual |
|
pure virtual |
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.
Implemented in KoDummyColorProfile, and IccColorProfile.
|
static |
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'.
| primaries | predefined value. |
| colorants | the vector to fill. |
Definition at line 162 of file KoColorProfile.cpp.
References primaries, PRIMARIES_ADOBE_RGB_1998, PRIMARIES_EBU_Tech_3213_E, PRIMARIES_GENERIC_FILM, PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, PRIMARIES_ITU_R_BT_470_6_SYSTEM_B_G, PRIMARIES_ITU_R_BT_470_6_SYSTEM_M, PRIMARIES_ITU_R_BT_601_6, PRIMARIES_ITU_R_BT_709_5, PRIMARIES_PROPHOTO, PRIMARIES_SMPTE_240M, PRIMARIES_SMPTE_EG_432_1, PRIMARIES_SMPTE_RP_431_2, PRIMARIES_SMPTE_ST_428_1, and PRIMARIES_UNSPECIFIED.
|
inlinevirtual |
Reimplemented in IccColorProfile.
Definition at line 101 of file KoColorProfile.h.
|
pure virtual |
Comparing profile's TRC against the other with defined error threshold, returns true if profile TRC is matched.
Implemented in KoDummyColorProfile, and IccColorProfile.
| QString KoColorProfile::copyright | ( | ) | const |
Delinearizes first 3 values of QVector, leaving other values unchanged. Returns the same QVector if it is not possible to delinearize. Effectively undoes LinearizeFloatValue.
Implemented in IccColorProfile.
|
pure virtual |
Implemented in IccColorProfile.
| QString KoColorProfile::fileName | ( | ) | const |
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
virtual |
getColorPrimaries
Definition at line 80 of file KoColorProfile.cpp.
References colorantsForType(), d, getColorantsxyY(), getWhitePointxyY(), hasColorants(), KIS_SAFE_ASSERT_RECOVER, KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, primaries, PRIMARIES_ADOBE_RGB_1998, PRIMARIES_EBU_Tech_3213_E, PRIMARIES_GENERIC_FILM, PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, PRIMARIES_ITU_R_BT_470_6_SYSTEM_B_G, PRIMARIES_ITU_R_BT_470_6_SYSTEM_M, PRIMARIES_ITU_R_BT_601_6, PRIMARIES_ITU_R_BT_709_5, PRIMARIES_PROPHOTO, PRIMARIES_SMPTE_240M, PRIMARIES_SMPTE_EG_432_1, PRIMARIES_SMPTE_RP_431_2, PRIMARIES_SMPTE_ST_428_1, and PRIMARIES_UNSPECIFIED.
|
static |
getColorPrimariesName
| primaries |
Definition at line 127 of file KoColorProfile.cpp.
References primaries, PRIMARIES_ADOBE_RGB_1998, PRIMARIES_EBU_Tech_3213_E, PRIMARIES_GENERIC_FILM, PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, PRIMARIES_ITU_R_BT_470_6_SYSTEM_B_G, PRIMARIES_ITU_R_BT_470_6_SYSTEM_M, PRIMARIES_ITU_R_BT_601_6, PRIMARIES_ITU_R_BT_709_5, PRIMARIES_PROPHOTO, PRIMARIES_SMPTE_240M, PRIMARIES_SMPTE_EG_432_1, PRIMARIES_SMPTE_RP_431_2, PRIMARIES_SMPTE_ST_428_1, and PRIMARIES_UNSPECIFIED.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
static |
getTransferCharacteristicName
| curve | the number |
Definition at line 315 of file KoColorProfile.cpp.
References TRC_A98, TRC_GAMMA_1_8, TRC_GAMMA_2_4, TRC_IEC_61966_2_1, TRC_IEC_61966_2_4, TRC_ITU_R_BT_1361, TRC_ITU_R_BT_2020_2_10bit, TRC_ITU_R_BT_2020_2_12bit, TRC_ITU_R_BT_2100_0_HLG, TRC_ITU_R_BT_2100_0_PQ, TRC_ITU_R_BT_470_6_SYSTEM_B_G, TRC_ITU_R_BT_470_6_SYSTEM_M, TRC_ITU_R_BT_601_6, TRC_ITU_R_BT_709_5, TRC_LAB_L, TRC_LINEAR, TRC_LOGARITHMIC_100, TRC_LOGARITHMIC_100_sqrt10, TRC_PROPHOTO, TRC_SMPTE_240M, TRC_SMPTE_ST_428_1, and TRC_UNSPECIFIED.
|
virtual |
getTransferCharacteristics This function should be subclassed at some point so we can get the value from the lcms profile.
Definition at line 258 of file KoColorProfile.cpp.
References d, getEstimatedTRC(), hasTRC(), isLinear(), TRC_A98, TRC_GAMMA_1_8, TRC_GAMMA_2_4, TRC_IEC_61966_2_1, TRC_ITU_R_BT_470_6_SYSTEM_B_G, TRC_ITU_R_BT_470_6_SYSTEM_M, TRC_ITU_R_BT_709_5, TRC_LAB_L, TRC_LINEAR, TRC_LOGARITHMIC_100, TRC_LOGARITHMIC_100_sqrt10, TRC_PROPHOTO, TRC_SMPTE_240M, and TRC_UNSPECIFIED.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
| QString KoColorProfile::info | ( | ) | const |
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
Linearizes first 3 values of QVector, leaving other values unchanged. Returns the same QVector if it is not possible to linearize.
Implemented in IccColorProfile.
More imprecise versions of the above(limited to 16bit, and can't delinearize above 1.0.) Use this for filters and images.
Implemented in IccColorProfile.
|
virtual |
Load the profile in memory.
Reimplemented in IccColorProfile.
Definition at line 41 of file KoColorProfile.cpp.
| QString KoColorProfile::manufacturer | ( | ) | const |
| QString KoColorProfile::name | ( | ) | const |
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
inlinevirtual |
Reimplemented in IccColorProfile.
Definition at line 190 of file KoColorProfile.h.
|
virtual |
Override this function to save the profile.
| fileName | destination |
Reimplemented in IccColorProfile.
Definition at line 46 of file KoColorProfile.cpp.
|
protected |
setCharacteristics ideally, we'd read this from the icc profile curve, but that can be tricky, instead we'll set it on profile creation.
| curve |
Definition at line 309 of file KoColorProfile.cpp.
|
protected |
Allows to set the copyright string of that profile.
Definition at line 376 of file KoColorProfile.cpp.
| void KoColorProfile::setFileName | ( | const QString & | filename | ) |
|
protected |
Allows to set the information string of that profile.
Definition at line 368 of file KoColorProfile.cpp.
|
protected |
Allows to set the manufacturer string of that profile.
Definition at line 372 of file KoColorProfile.cpp.
References d, and manufacturer.
|
protected |
Allows to define the name of this profile.
Definition at line 364 of file KoColorProfile.cpp.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
inlinevirtual |
Reimplemented in IccColorProfile.
Definition at line 36 of file KoColorProfile.h.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Implemented in KoDummyColorProfile, and IccColorProfile.
|
pure virtual |
Return version
Implemented in KoDummyColorProfile, and IccColorProfile.
| TransferCharacteristics KoColorProfile::characteristics {TRC_UNSPECIFIED} |
Definition at line 22 of file KoColorProfile.cpp.
| QString KoColorProfile::copyright |
Definition at line 20 of file KoColorProfile.cpp.
|
private |
Definition at line 257 of file KoColorProfile.h.
| QString KoColorProfile::fileName |
Definition at line 18 of file KoColorProfile.cpp.
| QString KoColorProfile::info |
Definition at line 17 of file KoColorProfile.cpp.
| QString KoColorProfile::manufacturer |
Definition at line 19 of file KoColorProfile.cpp.
| QString KoColorProfile::name |
Definition at line 16 of file KoColorProfile.cpp.
| int KoColorProfile::primaries {-1} |
Definition at line 21 of file KoColorProfile.cpp.