IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
IccUtil.cpp File Reference
#include "IccIO.h"
#include "IccUtil.h"
#include "IccTagFactory.h"
#include "IccStructFactory.h"
#include "IccArrayFactory.h"
#include "IccMpeFactory.h"
#include <stdlib.h>
#include <memory.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include <time.h>
+ Include dependency graph for IccUtil.cpp:

Go to the source code of this file.

Macros

#define DUMPBYTESPERLINE   16
 
#define PI   3.1415926535897932384626433832795
 

Functions

icUInt8Number icABtoU8 (icFloatNumber num)
 
void icColorIndexName (icChar *szName, icColorSpaceSignature csSig, int nIndex, int nColors, const icChar *szUnknown)
 
void icColorValue (icChar *szValue, icFloatNumber nValue, icColorSpaceSignature csSig, int nIndex, bool bUseLegacy)
 
icFloatNumber icCubeth (icFloatNumber v)
 
icFloatNumber icDeltaE (const icFloatNumber *lab1, const icFloatNumber *lab2)
 
void icDeNormXyz (icFloatNumber *XYZ, icFloatNumber *WhiteXYZ)
 
icS15Fixed16Number icDtoF (icFloatNumber num)
 
icU8Fixed8Number icDtoUCF (icFloatNumber num)
 
icU16Fixed16Number icDtoUF (icFloatNumber num)
 
icU1Fixed15Number icDtoUSF (icFloatNumber num)
 
icFloatNumber ICCPROFLIB_API icF16toF (icFloat16Number num)
 
icFloatNumber icFtoD (icS15Fixed16Number num)
 
icFloat16Number ICCPROFLIB_API icFtoF16 (icFloat32Number num)
 
icUInt16Number icFtoU16 (icFloatNumber num)
 
icUInt8Number icFtoU8 (icFloatNumber num)
 
const icCharicGet16bitSig (icChar *pBuf, icUInt16Number nSig, bool bGetHexVal)
 
