digiKam
digikam-lcms.cpp File Reference

Macros

#define K007   static_cast<cmsTagSignature>( 0x4B303037 )
 
#define MATRIX_DET_TOLERANCE   0.0001
 

Functions

cmsBool _cmsAdaptationMatrix (cmsMAT3 *const r, const cmsMAT3 *ConeMatrix, const cmsCIEXYZ *const FromIll, const cmsCIEXYZ *const ToIll)
 
cmsBool _cmsBuildRGB2XYZtransferMatrix (cmsMAT3 *const r, const cmsCIExyY *const WhitePt, const cmsCIExyYTRIPLE *const Primrs)
 
void _l1LPMAT3tol2cmsMAT3 (LPMAT3 l1, cmsMAT3 *const l2)
 
void _l2cmsMAT3tol1LPMAT3 (cmsMAT3 *const l2, LPMAT3 l1)
 
void _l2tol1MAT3 (MAT3 *const l2, MAT3 *const l1)
 
LCMSBOOL dkCmsAdaptMatrixFromD50 (LPMAT3 r, LPcmsCIExyY DestWhitePt)
 
LCMSBOOL dkCmsCloseProfile (cmsHPROFILE hProfile)
 
cmsHPROFILE dkCmsCreate_sRGBProfile ()
 
cmsHTRANSFORM dkCmsCreateProofingTransform (cmsHPROFILE Input, DWORD InputFormat, cmsHPROFILE Output, DWORD OutputFormat, cmsHPROFILE Proofing, int Intent, int ProofingIntent, DWORD dwFlags)
 
cmsHTRANSFORM dkCmsCreateTransform (cmsHPROFILE Input, DWORD InputFormat, cmsHPROFILE Output, DWORD OutputFormat, int Intent, DWORD dwFlags)
 
cmsHPROFILE dkCmsCreateXYZProfile ()
 
void dkCmsDeleteTransform (cmsHTRANSFORM hTransform)
 
double dkCmsDeltaE (LPcmsCIELab Lab1, LPcmsCIELab Lab2)
 
void dkCmsDoTransform (cmsHTRANSFORM Transform, LPVOID InputBuffer, LPVOID OutputBuffer, unsigned int Size)
 
int dkCmsErrorAction (int)
 
void dkCmsFloat2XYZEncoded (WORD XYZ[3], const cmsCIEXYZ *const fXYZ)
 
icColorSpaceSignature dkCmsGetColorSpace (cmsHPROFILE hProfile)
 
icProfileClassSignature dkCmsGetDeviceClass (cmsHPROFILE hProfile)
 
icColorSpaceSignature dkCmsGetPCS (cmsHPROFILE hProfile)
 
DWORD dkCmsGetProfileICCversion (cmsHPROFILE hProfile)
 
LCMSBOOL dkCmsIsTag (cmsHPROFILE hProfile, icTagSignature sig)
 
cmsHPROFILE dkCmsOpenProfileFromFile (const char *const ICCProfile, const char *const sAccess)
 
cmsHPROFILE dkCmsOpenProfileFromMem (LPVOID MemPtr, DWORD dwSize)
 
LCMSBOOL dkCmsReadICCMatrixRGB2XYZ (LPMAT3 r, cmsHPROFILE hProfile)
 
void dkCmsSetAlarmCodes (int r, int g, int b)
 
QString dkCmsTakeCopyright (cmsHPROFILE hProfile)
 
DWORD dkCmsTakeHeaderFlags (cmsHPROFILE hProfile)
 
QString dkCmsTakeManufacturer (cmsHPROFILE hProfile)
 
LCMSBOOL dkCmsTakeMediaWhitePoint (LPcmsCIEXYZ Dest, cmsHPROFILE hProfile)
 
QString dkCmsTakeModel (cmsHPROFILE hProfile)
 
QString dkCmsTakeProductDesc (cmsHPROFILE hProfile)
 
QString dkCmsTakeProductInfo (cmsHPROFILE hProfile)
 
QString dkCmsTakeProductName (cmsHPROFILE hProfile)
 
