|
Krita Source Code Documentation
|
#include <KoColorSpaceRegistry.h>
Inheritance diagram for KoColorSpaceRegistry:Public Types | |
| enum | ColorSpaceListProfilesSelection { OnlyDefaultProfile = 1 , AllProfiles = 4 } |
| enum | ColorSpaceListVisibility { OnlyUserVisible = 1 , AllColorSpaces = 4 } |
| using | CustomProfileNameAlias = QHash<QString, QString> |
Public Member Functions | |
| void | add (KoColorSpaceFactory *item) |
| void | addProfile (const KoColorProfile *profile) |
| void | addProfile (KoColorProfile *profile) |
| void | addProfileAlias (const QString &name, const QString &to) |
| void | addProfileToMap (KoColorProfile *p) |
| const KoColorSpace * | alpha16 () |
| const KoColorSpace * | alpha32f () |
| const KoColorSpace * | alpha8 () |
| KoColorConversionCache * | colorConversionCache () const |
| QList< KoID > | colorDepthList (const KoID &colorModelId, ColorSpaceListVisibility option) const |
| QList< KoID > | colorDepthList (const QString &colorModelId, ColorSpaceListVisibility option) const |
| QList< KoID > | colorModelsList (ColorSpaceListVisibility option) const |
| const KoColorSpace * | colorSpace (const QString &colorModelId, const QString &colorDepthId) |
| const KoColorSpace * | colorSpace (const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile) |
| const KoColorSpace * | colorSpace (const QString &colorModelId, const QString &colorDepthId, const QString &profileName) |
| const KoColorSpace * | colorSpace1 (const QString &colorSpaceId, const KoColorProfile *profile) |
| template<class LockPolicy = NormalLockPolicy> | |
| const KoColorSpace * | colorSpace1 (const QString &colorSpaceId, const QString &pName=QString()) |
| KoID | colorSpaceColorDepthId (const QString &_colorSpaceId) const |
| KoID | colorSpaceColorModelId (const QString &_colorSpaceId) const |
| QString | colorSpaceId (const KoID &colorModelId, const KoID &colorDepthId) const |
| QString | colorSpaceId (const QString &colorModelId, const QString &colorDepthId) const |
| QString | colorSpaceIdImpl (const QString &colorModelId, const QString &colorDepthId) const |
| KoColorConversionTransformation * | createColorConverter (const KoColorSpace *srcColorSpace, const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const |
| void | createColorConverters (const KoColorSpace *colorSpace, const QList< QPair< KoID, KoID > > &possibilities, KoColorConversionTransformation *&fromCS, KoColorConversionTransformation *&toCS) const |
| const KoColorProfile * | createColorProfile (const QString &colorModelId, const QString &colorDepthId, const QByteArray &rawData) |
| const KoColorProfile * | createColorProfile (const QString &colorModelId, const QString &colorDepthId, const QByteArray &rawData, CustomProfileNameAlias customProfileNameAlias) |
| QString | defaultProfileForColorSpace (const QString &colorSpaceId) const |
| QString | defaultProfileForCsIdImpl (const QString &csID) |
| const KoColorSpace * | getCachedColorSpaceImpl (const QString &csId, const QString &profileName) const |
| const KoColorSpace * | graya16 (const KoColorProfile *profile) |
| const KoColorSpace * | graya16 (const QString &profile=QString()) |
| const KoColorSpace * | graya8 (const KoColorProfile *profile) |
| const KoColorSpace * | graya8 (const QString &profile=QString()) |
| QString | idsToCacheName (const QString &csId, const QString &profileName) const |
| KoColorSpaceRegistry () | |
| const KoColorSpace * | lab16 (const KoColorProfile *profile) |
| const KoColorSpace * | lab16 (const QString &profileName=QString()) |
| const KoColorSpace * | lazyCreateColorSpaceImpl (const QString &csID, const KoColorProfile *profile) |
| QList< KoID > | listKeys () const |
| const KoColorProfile * | p2020G10Profile () const |
| const KoColorProfile * | p2020PQProfile () const |
| const KoColorProfile * | p709G10Profile () const |
| const KoColorProfile * | p709SRGBProfile () const |
| const KoColorSpace * | permanentColorspace (const KoColorSpace *_colorSpace) |
| Private (KoColorSpaceRegistry *_q) | |
| QString | profileAlias (const QString &name) const |
| const KoColorProfile * | profileByName (const QString &name) const |
| const KoColorProfile * | profileByUniqueId (const QByteArray &id) const |
| const KoColorProfile * | profileFor (const KoColorProfileQuery &query, const bool generate=true) const |
| profileFor tries to find the profile that matches these characteristics, if no such profile is found, it attempts to generate one. | |
| const KoColorProfile * | profileForCsIdWithFallbackImpl (const QString &csID, const QString &profileName) |
| const KoColorProfile * | profileForQColorSpace (const QColorSpace &space) |
| profileForQColorSpace Find a KoColorProfile that matches a given QColorSpace. This will use the QColorSpace::IccProfile function as a last resort, preferring to use preexisting profiles in the registry. | |
| bool | profileIsCompatible (const KoColorProfile *profile, const QString &colorSpaceId) |
| QList< const KoColorProfile * > | profilesFor (const QString &csID) const |
| QColorSpace | QColorSpaceForProfile (const KoColorProfile *profile) const |
| QColorSpaceForProfile Generate a QColorSpace for the given KoColorProfile. Will return sRGB when the profile is null. | |
| void | remove (KoColorSpaceFactory *item) |
| void | removeProfile (KoColorProfile *profile) |
| void | removeProfileAlias (const QString &name) |
| const KoColorSpace * | rgb16 (const KoColorProfile *profile) |
| const KoColorSpace * | rgb16 (const QString &profileName=QString()) |
| const KoColorSpace * | rgb8 (const KoColorProfile *profile) |
| const KoColorSpace * | rgb8 (const QString &profileName=QString()) |
| virtual | ~KoColorSpaceRegistry () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Static Public Member Functions | |
| static KoColorSpaceRegistry * | instance () |
Public Attributes | |
| const KoColorSpace * | alphaCs {nullptr} |
| const KoColorSpace * | alphaF32Cs {nullptr} |
| const KoColorSpace * | alphaU16Cs {nullptr} |
| KoColorConversionCache * | colorConversionCache {nullptr} |
| KoColorConversionSystem * | colorConversionSystem {nullptr} |
| KoGenericRegistry< KoColorSpaceFactory * > | colorSpaceFactoryRegistry |
| QScopedPointer< ConversionSystemInterface > | conversionSystemInterface |
| QHash< QString, const KoColorSpace * > | csMap |
| const KoColorSpace * | lab16sLAB {nullptr} |
| KoColorProfileStorage | profileStorage |
| KoColorSpaceRegistry * | q {nullptr} |
| QReadWriteLock | registrylock |
| const KoColorSpace * | rgbU8sRGB {nullptr} |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Member Functions | |
| QList< const KoColorSpace * > | allColorSpaces (ColorSpaceListVisibility visibility, ColorSpaceListProfilesSelection pSelection) |
| const KoColorConversionSystem * | colorConversionSystem () const |
| void | init () |
| KoColorSpaceRegistry (const KoColorSpaceRegistry &) | |
| KoColorSpaceRegistry | operator= (const KoColorSpaceRegistry &) |
| const KoColorProfile * | profileForInternal (const KoColorProfileQuery &query, const bool generate) const |
Private Attributes | |
| Private *const | d |
Friends | |
| struct | FriendOfColorSpaceRegistry |
| class | KisCrashFilterTest |
| class | KisCsConversionTest |
| class | KisIteratorNGTest |
| class | KisIteratorTest |
| class | KisPainterTest |
| class | KoColorSpacesBenchmark |
| class | TestColorConversionSystem |
| class | TestKoColorSpaceSanity |
| class | TestProfileGeneration |
The registry for colorspaces and profiles. This class contains:
Locking policy details:
Basically, we have two levels of locks in the registry: 1) (outer level) is Private::registrylock, which controls the structures of the color space registry itself 2) (inner level) is KoColorProfileStorage::Private::lock controls the structures related to profiles.
The locks can be taken individually, but if you are going to take both of them, you should always follow the order 1) registry; 2) profiles. Otherwise you'll get a deadlock.
To avoid recursive deadlocks, all the dependent classes (KoColorConversionSystem and KoColorSpaceFactory) now do not use the direct links to the registry. Instead, they use special private interfaces that skip recursive locking and ensure we take a lock twice.
Definition at line 43 of file KoColorSpaceRegistry.cpp.
| using KoColorSpaceRegistry::CustomProfileNameAlias = QHash<QString, QString> |
Create a color profile from a memory array, if possible, otherwise return 0. If there is an existing profile with the same name, it will be used instead, and the binary data from rawData will be ignored
Definition at line 135 of file KoColorSpaceRegistry.h.
| Enumerator | |
|---|---|
| OnlyDefaultProfile | Only add the default profile. |
| AllProfiles | Add all profiles. |
Definition at line 62 of file KoColorSpaceRegistry.h.
| Enumerator | |
|---|---|
| OnlyUserVisible | Only user visible color space. |
| AllColorSpaces | All color space even those not visible to the user. |
Definition at line 58 of file KoColorSpaceRegistry.h.
| KoColorSpaceRegistry::KoColorSpaceRegistry | ( | ) |
Definition at line 199 of file KoColorSpaceRegistry.cpp.
References d.
|
virtual |
Definition at line 205 of file KoColorSpaceRegistry.cpp.
References KoColorSpace::d, d, and OwnedByRegistryRegistryDeletes.
|
private |
| void KoColorSpaceRegistry::add | ( | KoColorSpaceFactory * | item | ) |
add a color space to the registry
| item | the color space factory to add |
Definition at line 232 of file KoColorSpaceRegistry.cpp.
References d, KIS_SAFE_ASSERT_RECOVER_NOOP, and profileFor().
| void KoColorSpaceRegistry::addProfile | ( | const KoColorProfile * | profile | ) |
Definition at line 355 of file KoColorSpaceRegistry.cpp.
References addProfile(), and KoColorProfile::clone().
| void KoColorSpaceRegistry::addProfile | ( | KoColorProfile * | profile | ) |
register the profile with the color space registry
| profile | the new profile to be registered so it can be combined with colorspaces. |
Definition at line 330 of file KoColorSpaceRegistry.cpp.
References addProfileToMap(), d, KIS_SAFE_ASSERT_RECOVER_NOOP, p, and profileFor().
| void KoColorSpaceRegistry::addProfileAlias | ( | const QString & | name, |
| const QString & | to ) |
Create an alias to a profile with a different name. Then profileByName will return the profile to when passed name as a parameter.
Aliases are considered 'weak'. If a real profile with the name name is present (or added), it shadows the existing alias. If such an explicit profile gets removed, then the alias takes its place again.
Definition at line 271 of file KoColorSpaceRegistry.cpp.
References d.
| void KoColorSpaceRegistry::addProfileToMap | ( | KoColorProfile * | p | ) |
|
private |
Definition at line 1032 of file KoColorSpaceRegistry.cpp.
References AllColorSpaces, KoColorSpaceFactory::colorModelId(), d, KoID::id(), KoColorSpaceFactory::id(), instance(), KoColorProfile::name, OnlyDefaultProfile, profilesFor(), KoColorSpaceFactory::userVisible(), and warnPigment.
| const KoColorSpace * KoColorSpaceRegistry::alpha16 | ( | ) |
Definition at line 575 of file KoColorSpaceRegistry.cpp.
References KoAlphaColorSpaceImpl< _CSTrait >::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::alpha32f | ( | ) |
Definition at line 595 of file KoColorSpaceRegistry.cpp.
References KoAlphaColorSpaceImpl< _CSTrait >::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::alpha8 | ( | ) |
Convenience methods to get the often used alpha colorspaces
Definition at line 566 of file KoColorSpaceRegistry.cpp.
References KoAlphaColorSpaceImpl< _CSTrait >::colorSpaceId(), and d.
| KoColorConversionCache * KoColorSpaceRegistry::colorConversionCache | ( | ) | const |
|
private |
WARNING: conversion system is guarded by the registry locks, don't use it anywhere other than unittests!
| QList< KoID > KoColorSpaceRegistry::colorDepthList | ( | const KoID & | colorModelId, |
| ColorSpaceListVisibility | option ) const |
Definition at line 893 of file KoColorSpaceRegistry.cpp.
References colorDepthList(), and KoID::id().
| QList< KoID > KoColorSpaceRegistry::colorDepthList | ( | const QString & | colorModelId, |
| ColorSpaceListVisibility | option ) const |
Definition at line 899 of file KoColorSpaceRegistry.cpp.
References AllColorSpaces, KoColorSpaceFactory::colorDepthId(), KoColorSpaceFactory::colorModelId(), d, Float16BitsColorDepthID, Float32BitsColorDepthID, Float64BitsColorDepthID, KoID::id(), Integer16BitsColorDepthID, Integer8BitsColorDepthID, and KoColorSpaceFactory::userVisible().
| QList< KoID > KoColorSpaceRegistry::colorModelsList | ( | ColorSpaceListVisibility | option | ) | const |
Definition at line 879 of file KoColorSpaceRegistry.cpp.
References AllColorSpaces, KoColorSpaceFactory::colorModelId(), d, and KoColorSpaceFactory::userVisible().
| const KoColorSpace * KoColorSpaceRegistry::colorSpace | ( | const QString & | colorModelId, |
| const QString & | colorDepthId ) |
Definition at line 312 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::colorSpace | ( | const QString & | colorModelId, |
| const QString & | colorDepthId, | ||
| const KoColorProfile * | profile ) |
Return a colorspace that works with the parameter profile.
| colorSpaceId | the ID string of the colorspace that you want to have returned |
| profile | the profile be combined with the colorspace |
Definition at line 302 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::colorSpace | ( | const QString & | colorModelId, |
| const QString & | colorDepthId, | ||
| const QString & | profileName ) |
Return a colorspace that works with the parameter profile.
| profileName | the name of the KoColorProfile to be combined with the colorspace |
Definition at line 307 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::colorSpace1 | ( | const QString & | colorSpaceId, |
| const KoColorProfile * | profile ) |
Return a colorspace that works with the parameter profile.
| colorSpaceId | the ID string of the colorspace that you want to have returned |
| profile | the profile be combined with the colorspace |
| const KoColorSpace * KoColorSpaceRegistry::colorSpace1 | ( | const QString & | colorSpaceId, |
| const QString & | pName = QString() ) |
Return a colorspace that works with the parameter profile.
| profileName | the name of the KoColorProfile to be combined with the colorspace |
| KoID KoColorSpaceRegistry::colorSpaceColorDepthId | ( | const QString & | _colorSpaceId | ) | const |
This function is a compatibility function used to get the color space from all kra files.
Definition at line 956 of file KoColorSpaceRegistry.cpp.
References KoColorSpaceFactory::colorDepthId(), and d.
| KoID KoColorSpaceRegistry::colorSpaceColorModelId | ( | const QString & | _colorSpaceId | ) | const |
This function is a compatibility function used to get the color space from all kra files.
Definition at line 944 of file KoColorSpaceRegistry.cpp.
References KoColorSpaceFactory::colorModelId(), and d.
| QString KoColorSpaceRegistry::colorSpaceId | ( | const KoID & | colorModelId, |
| const KoID & | colorDepthId ) const |
It's a convenient function that behave like the above. Return the id of the colorspace that have the defined colorModelId with colorDepthId.
| colorModelId | id of the color model |
| colorDepthId | id of the color depth |
Definition at line 939 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), and KoID::id().
| QString KoColorSpaceRegistry::colorSpaceId | ( | const QString & | colorModelId, |
| const QString & | colorDepthId ) const |
Return the id of the colorspace that have the defined colorModelId with colorDepthId.
| colorModelId | id of the color model |
| colorDepthId | id of the color depth |
Definition at line 933 of file KoColorSpaceRegistry.cpp.
References d.
| QString KoColorSpaceRegistry::colorSpaceIdImpl | ( | const QString & | colorModelId, |
| const QString & | colorDepthId ) const |
| KoColorConversionTransformation * KoColorSpaceRegistry::createColorConverter | ( | const KoColorSpace * | srcColorSpace, |
| const KoColorSpace * | dstColorSpace, | ||
| KoColorConversionTransformation::Intent | renderingIntent, | ||
| KoColorConversionTransformation::ConversionFlags | conversionFlags ) const |
This function is called by the color space to create a color conversion between two color space. This function search in the graph of transformations the best possible path between the two color space.
Definition at line 388 of file KoColorSpaceRegistry.cpp.
References d.
| void KoColorSpaceRegistry::createColorConverters | ( | const KoColorSpace * | colorSpace, |
| const QList< QPair< KoID, KoID > > & | possibilities, | ||
| KoColorConversionTransformation *& | fromCS, | ||
| KoColorConversionTransformation *& | toCS ) const |
This function creates two transformations, one from the color space and one to the color space. The destination color space is picked from a list of color space, such as the conversion between the two color space is of the best quality.
The typical use case of this function is for KoColorTransformationFactory which doesn't support all color spaces, so unsupported color space have to find an acceptable conversion in order to use that KoColorTransformationFactory.
| colorSpace | the source color space |
| possibilities | a list of color space among which we need to find the best conversion |
| fromCS | the conversion from the source color space will be affected to this variable |
| toCS | the revert conversion to the source color space will be affected to this variable |
Definition at line 394 of file KoColorSpaceRegistry.cpp.
References colorSpace(), and d.
| const KoColorProfile * KoColorSpaceRegistry::createColorProfile | ( | const QString & | colorModelId, |
| const QString & | colorDepthId, | ||
| const QByteArray & | rawData ) |
create a profile of the specified type.
Definition at line 1003 of file KoColorSpaceRegistry.cpp.
References createColorProfile().
| const KoColorProfile * KoColorSpaceRegistry::createColorProfile | ( | const QString & | colorModelId, |
| const QString & | colorDepthId, | ||
| const QByteArray & | rawData, | ||
| CustomProfileNameAlias | customProfileNameAlias ) |
Definition at line 1008 of file KoColorSpaceRegistry.cpp.
References addProfile(), KoColorSpaceFactory::createColorProfile(), d, and profileByName().
| QString KoColorSpaceRegistry::defaultProfileForColorSpace | ( | const QString & | colorSpaceId | ) | const |
Definition at line 382 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), and d.
| QString KoColorSpaceRegistry::defaultProfileForCsIdImpl | ( | const QString & | csID | ) |
| const KoColorSpace * KoColorSpaceRegistry::getCachedColorSpaceImpl | ( | const QString & | csId, |
| const QString & | profileName ) const |
The function checks if a colorspace with a certain id and profile name can be found in the cache NOTE: the function doesn't take any lock but it needs to be called inside a d->registryLock locked either in read or write.
| csId | The colorspace id |
| profileName | The colorspace profile name |
| KoColorSpace | The matching colorspace |
| 0 | Null pointer if not match |
| const KoColorSpace * KoColorSpaceRegistry::graya16 | ( | const KoColorProfile * | profile | ) |
Convenience method to get a GRAYA 16 bit colorspace. If a profile is not specified, the default profile defined in the GRAY colorspace will be used
| the | profile |
Definition at line 640 of file KoColorSpaceRegistry.cpp.
References colorSpace(), graya16(), GrayAColorModelID, KoID::id(), instance(), and Integer16BitsColorDepthID.
| const KoColorSpace * KoColorSpaceRegistry::graya16 | ( | const QString & | profile = QString() | ) |
Convenience method to get a GRAYA 16 bit colorspace. If a profile is not specified, the default profile defined in the GRAY colorspace will be used
| the | profile |
Definition at line 628 of file KoColorSpaceRegistry.cpp.
References colorSpace(), d, KoColorSpaceFactory::defaultProfile(), GrayAColorModelID, KoID::id(), instance(), and Integer16BitsColorDepthID.
| const KoColorSpace * KoColorSpaceRegistry::graya8 | ( | const KoColorProfile * | profile | ) |
Convenience method to get a GRAYA 8 bit colorspace. If a profile is not specified, the default profile defined in the GRAY colorspace will be used
| profile | the profile |
Definition at line 617 of file KoColorSpaceRegistry.cpp.
References colorSpace(), graya8(), GrayAColorModelID, KoID::id(), instance(), and Integer8BitsColorDepthID.
| const KoColorSpace * KoColorSpaceRegistry::graya8 | ( | const QString & | profile = QString() | ) |
Convenience method to get a GRAYA 8 bit colorspace. If a profile is not specified, the default profile defined in the GRAY colorspace will be used
| profile | the profile name |
Definition at line 604 of file KoColorSpaceRegistry.cpp.
References colorSpace(), d, KoColorSpaceFactory::defaultProfile(), GrayAColorModelID, KoID::id(), instance(), and Integer8BitsColorDepthID.
| QString KoColorSpaceRegistry::idsToCacheName | ( | const QString & | csId, |
| const QString & | profileName ) const |
|
private |
Definition at line 146 of file KoColorSpaceRegistry.cpp.
References add(), KoGenericRegistry< T >::add(), addProfile(), KoPluginLoader::PluginsConfig::blacklist, d, dbgPigment, KoPluginLoader::PluginsConfig::group, KoPluginLoader::instance(), KoColorSpaceEngineRegistry::instance(), listKeys(), and KoPluginLoader::load().
|
static |
Return an instance of the KoColorSpaceRegistry Creates an instance if that has never happened before and returns the singleton instance.
Definition at line 137 of file KoColorSpaceRegistry.cpp.
References init().
| const KoColorSpace * KoColorSpaceRegistry::lab16 | ( | const KoColorProfile * | profile | ) |
Convenience method to get an Lab 16bit colorspace with the given profile.
| profile | an Lab profile |
Definition at line 696 of file KoColorSpaceRegistry.cpp.
References KoLabColorSpace::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::lab16 | ( | const QString & | profileName = QString() | ) |
Convenience method to get an Lab 16bit colorspace. If a profile is not specified, an Lab profile with a D50 whitepoint will be used.
| profileName | the name of an Lab color profile |
Definition at line 685 of file KoColorSpaceRegistry.cpp.
References KoLabColorSpace::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::lazyCreateColorSpaceImpl | ( | const QString & | csID, |
| const KoColorProfile * | profile ) |
This function return a list of all the keys in KoID format by using the name() method on the objects stored in the registry.
Definition at line 992 of file KoColorSpaceRegistry.cpp.
References d.
|
private |
| const KoColorProfile * KoColorSpaceRegistry::p2020G10Profile | ( | ) | const |
Convenience method to get a standard profile for Rec.2020 linear light color space
Definition at line 708 of file KoColorSpaceRegistry.cpp.
References profileByName().
| const KoColorProfile * KoColorSpaceRegistry::p2020PQProfile | ( | ) | const |
Convenience method to get a standard profile for Rec.2020 PQ color space
Definition at line 713 of file KoColorSpaceRegistry.cpp.
References profileByName().
| const KoColorProfile * KoColorSpaceRegistry::p709G10Profile | ( | ) | const |
Convenience method to get a standard profile for Rec. 709 linear light color space
Definition at line 718 of file KoColorSpaceRegistry.cpp.
References profileByName().
| const KoColorProfile * KoColorSpaceRegistry::p709SRGBProfile | ( | ) | const |
Convenience method to get a standard profile for Rec. 709 sRGB-tone- response-curve profile
Definition at line 723 of file KoColorSpaceRegistry.cpp.
References profileByName().
| const KoColorSpace * KoColorSpaceRegistry::permanentColorspace | ( | const KoColorSpace * | _colorSpace | ) |
Definition at line 978 of file KoColorSpaceRegistry.cpp.
References KoColorSpace::d, d, KoColorSpace::id, NotOwnedByRegistry, and KoColorSpace::profile().
|
inline |
Definition at line 49 of file KoColorSpaceRegistry.cpp.
| QString KoColorSpaceRegistry::profileAlias | ( | const QString & | name | ) | const |
Definition at line 281 of file KoColorSpaceRegistry.cpp.
References d.
| const KoColorProfile * KoColorSpaceRegistry::profileByName | ( | const QString & | name | ) | const |
Return a profile by its given name, or 0 if none registered.
| name | the product name as set on the profile. |
Definition at line 286 of file KoColorSpaceRegistry.cpp.
References d.
| const KoColorProfile * KoColorSpaceRegistry::profileByUniqueId | ( | const QByteArray & | id | ) | const |
Returns a profile by its unique id stored/calculated in the header. The first call to this function might take long, because the map is created on the first use only (atm used by SVG only)
| id | unique ProfileID of the profile (MD5 sum of its header) |
Definition at line 291 of file KoColorSpaceRegistry.cpp.
References d.
| const KoColorProfile * KoColorSpaceRegistry::profileFor | ( | const KoColorProfileQuery & | query, |
| const bool | generate = true ) const |
profileFor tries to find the profile that matches these characteristics, if no such profile is found, it attempts to generate one.
| query | – profile characteristics to get the profile for. |
| generate | – whether to try to generate a profile if no match was found. |
Definition at line 728 of file KoColorSpaceRegistry.cpp.
References profileForInternal(), KoColorProfileQuery::transfer, and TRC_ITU_R_BT_2100_0_PQ.
| const KoColorProfile * KoColorSpaceRegistry::profileForCsIdWithFallbackImpl | ( | const QString & | csID, |
| const QString & | profileName ) |
|
private |
Definition at line 736 of file KoColorSpaceRegistry.cpp.
References d, KoGenericRegistry< T >::get(), KoColorSpaceEngine::getProfile(), KoColorProfileQuery::hdrReferenceWhite, KoColorSpaceEngineRegistry::instance(), p2020G10Profile(), p2020PQProfile(), p709G10Profile(), p709SRGBProfile(), KoColorProfileQuery::primaries, PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, PRIMARIES_ITU_R_BT_709_5, KoColorProfileQuery::transfer, TRC_IEC_61966_2_1, TRC_ITU_R_BT_2100_0_PQ, and TRC_LINEAR.
| const KoColorProfile * KoColorSpaceRegistry::profileForQColorSpace | ( | const QColorSpace & | space | ) |
profileForQColorSpace Find a KoColorProfile that matches a given QColorSpace. This will use the QColorSpace::IccProfile function as a last resort, preferring to use preexisting profiles in the registry.
| space | – space to return the profile for. |
Definition at line 793 of file KoColorSpaceRegistry.cpp.
References KoColorSpaceEngine::addProfile(), addProfile(), createColorProfile(), KoGenericRegistry< T >::get(), GrayAColorModelID, KoID::id(), KoColorSpaceEngineRegistry::instance(), Integer8BitsColorDepthID, KoColorProfileQuery::isValid(), mapQColorSpaceColorPrimaries, mapQColorSpaceColorTransfer, KoColorProfile::name, p709SRGBProfile(), PRIMARIES_UNSPECIFIED, profileByName(), profileByUniqueId(), profileFor(), RGBAColorModelID, TRC_UNSPECIFIED, KoColorProfile::uniqueId(), KoColorProfileQuery::whitePoint, and KoColorimetryUtils::xy::x.
| bool KoColorSpaceRegistry::profileIsCompatible | ( | const KoColorProfile * | profile, |
| const QString & | colorSpaceId ) |
Definition at line 317 of file KoColorSpaceRegistry.cpp.
References colorSpaceId(), d, and KoColorSpaceFactory::profileIsCompatible().
| QList< const KoColorProfile * > KoColorSpaceRegistry::profilesFor | ( | const QString & | csID | ) | const |
Return the list of profiles for a colorspace with the argument id. Profiles will not work with any color space, you can query which profiles that are registered with this registry can be used in combination with the argument factory.
| colorSpaceId | the colorspace-id with which all the returned profiles will work. |
Definition at line 296 of file KoColorSpaceRegistry.cpp.
References d.
| QColorSpace KoColorSpaceRegistry::QColorSpaceForProfile | ( | const KoColorProfile * | profile | ) | const |
QColorSpaceForProfile Generate a QColorSpace for the given KoColorProfile. Will return sRGB when the profile is null.
| profile | – source profile |
Definition at line 861 of file KoColorSpaceRegistry.cpp.
References KoColorProfile::getColorPrimaries(), KoColorProfile::getTransferCharacteristics(), p2020PQProfile(), p709SRGBProfile(), PRIMARIES_ITU_R_BT_2020_2_AND_2100_0, KoColorProfile::rawData(), and TRC_ITU_R_BT_2100_0_PQ.
| void KoColorSpaceRegistry::remove | ( | KoColorSpaceFactory * | item | ) |
Remove a color space factory from the registry. Note that it is the responsibility of the caller to ensure that the colorspaces are not used anymore.
Definition at line 252 of file KoColorSpaceRegistry.cpp.
References KoColorSpace::d, d, KoColorSpace::id, KoColorSpaceFactory::id(), KoColorProfile::name, OwnedByRegistryRegistryDeletes, and KoColorSpace::profile().
| void KoColorSpaceRegistry::removeProfile | ( | KoColorProfile * | profile | ) |
Definition at line 360 of file KoColorSpaceRegistry.cpp.
References d.
| void KoColorSpaceRegistry::removeProfileAlias | ( | const QString & | name | ) |
Remove profile alias name if exists
Definition at line 276 of file KoColorSpaceRegistry.cpp.
References d.
| const KoColorSpace * KoColorSpaceRegistry::rgb16 | ( | const KoColorProfile * | profile | ) |
Convenience method to get an RGBA 16bit colorspace with the given profile.
| profile | an RGB profile |
Definition at line 680 of file KoColorSpaceRegistry.cpp.
References KoRgbU16ColorSpace::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::rgb16 | ( | const QString & | profileName = QString() | ) |
Convenience method to get an RGBA 16bit colorspace. If a profile is not specified, an sRGB profile will be used.
| profileName | the name of an RGB color profile |
Definition at line 675 of file KoColorSpaceRegistry.cpp.
References KoRgbU16ColorSpace::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::rgb8 | ( | const KoColorProfile * | profile | ) |
Convenience method to get an RGBA 8bit colorspace with the given profile.
| profile | an RGB profile |
Definition at line 663 of file KoColorSpaceRegistry.cpp.
References KoRgbU8ColorSpace::colorSpaceId(), and d.
| const KoColorSpace * KoColorSpaceRegistry::rgb8 | ( | const QString & | profileName = QString() | ) |
Convenience method to get an RGBA 8bit colorspace. If a profile is not specified, an sRGB profile will be used.
| profileName | the name of an RGB color profile |
Definition at line 651 of file KoColorSpaceRegistry.cpp.
References KoRgbU8ColorSpace::colorSpaceId(), and d.
|
friend |
Definition at line 426 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 422 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 418 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 420 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 419 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 421 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 423 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 425 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 424 of file KoColorSpaceRegistry.h.
|
friend |
Definition at line 427 of file KoColorSpaceRegistry.h.
| const KoColorSpace* KoColorSpaceRegistry::alphaCs {nullptr} |
Definition at line 61 of file KoColorSpaceRegistry.cpp.
| const KoColorSpace* KoColorSpaceRegistry::alphaF32Cs {nullptr} |
Definition at line 66 of file KoColorSpaceRegistry.cpp.
| const KoColorSpace* KoColorSpaceRegistry::alphaU16Cs {nullptr} |
Definition at line 62 of file KoColorSpaceRegistry.cpp.
| KoColorConversionCache * KoColorSpaceRegistry::colorConversionCache {nullptr} |
Definition at line 58 of file KoColorSpaceRegistry.cpp.
| const KoColorConversionSystem * KoColorSpaceRegistry::colorConversionSystem {nullptr} |
Definition at line 57 of file KoColorSpaceRegistry.cpp.
| KoGenericRegistry<KoColorSpaceFactory *> KoColorSpaceRegistry::colorSpaceFactoryRegistry |
Definition at line 53 of file KoColorSpaceRegistry.cpp.
| QScopedPointer<ConversionSystemInterface> KoColorSpaceRegistry::conversionSystemInterface |
Definition at line 56 of file KoColorSpaceRegistry.cpp.
| QHash<QString, const KoColorSpace *> KoColorSpaceRegistry::csMap |
Definition at line 55 of file KoColorSpaceRegistry.cpp.
|
private |
Definition at line 452 of file KoColorSpaceRegistry.h.
| const KoColorSpace* KoColorSpaceRegistry::lab16sLAB {nullptr} |
Definition at line 60 of file KoColorSpaceRegistry.cpp.
| KoColorProfileStorage KoColorSpaceRegistry::profileStorage |
Definition at line 54 of file KoColorSpaceRegistry.cpp.
| KoColorSpaceRegistry* KoColorSpaceRegistry::q {nullptr} |
Definition at line 51 of file KoColorSpaceRegistry.cpp.
| QReadWriteLock KoColorSpaceRegistry::registrylock |
Definition at line 67 of file KoColorSpaceRegistry.cpp.
| const KoColorSpace* KoColorSpaceRegistry::rgbU8sRGB {nullptr} |
Definition at line 59 of file KoColorSpaceRegistry.cpp.