const icCharicGetColorSig (icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
 
const icCharicGetColorSigStr (icChar *pBuf, icUInt32Number nSig)
 
icSignature icGetFirstSigPathSig (std::string sigPath)
 
icSignature icGetLastSigPathSig (std::string sigPath)
 
icUInt32Number icGetMaterialColorSpaceSamples (icMaterialColorSignature sig)
 
icSignature icGetSecondSigPathSig (std::string sigPath)
 
const icCharicGetSig (icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
 
std::string icGetSigPath (icUInt32Number nSig)
 
const icCharicGetSigStr (icChar *pBuf, icUInt32Number nSig)
 
icUInt32Number icGetSigVal (const icChar *pBuf)
 
icUInt32Number icGetSpaceSamples (icColorSpaceSignature sig)
 
icUInt32Number icGetSpectralSpaceSamples (const icHeader *pHdr)
 
icUInt8Number icGetStorageTypeBytes (icUInt16Number nStorageType)
 
static icInt32Number icHexDigit (icChar digit)
 
icFloatNumber icICubeth (icFloatNumber v)
 
icUInt32Number icIntMax (icUInt32Number v1, icUInt32Number v2)
 
icUInt32Number icIntMin (icUInt32Number v1, icUInt32Number v2)
 
bool icIsIllumD50 (icXYZNumber xyz)
 
bool icIsNear (icFloatNumber v1, icFloatNumber v2, icFloatNumber nearRange)
 
static bool icIsS15Fixed16NumberNear (icS15Fixed16Number F, icFloatNumber D)
 
bool icIsSpaceCLR (icColorSpaceSignature sig)
 
void icLab2Lch (icFloatNumber *Lch, icFloatNumber *Lab)
 
void icLabFromPcs (icFloatNumber *Lab)
 Here are some conversion routines to convert to regular Lab encoding.
 
void icLabToPcs (icFloatNumber *Lab)
 
void icLabtoXYZ (icFloatNumber *XYZ, const icFloatNumber *Lab, const icFloatNumber *WhiteXYZ)
 
void icLch2Lab (icFloatNumber *Lab, icFloatNumber *Lch)
 
void icMatrixDump (std::string &sDump, icS15Fixed16Number *pMatrix)
 
bool icMatrixInvert3x3 (icFloatNumber *M)
 
void icMatrixMultiply3x3 (icFloatNumber *result, const icFloatNumber *l, const icFloatNumber *r)
 
icFloatNumber icMax (icFloatNumber v1, icFloatNumber v2)
 
icValidateStatus icMaxStatus (icValidateStatus s1, icValidateStatus s2)
 
void icMemDump (std::string &sDump, void *pBuf, icUInt32Number nNum)
 
icFloatNumber icMin (icFloatNumber v1, icFloatNumber v2)
 
void icNormXyz (icFloatNumber *XYZ, icFloatNumber *WhiteXYZ)
 
void * icRealloc (void *ptr, size_t size)
 
icFloatNumber icRmsDif (const icFloatNumber *v1, const icFloatNumber *v2, icUInt32Number nSample)
 
double icRoundOffset (double v)
 
bool icSameSpectralRange (const icSpectralRange &rng1, const icSpectralRange &rng2)
 
static icFloatNumber icSq (icFloatNumber x)
 
icFloatNumber icU16toF (icUInt16Number num)
 
icFloatNumber icU8toAB (icUInt8Number num)
 
icFloatNumber icU8toF (icUInt8Number num)
 
icFloatNumber icUCFtoD (icU8Fixed8Number num)
 
icFloatNumber icUFtoD (icU16Fixed16Number num)
 
icFloatNumber icUSFtoD (icU1Fixed15Number num)
 
bool icValidOverlap (const icPositionNumber &pos1, const icPositionNumber &pos2, bool bAllowSame)
 
bool icValidTagPos (const icPositionNumber &pos, icUInt32Number nTagHeaderSize, icUInt32Number nTagSize, bool bAllowEmpty)
 
void icVectorApplyMatrix3x3 (icFloatNumber *result, const icFloatNumber *m, const icFloatNumber *v)
 
void icXyzFromPcs (icFloatNumber *XYZ)
 Here are some conversion routines to convert to regular XYZ encoding.
 
void icXYZtoLab (icFloatNumber *Lab, const icFloatNumber *XYZ, const icFloatNumber *WhiteXYZ)
 
void icXyzToPcs (icFloatNumber *XYZ)
 

Variables

ICCPROFLIB_API icFloatNumber icD50XYZ [3] = { 0.9642f, 1.0000f, 0.8249f }
 
ICCPROFLIB_API icFloatNumber icD50XYZxx [3] = { 96.42f, 100.00f, 82.49f }
 
ICCPROFLIB_API const char * icMsgValidateCriticalError = "Error! - "
 
ICCPROFLIB_API const char * icMsgValidateInformation = "Information - "
 
ICCPROFLIB_API const char * icMsgValidateNonCompliant = "NonCompliant! - "
 
ICCPROFLIB_API const char * icMsgValidateWarning = "Warning! - "
 

Macro Definition Documentation

◆ DUMPBYTESPERLINE

#define DUMPBYTESPERLINE   16

◆ PI

#define PI   3.1415926535897932384626433832795

Function Documentation

◆ icABtoU8()

icUInt8Number icABtoU8 ( icFloatNumber  num)
767{
768 icFloatNumber v = num + 128.0f;
769 if (v<0)
770 v=0;
771 else if (v>255)
772 v=255;
773
774 return (icUInt8Number)(v + 0.5);
775}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
float icFloatNumber
Definition IccDefs.h:101

◆ icColorIndexName()

void icColorIndexName ( icChar szName,
icColorSpaceSignature  csSig,
int  nIndex,
int  nColors,
const icChar szUnknown 
)
297{
298 icChar szSig[5] = {0};
299 int i;
300
301 if (csSig!=icSigUnknownData) {
302 szSig[0] = (icChar)(csSig>>24);
303 szSig[1] = (icChar)(csSig>>16);
304 szSig[2] = (icChar)(csSig>>8);
305 szSig[3] = (icChar)(csSig);
306 szSig[4] = '\0';
307
308 for (i=3; i>0; i--) {
309 if (szSig[i]==' ')
310 szSig[i]='\0';
311 }
312 if (nColors==1) {
313 strcpy(szName, szSig);
314 }
315 else if ((size_t)nColors == strlen(szSig)) {
316 sprintf(szName, "%s_%c", szSig, szSig[nIndex]);
317 }
318 else {
319 sprintf(szName, "%s_%d", szSig, nIndex+1);
320 }
321 }
322 else if (nColors==1) {
323 strcpy(szName, szUnknown);
324 }
325 else {
326 sprintf(szName, "%s_%d", szUnknown, nIndex+1);
327 }
328}
#define icSigUnknownData
Definition icProfileHeader.h:903
char icChar
Definition IccDefs.h:110

Referenced by CIccTagNamedColor2::Describe(), CIccMBB::Describe(), and CIccCLUT::DumpLut().

+ Here is the caller graph for this function:

◆ icColorValue()

void icColorValue ( icChar szValue,
icFloatNumber  nValue,
icColorSpaceSignature  csSig,
int  nIndex,
bool  bUseLegacy 
)
333{
334 if (csSig==icSigLabData) {
335 if (!bUseLegacy) {
336 if (!nIndex || nIndex>2)
337 sprintf(szValue, "%7.3lf", nValue * 100.0);
338 else
339 sprintf(szValue, "%8.3lf", nValue * 255.0 - 128.0);
340 }
341 else {
342 if (!nIndex || nIndex>2)
343 sprintf(szValue, "%7.3lf", nValue * 100.0 * 65535.0 / 65280.0);
344 else
345 sprintf(szValue, "%8.3lf", nValue * 255.0 * 65535.0 / 65280.0 - 128.0);
346 }
347 }
348 else if (csSig==icSigUnknownData) {
349 sprintf(szValue, "%8.5lf", nValue);
350 }
351 else {
352 sprintf(szValue, "%7.3lf", nValue * 100.0);
353 }
354}
@ icSigLabData
Definition icProfileHeader.h:847

References icSigLabData.

Referenced by CIccTagNamedColor2::Describe(), CIccTagCurve::Describe(), CIccCLUT::DumpLut(), CIccTagCurve::DumpLut(), and CIccCLUT::Iterate().

+ Here is the caller graph for this function:

◆ icCubeth()

icFloatNumber icCubeth ( icFloatNumber  v)
806{
807 if (v> 0.008856) {
808 return (icFloatNumber)ICC_CBRTF(v);
809 }
810 else {
811 return (icFloatNumber)(7.787037037037037037037037037037*v + 16.0/116.0);
812 }
813}
#define ICC_CBRTF(v)
Definition IccProfLibConf.h:153

Referenced by CIccOpDefToLab::Exec(), and icXYZtoLab().

+ Here is the caller graph for this function:

◆ icDeltaE()

icFloatNumber icDeltaE ( const icFloatNumber lab1,
const icFloatNumber lab2 
)
528{
529 return (icFloatNumber)sqrt(icSq(lab1[0]-lab2[0]) + icSq(lab1[1]-lab2[1]) + icSq(lab1[2]-lab2[2]));
530}
static icFloatNumber icSq(icFloatNumber x)
Definition IccUtil.cpp:521

References icSq().

Referenced by CIccMinMaxEval::Compare(), CIccPRMG::EvaluateProfile(), CIccTagNamedColor2::FindCachedPCSColor(), and CIccArrayNamedColor::FindPcsColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icDeNormXyz()

void icDeNormXyz ( icFloatNumber XYZ,
icFloatNumber WhiteXYZ 
)
796{
797 if (!WhiteXYZ)
798 WhiteXYZ = icD50XYZ;
799
800 XYZ[0] = XYZ[0] * WhiteXYZ[0];
801 XYZ[1] = XYZ[1] * WhiteXYZ[1];
802 XYZ[2] = XYZ[2] * WhiteXYZ[2];
803}
ICCPROFLIB_API icFloatNumber icD50XYZ[3]
Definition IccUtil.cpp:782

References icD50XYZ.

◆ icDtoF()

546{
548
549 if (num<-32768.0)
550 num = -32768.0;
551 else if (num>32767.0)
552 num = 32767.0;
553
554 rv = (icS15Fixed16Number)icRoundOffset((double)num*65536.0);
555
556 return rv;
557}
icInt32Number icS15Fixed16Number
Definition icProfileHeader.h:302
double icRoundOffset(double v)
Definition IccUtil.cpp:223

References icRoundOffset().

Referenced by CIccTagLut16::CIccTagLut16(), CIccTagLut8::CIccTagLut8(), CIccDefaultEncProfileConverter::ConvertFromParams(), main(), CIccProfileXml::ParseBasic(), CIccTagXmlXYZ::ParseXml(), CIccTagXmlFixedNum< T, Tsig >::ParseXml(), CIccTagXmlMeasurement::ParseXml(), CIccTagXmlViewingConditions::ParseXml(), CIccTagXmlResponseCurveSet16::ParseXml(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), and CIccTagLut16::Write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icDtoUCF()

icU8Fixed8Number icDtoUCF ( icFloatNumber  num)
609{
611
612 if (num<0)
613 num = 0;
614 else if (num>255.0)
615 num = 255.0;
616
617 rv = (icU8Fixed8Number)icRoundOffset(num*256.0);
618
619 return rv;
620}
icUInt16Number icU8Fixed8Number
Definition IccDefs.h:83

References icRoundOffset().

+ Here is the call graph for this function:

◆ icDtoUF()

567{
569
570 if (num<0)
571 num = 0;
572 else if (num>65535.0)
573 num = 65535.0;
574
575 rv = (icU16Fixed16Number)icRoundOffset((double)num*65536.0);
576
577 return rv;
578}
icUInt32Number icU16Fixed16Number
Definition icProfileHeader.h:303

References icRoundOffset().

Referenced by CIccTagXmlChromaticity::ParseXml(), CIccTagXmlFixedNum< T, Tsig >::ParseXml(), and CIccTagChromaticity::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icDtoUSF()

icU1Fixed15Number icDtoUSF ( icFloatNumber  num)
588{
590
591 if (num<0)
592 num = 0;
593 else if (num>65535.0/32768.0)
594 num = 65535.0/32768.0;
595
596 rv = (icU1Fixed15Number)icRoundOffset(num*32768.0);
597
598 return rv;
599}
icUInt16Number icU1Fixed15Number
Definition IccDefs.h:82

References icRoundOffset().

+ Here is the call graph for this function:

◆ icF16toF()

630{
631 icUInt16Number numsgn, numexp, nummnt;
632 icUInt32Number rv, rvsgn, rvexp, rvmnt;
633 icInt32Number tmpexp;
634 icFloatNumber * rvfp, rvf;
635 int exp;
636
637 if (!(num & 0x7FFF)) {
638 rv = ((icUInt32Number) num) << 16;
639 } else {
640 numsgn = num & 0x8000;
641 numexp = num & 0x7C00;
642 nummnt = num & 0x03FF;
643 if (!numexp) {
644 exp = -1;
645 do {
646 exp++;
647 nummnt <<= 1;
648 } while (!(nummnt & 0x0400)); // Shift until leading bit overflows into exponent bit
649 rvsgn = ((icUInt32Number) numsgn) << 16;
650 tmpexp = ((icUInt32Number) (numexp >> 10)) - 15 + 127 - exp;
651 rvexp = (icUInt32Number) (tmpexp << 23);
652 rvmnt = ((icUInt32Number) (nummnt & 0x03FFu)) << 13;
653 rv = (rvsgn | rvexp | rvmnt);
654 } else if (numexp == 0x7C00) {
655 if (!nummnt) {
656 rv = (((icUInt32Number) numsgn) << 16) | ((icUInt32Number) 0x7F800000);
657 } else {
658 rv = (icUInt32Number) 0xFFC00000;
659 }
660 } else {
661 rvsgn = ((icUInt32Number) numsgn) << 16;
662 tmpexp = ((icUInt32Number) (numexp >> 10)) - 15 + 127;
663 rvexp = (icUInt32Number) (tmpexp << 23);
664 rvmnt = ((icUInt32Number) nummnt) << 13;
665 rv = (rvsgn | rvexp | rvmnt);
666 }
667 }
668 rvfp = (icFloatNumber*)&rv;
669 rvf = *rvfp;
670 return rvf;
671}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
long icInt32Number
Definition icProfileHeader.h:291
unsigned long icUInt32Number
Definition icProfileHeader.h:262

Referenced by CIccInfo::CheckData(), CIccMpeSpectralMatrix::Describe(), CIccMpeSpectralObserver::Describe(), CIccTagSpectralDataInfo::Describe(), CIccTagSpectralViewingConditions::Describe(), CIccTagEmbeddedProfile::Describe(), CIccSparseMatrixFloat16::get(), main(), main(), CIccSampledCurveSegmentXml::ParseXml(), CIccSinglSampledeCurveXml::ParseXml(), CIccIO::ReadFloat16Float(), CIccMatrixMath::SetRange(), CIccMpeXmlEmissionMatrix::ToXml(), CIccMpeXmlInvEmissionMatrix::ToXml(), CIccMpeXmlEmissionCLUT::ToXml(), CIccMpeXmlReflectanceCLUT::ToXml(), CIccMpeXmlEmissionObserver::ToXml(), CIccMpeXmlReflectanceObserver::ToXml(), CIccTagXmlSpectralDataInfo::ToXml(), CIccTagXmlSpectralViewingConditions::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ icFtoD()

◆ icFtoF16()

674{
676 icUInt16Number rvsgn, rvexp, rvmnt;
677 icUInt32Number flt, *fltp, fltsgn, fltexp, fltmnt;
678 int exp;
679
680 fltp = (icUInt32Number*)&num;
681 flt = *fltp;
682 if (!(flt & 0x7FFFFFFF)) {
683 rv = (icUInt16Number) (flt >> 16);
684 } else {
685 fltsgn = flt & 0x80000000;
686 fltexp = flt & 0x7F800000;
687 fltmnt = flt & 0x007FFFFF;
688 if (!fltexp) {
689 rv = (icUInt16Number) (fltsgn >> 16);
690 } else if (fltexp == 0x7F800000) {
691 if (!fltmnt) {
692 rv = (icUInt16Number) ((fltsgn >> 16) | 0x7C00); // Signed Inf
693 } else {
694 rv = (icUInt16Number) 0xFE00; // NaN
695 }
696 } else { // Normalized number
697 rvsgn = (icUInt16Number) (fltsgn >> 16);
698 exp = ((int)(fltexp >> 23)) - 127 + 15;
699 if (exp >= 0x1F) { // Overflow
700 rv = (icUInt16Number) ((fltsgn >> 16) | 0x7C00); // Signed Inf
701 } else if (exp <= 0) { // Underflow
702 if ((14 - exp) > 24) {
703 rvmnt = (icUInt16Number) 0; // Set mantissa to zero
704 } else {
705 fltmnt |= 0x00800000; // Include hidden leading bit
706 rvmnt = (icUInt16Number) (fltmnt >> (14 - exp));
707 if ((fltmnt >> (13 - exp)) & 0x00000001) // Rounding?
708 rvmnt += (icUInt16Number) 1;
709 }
710 rv = (rvsgn | rvmnt);
711 } else {
712 rvexp = (icUInt16Number) (exp << 10);
713 rvmnt = (icUInt16Number) (fltmnt >> 13);
714 if (fltmnt & 0x00001000) // Rounding?
715 rv = (rvsgn | rvexp | rvmnt) + (icUInt16Number) 1;
716 else
717 rv = (rvsgn | rvexp | rvmnt);
718 }
719 }
720 }
721 return rv;
722}

Referenced by CIccProfileXml::ParseBasic(), CIccMpeXmlEmissionMatrix::ParseXml(), CIccMpeXmlInvEmissionMatrix::ParseXml(), CIccMpeXmlEmissionCLUT::ParseXml(), CIccMpeXmlReflectanceCLUT::ParseXml(), CIccMpeXmlEmissionObserver::ParseXml(), CIccMpeXmlReflectanceObserver::ParseXml(), CIccTagXmlSpectralDataInfo::ParseXml(), CIccTagXmlSpectralViewingConditions::ParseXml(), CIccSparseMatrixFloat16::set(), and CIccIO::WriteFloat16Float().

+ Here is the caller graph for this function:

◆ icFtoU16()

icUInt16Number icFtoU16 ( icFloatNumber  num)
746{
748
749 if (num<0)
750 num = 0;
751 else if (num>1.0)
752 num = 1.0;
753
754 rv = (icUInt16Number)icRoundOffset(num*65535.0);
755
756 return rv;
757}

References icRoundOffset().

Referenced by CIccTagXmlColorantTable::ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icFtoU8()

icUInt8Number icFtoU8 ( icFloatNumber  num)
725{
726 icUInt8Number rv;
727
728 if (num<0)
729 num = 0;
730 else if (num>1.0)
731 num = 1.0;
732
733 rv = (icUInt8Number)icRoundOffset(num*255.0);
734
735 return rv;
736}

References icRoundOffset().

+ Here is the call graph for this function:

◆ icGet16bitSig()

const icChar * icGet16bitSig ( icChar pBuf,
icUInt16Number  nSig,
bool  bGetHexVal 
)
1001{
1002 icUInt16Number sig = nSig;
1003 icUInt8Number c;
1004
1005 if (!nSig) {
1006 strcpy(pBuf, "NULL");
1007 return pBuf;
1008 }
1009
1010 pBuf[0] = '\'';
1011 c = (icUInt8Number)(sig >> 8);
1012 if (!isprint(c))
1013 c = '?';
1014 pBuf[1] = c;
1015 c = (icUInt8Number)(sig & 0x00FF);
1016 if (!isprint(c))
1017 c = '?';
1018 pBuf[2] = c;
1019
1020 if (bGetHexVal)
1021 sprintf(pBuf + 3, "' = %04X", nSig);
1022 else
1023 sprintf(pBuf + 3, "'");
1024
1025 return pBuf;
1026}

◆ icGetColorSig()

const icChar * icGetColorSig ( icChar pBuf,
icUInt32Number  nSig,
bool  bGetHexVal 
)
1089{
1090 icUInt32Number sig=nSig;
1091
1092 switch (icGetColorSpaceType(nSig)) {
1093 case icSigNChannelData:
1099
1100 pBuf[0]='\"';
1101 pBuf[1] = (icUInt8Number)(sig>>24);
1102 sig<<=8;
1103 pBuf[2] = (icUInt8Number)(sig>>24);
1104 sprintf(pBuf+3, "%04X\"", icNumColorSpaceChannels(nSig));
1105 return pBuf;
1106
1107 default:
1108 {
1109
1110 int i, j=-1;
1111 icUInt8Number c;
1112 bool bNeedHexVal = false;
1113
1114 pBuf[0] = '\'';
1115 for (i=1; i<5; i++) {
1116 c=(icUInt8Number)(sig>>24);
1117 if (!isprint(c)) {
1118 c = '?';
1119 bNeedHexVal = true;
1120 }
1121 pBuf[i]=c;
1122 sig <<=8;
1123 }
1124
1125 if (bGetHexVal)
1126 sprintf(pBuf+5, "' = %08X", nSig);
1127 else if (bNeedHexVal) {
1128 sprintf(pBuf, "%08Xh", nSig);
1129 }
1130 else
1131 sprintf(pBuf+5, "'");
1132 }
1133 }
1134
1135 return pBuf;
1136}
#define icNumColorSpaceChannels(sig)
Definition icProfileHeader.h:934
#define icGetColorSpaceType(sig)
Definition icProfileHeader.h:932
@ icSigNChannelData
Definition icProfileHeader.h:891
@ icSigReflectanceSpectralData
Definition icProfileHeader.h:909
@ icSigTransmisionSpectralData
Definition icProfileHeader.h:912
@ icSigBiSpectralReflectanceData
Definition icProfileHeader.h:918
@ icSigRadiantSpectralData
Definition icProfileHeader.h:915
@ icSigSparseMatrixReflectanceData
Definition icProfileHeader.h:921

References icSigBiSpectralReflectanceData, icSigNChannelData, icSigRadiantSpectralData, icSigReflectanceSpectralData, icSigSparseMatrixReflectanceData, and icSigTransmisionSpectralData.

Referenced by CIccCfgColorData::toLegacy().

+ Here is the caller graph for this function:

◆ icGetColorSigStr()

const icChar * icGetColorSigStr ( icChar pBuf,
icUInt32Number  nSig 
)
1140{
1141 icUInt32Number sig=nSig;
1142
1143 switch (icGetColorSpaceType(nSig)) {
1144 case icSigNChannelData:
1150
1151 pBuf[0] = (icUInt8Number)(sig>>24);
1152 sig<<=8;
1153 pBuf[1] = (icUInt8Number)(sig>>24);
1154 sprintf(pBuf+2, "%04X", icNumColorSpaceChannels(nSig));
1155 return pBuf;
1156
1157 default:
1158 {
1159
1160 int i, j=-1;
1161 icUInt8Number c;
1162 bool bGetHexVal = false;
1163
1164 for (i=0; i<4; i++) {
1165 c=(icUInt8Number)(sig>>24);
1166 if (!c) {
1167 j=i;
1168 }
1169 else if (j!=-1) {
1170 bGetHexVal = true;
1171 }
1172 else if (!isprint(c) ||c==':') {
1173 c='?';
1174 bGetHexVal = true;
1175 }
1176 pBuf[i]=c;
1177 sig <<=8;
1178 }
1179
1180 if (bGetHexVal)
1181 sprintf(pBuf, "%08Xh", nSig);
1182 else
1183 pBuf[4] = '\0';
1184 }
1185 }
1186
1187 return pBuf;
1188}

References icSigBiSpectralReflectanceData, icSigNChannelData, icSigRadiantSpectralData, icSigReflectanceSpectralData, icSigSparseMatrixReflectanceData, and icSigTransmisionSpectralData.

Referenced by CIccTagSpectralDataInfo::Describe(), CIccCfgDataApply::toJson(), CIccCfgColorData::toJson(), CIccTagXmlSpectralDataInfo::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ icGetFirstSigPathSig()

icSignature icGetFirstSigPathSig ( std::string  sigPath)
1202{
1203 icSignature rv = 0;
1204 const char *ptr = sigPath.c_str();
1205 while(*ptr==':') {
1206 std::string sigStr;
1207 ptr++;
1208 while(*ptr && *ptr!=':') {
1209 sigStr += *ptr;
1210 ptr++;
1211 }
1212 rv = icGetSigVal(sigStr.c_str());
1213 //Skip embedded tag path entry
1214 if (rv != icSigEmbeddedV5ProfileTag)
1215 break;
1216 }
1217 return rv;
1218}
icUInt32Number icSignature
Definition icProfileHeader.h:271
@ icSigEmbeddedV5ProfileTag
Definition icProfileHeader.h:479
icUInt32Number icGetSigVal(const icChar *pBuf)
Definition IccUtil.cpp:1258

References icGetSigVal(), and icSigEmbeddedV5ProfileTag.

Referenced by CIccMBB::Validate(), CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccTagText::Validate(), CIccTagSignature::Validate(), CIccTagSparseMatrixArray::Validate(), CIccTagNum< T, Tsig >::Validate(), CIccTagFloatNum< T, Tsig >::Validate(), CIccTagColorantTable::Validate(), CIccTagSpectralDataInfo::Validate(), CIccTagArray::Validate(), CIccTagCurve::Validate(), CIccTagParametricCurve::Validate(), CIccMatrix::Validate(), CIccCLUT::Validate(), and CIccTagMultiProcessElement::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icGetLastSigPathSig()

icSignature icGetLastSigPathSig ( std::string  sigPath)
1221{
1222 size_t n = sigPath.length();
1223 if (!n)
1224 return icGetSigVal(sigPath.c_str());
1225
1226 const char *sig = sigPath.c_str();
1227
1228 for (n = n - 1; n > 0; n--) {
1229 if (sig[n] == ':') {
1230 break;
1231 }
1232 }
1233 if (/* n >= 0 && */ sig[n] == ':')
1234 n++;
1235 return icGetSigVal(sig+n);
1236}

References icGetSigVal().

+ Here is the call graph for this function:

◆ icGetMaterialColorSpaceSamples()

icUInt32Number icGetMaterialColorSpaceSamples ( icMaterialColorSignature  sig)
1392{
1394 return 0;
1395
1396 return icNumColorSpaceChannels(sig);
1397}
icColorSpaceSignature
Definition icProfileHeader.h:843
@ icSigSrcMCSChannelData
Definition icProfileHeader.h:894

References icSigSrcMCSChannelData.

Referenced by CIccTagNum< T, Tsig >::Validate(), CIccTagFloatNum< T, Tsig >::Validate(), CIccTagArray::Validate(), and CIccTagMultiProcessElement::Validate().

+ Here is the caller graph for this function:

◆ icGetSecondSigPathSig()

icSignature icGetSecondSigPathSig ( std::string  sigPath)
1239{
1240 icSignature rv = 0;
1241 const char *ptr = sigPath.c_str();
1242 if(*ptr==':') {
1243 std::string sigStr;
1244 ptr++;
1245 ptr = strchr(ptr+1, ':');
1246 if (ptr) {
1247 ptr++;
1248 while(*ptr && *ptr!=':') {
1249 sigStr += *ptr;
1250 ptr++;
1251 }
1252 rv = icGetSigVal(sigStr.c_str());
1253 }
1254 }
1255 return rv;
1256}

References icGetSigVal().

Referenced by CIccTagSparseMatrixArray::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icGetSig()

const icChar * icGetSig ( icChar pBuf,
icUInt32Number  nSig,
bool  bGetHexVal 
)
1029{
1030 int i;
1031 icUInt32Number sig=nSig;
1032 icUInt8Number c;
1033
1034 if (!nSig) {
1035 strcpy(pBuf, "NULL");
1036 return pBuf;
1037 }
1038
1039 pBuf[0] = '\'';
1040 for (i=1; i<5; i++) {
1041 c=(icUInt8Number)(sig>>24);
1042 if (!isprint(c))
1043 c='?';
1044 pBuf[i]=c;
1045 sig <<=8;
1046 }
1047
1048 if (bGetHexVal)
1049 sprintf(pBuf+5, "' = %08X", nSig);
1050 else
1051 sprintf(pBuf+5, "'");
1052
1053 return pBuf;
1054}

Referenced by SIccCalcOp::Describe(), CIccMpeAcs::Describe(), CIccTagProfileSeqDesc::Describe(), CIccTagEmbeddedProfile::Describe(), CIccMpeUnknown::Describe(), DumpTag(), CIccBasicMpeFactory::GetElementSigName(), CIccInfo::GetUnknownName(), main(), and CIccMpeUnknown::Validate().

+ Here is the caller graph for this function:

◆ icGetSigPath()

std::string icGetSigPath ( icUInt32Number  nSig)
1192{
1193 char buf[20];
1194 std::string rv = ":";
1195
1196 rv += icGetSigStr(buf, nSig);
1197
1198 return rv;
1199}
const icChar * icGetSigStr(icChar *pBuf, icUInt32Number nSig)
Definition IccUtil.cpp:1056

References icGetSigStr().

Referenced by CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccArrayUnknown::Validate(), CIccArrayColorantInfo::Validate(), CIccStructUnknown::Validate(), CIccTagColorantOrder::Validate(), CIccTagProfileSeqDesc::Validate(), CIccTagStruct::Validate(), CIccTagArray::Validate(), CIccTagMultiProcessElement::Validate(), CIccTagProfileSequenceId::Validate(), CIccSegmentedCurve::Validate(), CIccMpeCurveSet::Validate(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeMatrix::Validate(), CIccMpeCLUT::Validate(), CIccMpeExtCLUT::Validate(), CIccMpeCalculator::Validate(), CIccMpeSpectralMatrix::Validate(), CIccMpeInvEmissionMatrix::Validate(), CIccMpeSpectralCLUT::Validate(), CIccMpeSpectralObserver::Validate(), and CIccMultiProcessElement::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icGetSigStr()

const icChar * icGetSigStr ( icChar pBuf,
icUInt32Number  nSig 
)
1057{
1058 int i, j=-1;
1059 icUInt32Number sig=nSig;
1060 icUInt8Number c;
1061 bool bGetHexVal = false;
1062
1063 for (i=0; i<4; i++) {
1064 c=(icUInt8Number)(sig>>24);
1065 if (!c) {
1066 j=i;
1067 }
1068 else if (j!=-1) {
1069 bGetHexVal = true;
1070 }
1071 else if (!isprint(c) ||c==':') {
1072 c='?';
1073 bGetHexVal = true;
1074 }
1075 pBuf[i]=c;
1076 sig <<=8;
1077 }
1078
1079 if (bGetHexVal)
1080 sprintf(pBuf, "%08Xh", nSig);
1081 else
1082 pBuf[4] = '\0';
1083
1084 return pBuf;
1085}

Referenced by SIccCalcOp::Describe(), CIccBasicArrayFactory::GetArraySigName(), CIccBasicStructFactory::GetStructSigName(), icGetSigPath(), icProfDescToXml(), jsonFromEnvMap(), CIccMpeXmlUnknown::ToXml(), CIccMpeXmlTintArray::ToXml(), CIccMpeXmlBAcs::ToXml(), CIccMpeXmlEAcs::ToXml(), CIccTagXmlTextDescription::ToXml(), CIccTagXmlSignature::ToXml(), CIccTagXmlMultiLocalizedUnicode::ToXml(), CIccTagXmlProfileSequenceId::ToXml(), CIccTagXmlDict::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ icGetSigVal()

icUInt32Number icGetSigVal ( const icChar pBuf)
1259{
1261
1262 switch(strlen(pBuf)) {
1263 case 0:
1264 return 0;
1265
1266 case 1:
1267 return (icUInt32Number)((((unsigned long)pBuf[0])<<24) +
1268 0x202020);
1269
1270 case 2:
1271 return (icUInt32Number)((((unsigned long)pBuf[0])<<24) +
1272 (((unsigned long)pBuf[1])<<16) +
1273 0x2020);
1274
1275 case 3:
1276 return (icUInt32Number)((((unsigned long)pBuf[0])<<24) +
1277 (((unsigned long)pBuf[1])<<16) +
1278 (((unsigned long)pBuf[2])<<8) +
1279 0x20);
1280
1281 case 4:
1282 default:
1283 return (icUInt32Number)((((unsigned long)pBuf[0])<<24) +
1284 (((unsigned long)pBuf[1])<<16) +
1285 (((unsigned long)pBuf[2])<<8) +
1286 (((unsigned long)pBuf[3])));
1287
1288 case 6: //Channel based color signatures
1289 sscanf(pBuf+2, "%x", &v);
1290
1291 return (icUInt32Number)((((unsigned long)pBuf[0])<<24) +
1292 (((unsigned long)pBuf[1])<<16) +
1293 v);
1294
1295 case 8:
1296 case 9:
1297 sscanf(pBuf, "%x", &v);
1298 return v;
1299 }
1300}

Referenced by CIccCfgProfileSequence::fromArgs(), CIccCfgColorData::fromLegacy(), CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icGetLastSigPathSig(), icGetSecondSigPathSig(), icXmlGetChildSigVal(), icXmlStrToSig(), jsonToColorSpace(), jsonToValue(), main(), main(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlUnknown::ParseXml(), CIccTagXmlSignature::ParseXml(), CIccTagXmlMultiLocalizedUnicode::ParseXml(), CIccTagXmlSpectralDataInfo::ParseXml(), CIccTagXmlProfileSequenceId::ParseXml(), CIccTagXmlDict::ParseXml(), CIccTagXmlStruct::ParseXml(), and CIccTagXmlArray::ParseXml().

+ Here is the caller graph for this function:

◆ icGetSpaceSamples()

icUInt32Number icGetSpaceSamples ( icColorSpaceSignature  sig)
1304{
1305 switch(sig) {
1306 case icSigGrayData:
1307 case icSigGamutData:
1308 return 1;
1309
1310 case icSig2colorData:
1311 return 2;
1312
1313 case icSigXYZData:
1314 case icSigLabData:
1315 case icSigLuvData:
1316 case icSigYCbCrData:
1317 case icSigYxyData:
1318 case icSigRgbData:
1319 case icSigHsvData:
1320 case icSigHlsData:
1321 case icSigCmyData:
1322 case icSig3colorData:
1323 case icSigDevLabData:
1324 case icSigDevXYZData:
1325 return 3;
1326
1327 case icSigCmykData:
1328 case icSig4colorData:
1329 return 4;
1330
1331 default:
1332 switch (icGetColorSpaceType(sig)) {
1333 case icSigNChannelData:
1340 return icNumColorSpaceChannels(sig);
1341
1342 default:
1343 {
1344 icChar szSig[5] = {0};
1345 szSig[0] = (icChar)(sig>>24);
1346 szSig[1] = (icChar)(sig>>16);
1347 szSig[2] = (icChar)(sig>>8);
1348 szSig[3] = (icChar)(sig);
1349 szSig[4] = '\0';
1350
1351 if (!strcmp(szSig+1, "CLR")) {
1352 int d0 = icHexDigit(szSig[0]);
1353 if (d0>=0)
1354 return d0;
1355 }
1356 else if (!strncmp(szSig, "MCH", 3)) { //Litte CMS multi-channel notation (not part of ICC specification)
1357 int d0 = icHexDigit(szSig[3]);
1358 if (d0>=0)
1359 return d0;
1360 }
1361 }
1362 return 0;
1363 }
1364 }
1365}
@ icSig2colorData
Definition icProfileHeader.h:859
@ icSigLuvData
Definition icProfileHeader.h:848
@ icSigXYZData
Definition icProfileHeader.h:846
@ icSigCmykData
Definition icProfileHeader.h:855
@ icSigRgbData
Definition icProfileHeader.h:851
@ icSigHlsData
Definition icProfileHeader.h:854
@ icSig4colorData
Definition icProfileHeader.h:861
@ icSigYCbCrData
Definition icProfileHeader.h:849
@ icSigCmyData
Definition icProfileHeader.h:856
@ icSigGrayData
Definition icProfileHeader.h:852
@ icSig3colorData
Definition icProfileHeader.h:860
@ icSigHsvData
Definition icProfileHeader.h:853
@ icSigYxyData
Definition icProfileHeader.h:850
#define icSigGamutData
Definition icProfileHeader.h:900
#define icSigDevXYZData
Definition IccDefs.h:92
#define icSigDevLabData
Definition IccDefs.h:91
static icInt32Number icHexDigit(icChar digit)
Definition IccUtil.cpp:251

References icHexDigit(), icSig2colorData, icSig3colorData, icSig4colorData, icSigBiSpectralReflectanceData, icSigCmyData, icSigCmykData, icSigGrayData, icSigHlsData, icSigHsvData, icSigLabData, icSigLuvData, icSigNChannelData, icSigRadiantSpectralData, icSigReflectanceSpectralData, icSigRgbData, icSigSparseMatrixReflectanceData, icSigSrcMCSChannelData, icSigTransmisionSpectralData, icSigXYZData, icSigYCbCrData, and icSigYxyData.

Referenced by CIccCfgColorData::addFields(), CCubeWriter::begin(), CDevLinkWriter::begin(), CIccApplyBPC::calcSrcBlackPoint(), CIccEvalCompare::EvaluateProfile(), CIccCfgColorData::fromLegacy(), CIccInfo::GetColorSpaceSigName(), icGetSpectralSpaceSamples(), IsValidBitmapType(), IsValidColorType(), main(), main(), main(), CIccArrayNamedColor::SetColorSpaces(), CIccCfgColorData::spaceName(), CIccMBB::Validate(), CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccTagNamedColor2::Validate(), CIccTagSparseMatrixArray::Validate(), CIccTagColorantOrder::Validate(), CIccTagColorantTable::Validate(), CIccTagResponseCurveSet16::Validate(), and CIccTagMultiProcessElement::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icGetSpectralSpaceSamples()

icUInt32Number icGetSpectralSpaceSamples ( const icHeader pHdr)
1368{
1369 if (pHdr->spectralPCS)
1371 else
1372 return icGetSpaceSamples(pHdr->pcs);
1373}
icSpectralColorSignature spectralPCS
Definition icProfileHeader.h:2062
icColorSpaceSignature pcs
Definition icProfileHeader.h:2049
icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303

References icGetSpaceSamples(), icHeader::pcs, and icHeader::spectralPCS.

Referenced by CIccTagMultiProcessElement::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icGetStorageTypeBytes()

icUInt8Number icGetStorageTypeBytes ( icUInt16Number  nStorageType)
1376{
1377 switch (nStorageType) {
1378 case icValueTypeUInt8:
1379 return 1;
1380 case icValueTypeUInt16:
1381 case icValueTypeFloat16:
1382 return 2;
1383 case icValueTypeFloat32:
1384 return 4;
1385 default:
1386 return 0;
1387 }
1388}
@ icValueTypeFloat16
Definition icProfileHeader.h:1087
@ icValueTypeUInt8
Definition icProfileHeader.h:1089
@ icValueTypeUInt16
Definition icProfileHeader.h:1088
@ icValueTypeFloat32
Definition icProfileHeader.h:1086

References icValueTypeFloat16, icValueTypeFloat32, icValueTypeUInt16, and icValueTypeUInt8.

Referenced by CIccMpeExtCLUT::Read(), and CIccMpeSpectralCLUT::Read().

+ Here is the caller graph for this function:

◆ icHexDigit()

static icInt32Number icHexDigit ( icChar  digit)
static
252{
253 if (digit>='0' && digit<='9')
254 return digit-'0';
255 if (digit>='A' && digit<='F')
256 return digit-'A'+10;
257/* if (digit>='a' && digit<='f')
258 return digit-'a'+10;*/
259 return -1;
260}

Referenced by icGetSpaceSamples(), and icIsSpaceCLR().

+ Here is the caller graph for this function:

◆ icICubeth()

icFloatNumber icICubeth ( icFloatNumber  v)
816{
817 if (v > 0.20689303448275862068965517241379)
818 return v*v*v;
819 else
820#ifndef SAMPLEICC_NOCLIPLABTOXYZ
821 if (v>16.0/116.0)
822#endif
823 return (icFloatNumber)((v - 16.0 / 116.0) / 7.787037037037037037037037037037);
824#ifndef SAMPLEICC_NOCLIPLABTOXYZ
825 else
826 return 0.0;
827#endif
828}

Referenced by CIccOpDefFromLab::Exec(), and icLabtoXYZ().

+ Here is the caller graph for this function:

◆ icIntMax()

icUInt32Number icIntMax ( icUInt32Number  v1,
icUInt32Number  v2 
)
914{
915 return( v1 > v2 ? v1 : v2 );
916}

Referenced by CIccCalculatorFunc::CheckUnderflowOverflow(), main(), and main().

+ Here is the caller graph for this function:

◆ icIntMin()

icUInt32Number icIntMin ( icUInt32Number  v1,
icUInt32Number  v2 
)
909{
910 return( v1 < v2 ? v1 : v2 );
911}

Referenced by CIccCalculatorFunc::CheckUnderflowOverflow(), CIccCalculatorFunc::DescribeSequence(), CIccMpeXmlCalculator::ParseXml(), CIccCalculatorFunc::SequenceNeedTempReset(), and CIccToneMapFunc::SetFunction().

+ Here is the caller graph for this function:

◆ icIsIllumD50()

bool icIsIllumD50 ( icXYZNumber  xyz)
364{
365 return icIsS15Fixed16NumberNear(xyz.X, 0.9642f) &&
366 icIsS15Fixed16NumberNear(xyz.Y, 1.0000f) &&
367 icIsS15Fixed16NumberNear(xyz.Z, 0.8249f);
368}
icS15Fixed16Number Y
Definition icProfileHeader.h:1430
icS15Fixed16Number Z
Definition icProfileHeader.h:1431
icS15Fixed16Number X
Definition icProfileHeader.h:1429
static bool icIsS15Fixed16NumberNear(icS15Fixed16Number F, icFloatNumber D)
Definition IccUtil.cpp:356

References icIsS15Fixed16NumberNear(), icXYZNumber::X, icXYZNumber::Y, and icXYZNumber::Z.

+ Here is the call graph for this function:

◆ icIsNear()

bool icIsNear ( icFloatNumber  v1,
icFloatNumber  v2,
icFloatNumber  nearRange 
)

Name: icIsNear

Purpose: Checks if two numbers are close to each other in value

Args: v1 - first value v2 - second value range -

Return: true if v1 is near v2 within range

143{
144 return fabs(v1 - v2) <= nearRange;
145}

Referenced by CIccFormulaCurveSegment::Begin(), CCubeWriter::begin(), CDevLinkWriter::begin(), CIccFormulaCurveSegment::Describe(), CubeFile::isCustomInputRange(), and CIccTagSpectralViewingConditions::setIlluminant().

+ Here is the caller graph for this function:

◆ icIsS15Fixed16NumberNear()

static bool icIsS15Fixed16NumberNear ( icS15Fixed16Number  F,
icFloatNumber  D 
)
static
357{
359
360 return (icUInt32Number)(F*10000.0f + 0.5) == (icUInt32Number)(D*10000.0f + 0.5);
361}
icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
#define F(x, y, z)
Definition IccMD5.cpp:64

References icFtoD().

Referenced by icIsIllumD50().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icIsSpaceCLR()

bool icIsSpaceCLR ( icColorSpaceSignature  sig)
263{
264 icChar szSig[5] = {0};
265 szSig[0] = (icChar)(sig>>24);
266 szSig[1] = (icChar)(sig>>16);
267 szSig[2] = (icChar)(sig>>8);
268 szSig[3] = (icChar)(sig);
269 szSig[4] = '\0';
270
271 int d0 = icHexDigit(szSig[0]);
272
273 if (szSig[0]=='n' && szSig[1]=='c')
274 return true;
275 else if (!strcmp(szSig+1, "CLR")) {
276 icInt32Number d0 = icHexDigit(szSig[0]);
277 if (d0>=1)
278 return true;
279 }
280 else if (!strcmp(szSig+2, "CL")) {
281 icInt32Number d0 = icHexDigit(szSig[0]);
282 icInt32Number d1 = icHexDigit(szSig[1]);
283
284 if (d0>=0 && d1>=0) {
285 icInt32Number n = (d0<<4) + d1;
286
287 if (n>0xf)
288 return true;
289 }
290 }
291
292 return false;
293}

References icHexDigit().

Referenced by CDevLinkWriter::begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icLab2Lch()

void icLab2Lch ( icFloatNumber Lch,
icFloatNumber Lab 
)
882{
883 if (!Lab) {
884 Lab = Lch;
885 }
886 else
887 Lch[0] = Lab[0];
888
889 icFloatNumber c = (icFloatNumber)sqrt((double)Lab[1]*Lab[1] + (double)Lab[2]*Lab[2]);
890 icFloatNumber h = (icFloatNumber)(atan2(Lab[2], Lab[1]) * 180.0 / PI);
891 while (h<0.0)
892 h+=360.0;
893
894 Lch[1] = c;
895 Lch[2] = h;
896}
#define PI
Definition IccUtil.cpp:84

Referenced by CIccPRMG::InGamut().

+ Here is the caller graph for this function:

◆ icLabFromPcs()

void icLabFromPcs ( icFloatNumber Lab)

Here are some conversion routines to convert to regular Lab encoding.

Floating point encoding of Lab in PCS is in range 0.0 to 1.0

920{
921 Lab[0] *= 100.0;
922 Lab[1] = (icFloatNumber)(Lab[1]*255.0 - 128.0);
923 Lab[2] = (icFloatNumber)(Lab[2]*255.0 - 128.0);
924}

Referenced by CIccTagColorantTable::Describe(), CIccPRMG::EvaluateProfile(), CIccEvalCompare::EvaluateProfile(), CIccTagNamedColor2::FindCachedPCSColor(), CIccTagNamedColor2::InitFindCachedPCSColor(), main(), CIccApplyBPC::pcs2lab(), CIccTagXmlNamedColor2::ToXml(), and CIccTagXmlColorantTable::ToXml().

+ Here is the caller graph for this function:

◆ icLabToPcs()

void icLabToPcs ( icFloatNumber Lab)
928{
929 Lab[0] /= 100.0;
930 Lab[1] = (icFloatNumber)((Lab[1] + 128.0) / 255.0);
931 Lab[2] = (icFloatNumber)((Lab[2] + 128.0) / 255.0);
932}

Referenced by CIccApplyBPC::lab2pcs(), main(), CIccTagXmlNamedColor2::ParseXml(), and CIccTagXmlColorantTable::ParseXml().

+ Here is the caller graph for this function:

◆ icLabtoXYZ()

void icLabtoXYZ ( icFloatNumber XYZ,
const icFloatNumber Lab,
const icFloatNumber WhiteXYZ 
)
831{
832 if (!Lab)
833 Lab = XYZ;
834
835 if (!WhiteXYZ)
836 WhiteXYZ = icD50XYZ;
837
838 icFloatNumber fy = (icFloatNumber)((Lab[0] + 16.0) / 116.0);
839
840 XYZ[0] = icICubeth((icFloatNumber)(Lab[1]/500.0 + fy)) * WhiteXYZ[0];
841 XYZ[1] = icICubeth(fy) * WhiteXYZ[1];
842 XYZ[2] = icICubeth((icFloatNumber)(fy - Lab[2]/200.0)) * WhiteXYZ[2];
843
844}
icFloatNumber icICubeth(icFloatNumber v)
Definition IccUtil.cpp:815

References icD50XYZ, and icICubeth().

Referenced by CIccApplyBPC::calcDstBlackPoint(), CIccApplyBPC::calcSrcBlackPoint(), CIccApplyBPC::lab2pcs(), and main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icLch2Lab()

void icLch2Lab ( icFloatNumber Lab,
icFloatNumber Lch 
)
867{
868 if (!Lch) {
869 Lch = Lab;
870 }
871 else
872 Lab[0] = Lch[0];
873
874 icFloatNumber a = (icFloatNumber)(Lch[1] * cos(Lch[2] * PI / 180.0));
875 icFloatNumber b = (icFloatNumber)(Lch[1] * sin(Lch[2] * PI / 180.0));
876
877 Lab[1] = a;
878 Lab[2] = b;
879}

◆ icMatrixDump()

void icMatrixDump ( std::string &  sDump,
icS15Fixed16Number pMatrix 
)
989{
990 icChar buf[128];
991
992 sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
993 sDump += buf;
994 sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
995 sDump += buf;
996 sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
997 sDump += buf;
998}

References icFtoD().

Referenced by CIccTagFixedNum< T, Tsig >::Describe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icMatrixInvert3x3()

bool icMatrixInvert3x3 ( icFloatNumber M)

Name: icMatrixInvert3x3

Purpose: Inversion of a 3x3 matrix using the Adjoint Cofactor and the determinant of the 3x3 matrix.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Args: M = matrix to invert.

Return: true = matrix is invertible and stored back into M, false = matrix is not invertible.

392{
393 const icFloatNumber epsilon = 1e-8f;
394
395 icFloatNumber m48 = M[4]*M[8];
396 icFloatNumber m75 = M[7]*M[5];
397 icFloatNumber m38 = M[3]*M[8];
398 icFloatNumber m65 = M[6]*M[5];
399 icFloatNumber m37 = M[3]*M[7];
400 icFloatNumber m64 = M[6]*M[4];
401
402 icFloatNumber det = M[0]*(m48 - m75) -
403 M[1]*(m38 - m65) +
404 M[2]*(m37 - m64);
405
406 if (det>-epsilon && det<epsilon)
407 return false;
408
409 icFloatNumber Co[9] = {0};
410
411 Co[0] = +(m48 - m75);
412 Co[1] = -(m38 - m65);
413 Co[2] = +(m37 - m64);
414
415 Co[3] = -(M[1]*M[8] - M[7]*M[2]);
416 Co[4] = +(M[0]*M[8] - M[6]*M[2]);
417 Co[5] = -(M[0]*M[7] - M[6]*M[1]);
418
419 Co[6] = +(M[1]*M[5] - M[4]*M[2]);
420 Co[7] = -(M[0]*M[5] - M[3]*M[2]);
421 Co[8] = +(M[0]*M[4] - M[3]*M[1]);
422
423 M[0] = Co[0] / det;
424 M[1] = Co[3] / det;
425 M[2] = Co[6] / det;
426
427 M[3] = Co[1] / det;
428 M[4] = Co[4] / det;
429 M[5] = Co[7] / det;
430
431 M[6] = Co[2] / det;
432 M[7] = Co[5] / det;
433 M[8] = Co[8] / det;
434
435 return true;
436}

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccMatrixMath::Invert(), CIccSimpleMatrixInverter::Invert(), and CIccSimpleMatrixSolver::Solve().

+ Here is the caller graph for this function:

◆ icMatrixMultiply3x3()

void icMatrixMultiply3x3 ( icFloatNumber result,
const icFloatNumber l,
const icFloatNumber r 
)

Name: icMatrixMultiply3x3

Purpose: Multiply two 3x3 matricies resulting in a 3x3 matrix.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Args: result = matrix to recieve result. l = left matrix to multiply (matrix multiplication is order dependent) r = right matrix to multiply (matrix multiplicaiton is order dependent)

460{
461 const unsigned int e11 = 0;
462 const unsigned int e12 = 1;
463 const unsigned int e13 = 2;
464 const unsigned int e21 = 3;
465 const unsigned int e22 = 4;
466 const unsigned int e23 = 5;
467 const unsigned int e31 = 6;
468 const unsigned int e32 = 7;
469 const unsigned int e33 = 8;
470 result[e11] = l[e11] * r[e11] + l[e12] * r[e21] + l[e13] * r[e31];
471 result[e12] = l[e11] * r[e12] + l[e12] * r[e22] + l[e13] * r[e32];
472 result[e13] = l[e11] * r[e13] + l[e12] * r[e23] + l[e13] * r[e33];
473 result[e21] = l[e21] * r[e11] + l[e22] * r[e21] + l[e23] * r[e31];
474 result[e22] = l[e21] * r[e12] + l[e22] * r[e22] + l[e23] * r[e32];
475 result[e23] = l[e21] * r[e13] + l[e22] * r[e23] + l[e23] * r[e33];
476 result[e31] = l[e31] * r[e11] + l[e32] * r[e21] + l[e33] * r[e31];
477 result[e32] = l[e31] * r[e12] + l[e32] * r[e22] + l[e33] * r[e32];
478 result[e33] = l[e31] * r[e13] + l[e32] * r[e23] + l[e33] * r[e33];
479}

◆ icMax()

icFloatNumber icMax ( icFloatNumber  v1,
icFloatNumber  v2 
)
904{
905 return( v1 > v2 ? v1 : v2 );
906}

Referenced by CIccFormulaCurveSegment::Apply(), CIccOpDefMaximum::Exec(), and CIccOpDefVectorMaximum::Exec().

+ Here is the caller graph for this function:

◆ icMaxStatus()

icValidateStatus icMaxStatus ( icValidateStatus  s1,
icValidateStatus  s2 
)

Name: icMaxStatus

Purpose: return worst status

Args: s1, s2

Return:

245{
246 if (s1>s2)
247 return s1;
248 return s2;
249}

Referenced by CIccInfo::CheckData(), CIccInfo::CheckData(), CIccInfo::CheckData(), CIccInfo::CheckData(), main(), CIccToneMapFunc::Validate(), CIccResponseCurveStruct::Validate(), CIccStructNamedColor::Validate(), CIccTagGamutBoundaryDesc::Validate(), CIccMBB::Validate(), CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccArrayUnknown::Validate(), CIccArrayColorantInfo::Validate(), CIccArrayNamedColor::Validate(), CIccStructUnknown::Validate(), CIccStructBRDF::Validate(), CIccStructColorantInfo::Validate(), CIccTagText::Validate(), CIccTagUtf8Text::Validate(), CIccTagZipUtf8Text::Validate(), CIccTagUtf16Text::Validate(), CIccTagTextDescription::Validate(), CIccTagSignature::Validate(), CIccTagNamedColor2::Validate(), CIccTagXYZ::Validate(), CIccTagChromaticity::Validate(), CIccTagCicp::Validate(), CIccTagSparseMatrixArray::Validate(), CIccTagNum< T, Tsig >::Validate(), CIccTagFloatNum< T, Tsig >::Validate(), CIccTagMeasurement::Validate(), CIccTagMultiLocalizedUnicode::Validate(), CIccTagData::Validate(), CIccTagDateTime::Validate(), CIccTagColorantOrder::Validate(), CIccTagColorantTable::Validate(), CIccTagViewingConditions::Validate(), CIccTagProfileSeqDesc::Validate(), CIccTagResponseCurveSet16::Validate(), CIccTagSpectralDataInfo::Validate(), CIccTagSpectralViewingConditions::Validate(), CIccTagEmbeddedHeightImage::Validate(), CIccTagEmbeddedNormalImage::Validate(), CIccTagStruct::Validate(), CIccTagArray::Validate(), CIccTagDict::Validate(), CIccTagEmbeddedProfile::Validate(), CIccTagCurve::Validate(), CIccTagParametricCurve::Validate(), CIccCLUT::Validate(), CIccTagMultiProcessElement::Validate(), CIccTagProfileSequenceId::Validate(), CIccFormulaCurveSegment::Validate(), CIccSampledCurveSegment::Validate(), CIccSegmentedCurve::Validate(), CIccSingleSampledCurve::Validate(), CIccSampledCalculatorCurve::Validate(), CIccMpeCurveSet::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), CIccMpeCalculator::Validate(), CIccMpeSpectralMatrix::Validate(), CIccMpeInvEmissionMatrix::Validate(), CIccMpeSpectralCLUT::Validate(), CIccMpeSpectralObserver::Validate(), ValidateIccProfile(), and ValidateIccProfile().

◆ icMemDump()

void icMemDump ( std::string &  sDump,
void *  pBuf,
icUInt32Number  nNum 
)
952{
953 icUInt8Number *pData = (icUInt8Number *)pBuf;
954 icChar buf[80] = {0};
955 icChar num[10] = {0};
956
957 icInt32Number i, j;
959
961 sDump.reserve(sDump.size() + lines*79);
962
963 for (i=0; i<(icInt32Number)nNum; i++, pData++) {
965 if (!j) {
966 if (i) {
967 sDump += (const icChar*)buf;
968 }
969 memset(buf, ' ', 76);
970 buf[76] = ' ';
971 buf[77] = '\n';
972 buf[78] = '\0';
973 sprintf(num, "%08X:", i);
974 strncpy(buf, num, 9);
975 }
976
977 sprintf(num, "%02X", *pData);
978 strncpy(buf+10+j*3, num, 2);
979
980 c=*pData;
981 if (!isprint(c))
982 c='.';
983 buf[10+16*3 + 1 + j] = c;
984 }
985 sDump += buf;
986}
#define DUMPBYTESPERLINE
Definition IccUtil.cpp:949

Referenced by MyTagDialog::MyTagDialog(), CIccMpeAcs::Describe(), CIccTagUnknown::Describe(), CIccTagZipUtf8Text::Describe(), CIccTagData::Describe(), and CIccMpeUnknown::Describe().

+ Here is the caller graph for this function:

◆ icMin()

icFloatNumber icMin ( icFloatNumber  v1,
icFloatNumber  v2 
)
899{
900 return( v1 < v2 ? v1 : v2 );
901}

Referenced by CIccEvalCompare::EvaluateProfile(), CIccOpDefMinimum::Exec(), and CIccOpDefVectorMinimum::Exec().

+ Here is the caller graph for this function:

◆ icNormXyz()

void icNormXyz ( icFloatNumber XYZ,
icFloatNumber WhiteXYZ 
)
786{
787 if (!WhiteXYZ)
788 WhiteXYZ = icD50XYZ;
789
790 XYZ[0] = XYZ[0] / WhiteXYZ[0];
791 XYZ[1] = XYZ[1] / WhiteXYZ[1];
792 XYZ[2] = XYZ[2] / WhiteXYZ[2];
793}

References icD50XYZ.

◆ icRealloc()

void * icRealloc ( void *  ptr,
size_t  size 
)

Name: icRealloc

Purpose: realloc memory allocated by malloc or calloc freeing old memory on failure.

Args: ptr - memory block to realloc size - new size of memory block

Return: pointer to reallocated memory block or NULL on failure. Old memory is released on error.

112{
113 void *nptr;
114
115 if (ptr)
116 nptr = realloc(ptr, size);
117 else
118 nptr = malloc(size);
119
120 if (!nptr && ptr)
121 free(ptr);
122
123 return nptr;
124}

Referenced by CIccTagZipUtf8Text::AllocBuffer(), CIccUTF16String::FromUtf8(), CIccTagText::GetBuffer(), CIccTagUtf8Text::GetBuffer(), CIccTagUtf16Text::GetBuffer(), CIccTagTextDescription::GetBuffer(), CIccTagTextDescription::GetUnicodeBuffer(), CIccUTF16String::operator=(), CIccUTF16String::operator=(), CIccTagDict::Read(), CIccTagText::Release(), CIccTagUtf8Text::Release(), CIccTagUtf16Text::Release(), CIccTagTextDescription::Release(), CIccTagTextDescription::ReleaseUnicode(), CIccTagSparseMatrixArray::Reset(), CIccUTF16String::Resize(), CIccMpeCalculator::SetElem(), CIccTagChromaticity::SetSize(), CIccTagColorantOrder::SetSize(), CIccTagColorantTable::SetSize(), CIccTagArray::SetSize(), CIccTagXYZ::SetSize(), CIccTagData::SetSize(), CIccTagEmbeddedHeightImage::SetSize(), CIccTagEmbeddedNormalImage::SetSize(), CIccTagCurve::SetSize(), and CIccLocalizedUnicode::SetSize().

+ Here is the caller graph for this function:

◆ icRmsDif()

icFloatNumber icRmsDif ( const icFloatNumber v1,
const icFloatNumber v2,
icUInt32Number  nSample 
)
533{
534 icFloatNumber sum=0;
536 for (i=0; i<nSample; i++) {
537 sum += icSq(v1[i] - v2[i]);
538 }
539 if (nSample)
540 sum /= nSample;
541
542 return (icFloatNumber)sqrt(sum);
543}

References icSq().

Referenced by CIccArrayNamedColor::FindSpectralColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icRoundOffset()

double icRoundOffset ( double  v)

Name: icRoundOffset

Purpose: Adds offset to floating point value for purposes of rounding by casting to and integer based value

Args: v - value to offset

Return: v with offset added - suitable for casting to some form of integer

224{
225 if (v < 0.0)
226 return v - 0.5;
227 else
228 return v + 0.5;
229}

Referenced by icDtoF(), icDtoUCF(), icDtoUF(), icDtoUSF(), icFtoU16(), and icFtoU8().

+ Here is the caller graph for this function:

◆ icSameSpectralRange()

bool icSameSpectralRange ( const icSpectralRange rng1,
const icSpectralRange rng2 
)
1400{
1401 return (rng1.start == rng2.start &&
1402 rng1.end == rng2.end &&
1403 rng1.steps == rng2.steps);
1404}
icUInt16Number steps
Definition icProfileHeader.h:1469
icFloat16Number start
Definition icProfileHeader.h:1467
icFloat16Number end
Definition icProfileHeader.h:1468

References icSpectralRange::end, icSpectralRange::start, and icSpectralRange::steps.

◆ icSq()

static icFloatNumber icSq ( icFloatNumber  x)
inlinestatic
522{
523 return x*x;
524}

Referenced by icDeltaE(), and icRmsDif().

+ Here is the caller graph for this function:

◆ icU16toF()

icFloatNumber icU16toF ( icUInt16Number  num)
760{
761 icFloatNumber rv = (icFloatNumber)((icFloatNumber)num / 65535.0);
762
763 return rv;
764}

Referenced by CIccTagColorantTable::Describe(), CIccTagNum< T, Tsig >::GetValues(), CIccTagNum< T, Tsig >::Interpolate(), CIccTagXmlColorantTable::ToXml(), and CIccTagNum< T, Tsig >::ValuePos().

+ Here is the caller graph for this function:

◆ icU8toAB()

icFloatNumber icU8toAB ( icUInt8Number  num)
778{
779 return (icFloatNumber)num - 128.0f;
780}

◆ icU8toF()

icFloatNumber icU8toF ( icUInt8Number  num)
739{
740 icFloatNumber rv = (icFloatNumber)((icFloatNumber)num / 255.0);
741
742 return rv;
743}

Referenced by CIccTagNum< T, Tsig >::GetValues(), CIccTagNum< T, Tsig >::Interpolate(), and CIccTagNum< T, Tsig >::ValuePos().

+ Here is the caller graph for this function:

◆ icUCFtoD()

icFloatNumber icUCFtoD ( icU8Fixed8Number  num)
623{
624 icFloatNumber rv = (icFloatNumber)((icFloatNumber)num / 256.0);
625
626 return rv;
627}

◆ icUFtoD()

581{
582 icFloatNumber rv = (icFloatNumber)((double)num / 65536.0);
583
584 return rv;
585}

Referenced by CIccTagChromaticity::Describe(), and CIccTagXmlChromaticity::ToXml().

+ Here is the caller graph for this function:

◆ icUSFtoD()

icFloatNumber icUSFtoD ( icU1Fixed15Number  num)
602{
603 icFloatNumber rv = (icFloatNumber)((icFloatNumber)num / 32768.0);
604
605 return rv;
606}

Referenced by CIccTagColorantTable::Describe().

+ Here is the caller graph for this function:

◆ icValidOverlap()

bool icValidOverlap ( const icPositionNumber pos1,
const icPositionNumber pos2,
bool  bAllowSame 
)

Name: icValidOverlap

Purpose: Checks if pos overlap is acceptable

Args: pos1 - first positionNumber pos2 - second positionNumber bAllowSame - allow to positions to cover the same area

Return: true if v1 is near v2 within range

196{
197 if ((icUInt64Number)pos1.offset + pos1.size <= (icUInt64Number)pos2.offset ||
198 (icUInt64Number)pos1.offset >= (icUInt64Number)pos2.offset + pos2.size)
199 return true;
200
201 if (bAllowSame && pos1.offset == pos2.offset || pos1.size == pos2.size)
202 return true;
203
204 return false;
205}
icUInt32Number offset
Definition icProfileHeader.h:1461
icUInt32Number icUInt64Number[2]
Definition icProfileHeader.h:268
icUInt32Number size
Definition icProfileHeader.h:1462

References icPositionNumber::offset, and icPositionNumber::size.

Referenced by CIccMpeToneMap::Read().

+ Here is the caller graph for this function:

◆ icValidTagPos()

bool icValidTagPos ( const icPositionNumber pos,
icUInt32Number  nTagHeaderSize,
icUInt32Number  nTagSize,
bool  bAllowEmpty 
)

Name: icValidTagPos

Purpose: Checks if pos is valid for data within a tag

Args: pos - first value nTagHeaderSize - size of tag header nTagSize - total size of tag data

Return: true pos is valid

164{
165 if (bAllowEmpty && !pos.size || !pos.offset)
166 return true;
167
168 if (pos.offset < nTagHeaderSize)
169 return false;
170 if ((icUInt64Number)pos.offset + pos.size > (icUInt64Number)nTagSize)
171 return false;
172
173 if (!pos.size && !bAllowEmpty)
174 return false;
175
176 return true;
177}

References icPositionNumber::offset, and icPositionNumber::size.

Referenced by CIccMpeToneMap::Read().

+ Here is the caller graph for this function:

◆ icVectorApplyMatrix3x3()

void icVectorApplyMatrix3x3 ( icFloatNumber result,
const icFloatNumber m,
const icFloatNumber v 
)

Name: icVectorApplyMatrix3x3

Purpose: Applies a 3x3 matrix to a 3 element column vector.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Note: result = m x v

Args: result = vector to receive result. m = matrix to multiply v = vector to apply matrix to

505{
506 const unsigned int e11 = 0;
507 const unsigned int e12 = 1;
508 const unsigned int e13 = 2;
509 const unsigned int e21 = 3;
510 const unsigned int e22 = 4;
511 const unsigned int e23 = 5;
512 const unsigned int e31 = 6;
513 const unsigned int e32 = 7;
514 const unsigned int e33 = 8;
515 result[0] = m[e11] * v[0] + m[e12] * v[1] + m[e13] * v[2];
516 result[1] = m[e21] * v[0] + m[e22] * v[1] + m[e23] * v[2];
517 result[2] = m[e31] * v[0] + m[e32] * v[1] + m[e33] * v[2];
518}

Referenced by CIccSimpleMatrixSolver::Solve().

+ Here is the caller graph for this function:

◆ icXyzFromPcs()

void icXyzFromPcs ( icFloatNumber XYZ)

Here are some conversion routines to convert to regular XYZ encoding.

Floating point encoding of XYZ in PCS is in range 0.0 to 1.0 (Note: X=1.0 is encoded as about 0.5)

935{
936 XYZ[0] = (icFloatNumber)(XYZ[0] * 65535.0 / 32768.0);
937 XYZ[1] = (icFloatNumber)(XYZ[1] * 65535.0 / 32768.0);
938 XYZ[2] = (icFloatNumber)(XYZ[2] * 65535.0 / 32768.0);
939}

Referenced by CIccTagNamedColor2::FindCachedPCSColor(), CIccTagNamedColor2::InitFindCachedPCSColor(), main(), CIccApplyBPC::pcs2lab(), and CIccTagXmlNamedColor2::ToXml().

+ Here is the caller graph for this function:

◆ icXYZtoLab()

void icXYZtoLab ( icFloatNumber Lab,
const icFloatNumber XYZ,
const icFloatNumber WhiteXYZ 
)
847{
848 icFloatNumber Xn, Yn, Zn;
849
850 if (!XYZ)
851 XYZ = Lab;
852
853 if (!WhiteXYZ)
854 WhiteXYZ = icD50XYZ;
855
856 Xn = icCubeth(XYZ[0] / WhiteXYZ[0]);
857 Yn = icCubeth(XYZ[1] / WhiteXYZ[1]);
858 Zn = icCubeth(XYZ[2] / WhiteXYZ[2]);
859
860 Lab[0] = (icFloatNumber)(116.0 * Yn - 16.0);
861 Lab[1] = (icFloatNumber)(500.0 * (Xn - Yn));
862 Lab[2] = (icFloatNumber)(200.0 * (Yn - Zn));
863
864}
icFloatNumber icCubeth(icFloatNumber v)
Definition IccUtil.cpp:805

References icCubeth(), and icD50XYZ.

Referenced by CIccMpeSpectralObserver::Apply(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccApplyBPC::calcDstBlackPoint(), CIccTagNamedColor2::FindCachedPCSColor(), CIccArrayNamedColor::FindPcsColor(), CIccTagNamedColor2::InitFindCachedPCSColor(), main(), and CIccApplyBPC::pcs2lab().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icXyzToPcs()

void icXyzToPcs ( icFloatNumber XYZ)
942{
943 XYZ[0] = (icFloatNumber)(XYZ[0] * 32768.0 / 65535.0);
944 XYZ[1] = (icFloatNumber)(XYZ[1] * 32768.0 / 65535.0);
945 XYZ[2] = (icFloatNumber)(XYZ[2] * 32768.0 / 65535.0);
946}

Referenced by CIccApplyBPC::CalcFactors(), CIccApplyBPC::lab2pcs(), main(), and CIccTagXmlNamedColor2::ParseXml().

+ Here is the caller graph for this function:

Variable Documentation

◆ icD50XYZ

◆ icD50XYZxx

ICCPROFLIB_API icFloatNumber icD50XYZxx[3] = { 96.42f, 100.00f, 82.49f }
783{ 96.42f, 100.00f, 82.49f };

◆ icMsgValidateCriticalError

◆ icMsgValidateInformation

ICCPROFLIB_API const char* icMsgValidateInformation = "Information - "

◆ icMsgValidateNonCompliant

◆ icMsgValidateWarning