const BYTEdkCmsTakeProfileID (cmsHPROFILE hProfile)
 
int dkCmsTakeRenderingIntent (cmsHPROFILE hProfile)
 
void dkCmsXYZ2xyY (LPcmsCIExyY Dest, const cmsCIEXYZ *const Source)
 
cmsBool GetProfileRGBPrimaries (cmsHPROFILE hProfile, cmsCIEXYZTRIPLE *const result, cmsUInt32Number intent)
 

Macro Definition Documentation

◆ K007

#define K007   static_cast<cmsTagSignature>( 0x4B303037 )

◆ MATRIX_DET_TOLERANCE

#define MATRIX_DET_TOLERANCE   0.0001

Function Documentation

◆ _cmsAdaptationMatrix()

cmsBool _cmsAdaptationMatrix ( cmsMAT3 *const  r,
const cmsMAT3 *  ConeMatrix,
const cmsCIEXYZ *const  FromIll,
const cmsCIEXYZ *const  ToIll 
)

Returns the final chromatic adaptation from illuminant FromIll to Illuminant ToIll The cone matrix can be specified in ConeMatrix. If NULL, Bradford is assumed

◆ _cmsBuildRGB2XYZtransferMatrix()

cmsBool _cmsBuildRGB2XYZtransferMatrix ( cmsMAT3 *const  r,
const cmsCIExyY *const  WhitePt,
const cmsCIExyYTRIPLE *const  Primrs 
)

Build a White point, primary chromas transfer matrix from RGB to CIE XYZ This is just an approximation, I am not handling all the non-linear aspects of the RGB to XYZ process, and assuming that the gamma correction has transitive property in the transformation chain.

the algorithm:

       - First I build the absolute conversion matrix using
         primaries in XYZ. This matrix is next inverted
       - Then I evaluate the source white point across this matrix
         obtaining the coefficients of the transformation
       - Then, I apply these coefficients to the original matrix

References FALSE.

◆ _l1LPMAT3tol2cmsMAT3()

void _l1LPMAT3tol2cmsMAT3 ( LPMAT3  l1,
cmsMAT3 *const  l2 
)

Referenced by dkCmsAdaptMatrixFromD50().

◆ _l2cmsMAT3tol1LPMAT3()

void _l2cmsMAT3tol1LPMAT3 ( cmsMAT3 *const  l2,
LPMAT3  l1 
)

◆ _l2tol1MAT3()

void _l2tol1MAT3 ( MAT3 *const  l2,
MAT3 *const  l1 
)

◆ dkCmsAdaptMatrixFromD50()

LCMSBOOL dkCmsAdaptMatrixFromD50 ( LPMAT3  r,
LPcmsCIExyY  DestWhitePt 
)

White Point & Primary chromas handling Returns the final chromatic adaptation from illuminant FromIll to Illuminant ToIll The cone matrix can be specified in ConeMatrix. If NULL, assuming D50 source. White point is given in xyY

References _l1LPMAT3tol2cmsMAT3().

◆ dkCmsCloseProfile()

◆ dkCmsCreate_sRGBProfile()

cmsHPROFILE dkCmsCreate_sRGBProfile ( )

◆ dkCmsCreateProofingTransform()

cmsHTRANSFORM dkCmsCreateProofingTransform ( cmsHPROFILE  Input,
DWORD  InputFormat,
cmsHPROFILE  Output,
DWORD  OutputFormat,
cmsHPROFILE  Proofing,
int  Intent,
int  ProofingIntent,
DWORD  dwFlags 
)

◆ dkCmsCreateTransform()

cmsHTRANSFORM dkCmsCreateTransform ( cmsHPROFILE  Input,
DWORD  InputFormat,
cmsHPROFILE  Output,
DWORD  OutputFormat,
int  Intent,
DWORD  dwFlags 
)

◆ dkCmsCreateXYZProfile()

cmsHPROFILE dkCmsCreateXYZProfile ( )

◆ dkCmsDeleteTransform()

void dkCmsDeleteTransform ( cmsHTRANSFORM  hTransform)

◆ dkCmsDeltaE()

double dkCmsDeltaE ( LPcmsCIELab  Lab1,
LPcmsCIELab  Lab2 
)

◆ dkCmsDoTransform()

void dkCmsDoTransform ( cmsHTRANSFORM  Transform,
LPVOID  InputBuffer,
LPVOID  OutputBuffer,
unsigned int  Size 
)

◆ dkCmsErrorAction()

◆ dkCmsFloat2XYZEncoded()

void dkCmsFloat2XYZEncoded ( WORD  XYZ[3],
const cmsCIEXYZ *const  fXYZ 
)

◆ dkCmsGetColorSpace()

icColorSpaceSignature dkCmsGetColorSpace ( cmsHPROFILE  hProfile)

◆ dkCmsGetDeviceClass()

icProfileClassSignature dkCmsGetDeviceClass ( cmsHPROFILE  hProfile)

◆ dkCmsGetPCS()

icColorSpaceSignature dkCmsGetPCS ( cmsHPROFILE  hProfile)

◆ dkCmsGetProfileICCversion()

DWORD dkCmsGetProfileICCversion ( cmsHPROFILE  hProfile)

◆ dkCmsIsTag()

DIGIKAM_EXPORT LCMSBOOL dkCmsIsTag ( cmsHPROFILE  hProfile,
icTagSignature  sig 
)

◆ dkCmsOpenProfileFromFile()

cmsHPROFILE dkCmsOpenProfileFromFile ( const char *const  ICCProfile,
const char *const  sAccess 
)

◆ dkCmsOpenProfileFromMem()

cmsHPROFILE dkCmsOpenProfileFromMem ( LPVOID  MemPtr,
DWORD  dwSize 
)

◆ dkCmsReadICCMatrixRGB2XYZ()

LCMSBOOL dkCmsReadICCMatrixRGB2XYZ ( LPMAT3  r,
cmsHPROFILE  hProfile 
)

◆ dkCmsSetAlarmCodes()

void dkCmsSetAlarmCodes ( int  r,
int  g,
int  b 
)

◆ dkCmsTakeCopyright()

QString dkCmsTakeCopyright ( cmsHPROFILE  hProfile)

◆ dkCmsTakeHeaderFlags()

DWORD dkCmsTakeHeaderFlags ( cmsHPROFILE  hProfile)

◆ dkCmsTakeManufacturer()

QString dkCmsTakeManufacturer ( cmsHPROFILE  hProfile)

◆ dkCmsTakeMediaWhitePoint()

LCMSBOOL dkCmsTakeMediaWhitePoint ( LPcmsCIEXYZ  Dest,
cmsHPROFILE  hProfile 
)

References FALSE, and TRUE.

◆ dkCmsTakeModel()

QString dkCmsTakeModel ( cmsHPROFILE  hProfile)

◆ dkCmsTakeProductDesc()

QString dkCmsTakeProductDesc ( cmsHPROFILE  hProfile)

◆ dkCmsTakeProductInfo()

QString dkCmsTakeProductInfo ( cmsHPROFILE  hProfile)

References K007.

◆ dkCmsTakeProductName()

QString dkCmsTakeProductName ( cmsHPROFILE  hProfile)

◆ dkCmsTakeProfileID()

const BYTE* dkCmsTakeProfileID ( cmsHPROFILE  hProfile)

◆ dkCmsTakeRenderingIntent()

int dkCmsTakeRenderingIntent ( cmsHPROFILE  hProfile)

◆ dkCmsXYZ2xyY()

void dkCmsXYZ2xyY ( LPcmsCIExyY  Dest,
const cmsCIEXYZ *const  Source 
)

◆ GetProfileRGBPrimaries()

cmsBool GetProfileRGBPrimaries ( cmsHPROFILE  hProfile,
cmsCIEXYZTRIPLE *const  result,
cmsUInt32Number  intent 
)

References FALSE, and TRUE.

Referenced by dkCmsReadICCMatrixRGB2XYZ().