IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccTagXmlColorantTable Class Reference

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlColorantTable:
+ Collaboration diagram for CIccTagXmlColorantTable:

Public Member Functions

virtual ~CIccTagXmlColorantTable ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const char * GetClassName () const
 
icColorantTableEntryGetEntry (icUInt32Number index)
 
virtual const char * GetExtClassName () const
 
virtual const char * GetExtDerivedClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
icColorSpaceSignature GetPCS () const
 
icUInt32Number GetSize () const
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
virtual CIccTagNewCopy () const
 
icColorantTableEntryoperator[] (icUInt32Number index)
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
void SetPCS (icColorSpaceSignature sig)
 
bool SetSize (icUInt16Number nSize, bool bZeroNew=true)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

icUInt32Number m_nCount
 
icColorSpaceSignature m_PCS
 
icColorantTableEntrym_pData
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CIccTagXmlColorantTable()

virtual CIccTagXmlColorantTable::~CIccTagXmlColorantTable ( )
inlinevirtual
412{}

Member Function Documentation

◆ Create()

CIccTag * CIccTag::Create ( icTagTypeSignature  sig)
staticinherited

Name: CIccTag::Create

Purpose: This is a static tag creator based upon tag signature type

Args: sig = tag type signature

Return: Pointer to Allocated tag

144{
145 return CIccTagCreator::CreateTag(sig);
146}
static CIccTag * CreateTag(icTagTypeSignature tagTypeSig)
Definition IccTagFactory.h:279

References CIccTagCreator::CreateTag().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccTagStruct::LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().

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

◆ Describe()

void CIccTagColorantTable::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccTagColorantTable::Describe

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

8802{
8803 icChar buf[128];
8804
8805 icUInt32Number i, nLen, nMaxLen=0;
8806 icFloatNumber Lab[3] = {0};
8807
8808 sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
8809 sDescription += buf;
8810
8811 for (i=0; i<m_nCount; i++) {
8812 nLen = (icUInt32Number)strlen(m_pData[i].name);
8813 if (nLen>nMaxLen)
8814 nMaxLen =nLen;
8815 }
8816 sDescription += "# NAME ";
8817
8818 if (m_PCS == icSigXYZData) {
8819 sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
8820 sDescription += buf;
8821 }
8822 else {
8823 sprintf(buf, "Lab_L Lab_a Lab_b\n");
8824 sDescription += buf;
8825 }
8826 for (i=0; i<m_nCount; i++) {
8827 sprintf(buf, "%2u \"%s\"", i, m_pData[i].name);
8828 sDescription += buf;
8829 memset(buf, ' ', 128);
8830 buf[nMaxLen + 1 - strlen(m_pData[i].name)] ='\0';
8831 sDescription += buf;
8832
8833 if (m_PCS == icSigXYZData) {
8834 sprintf(buf, "%7.4lf %7.4lf %7.4lf\n", icUSFtoD(m_pData[i].data[0]), icUSFtoD(m_pData[i].data[1]), icUSFtoD(m_pData[i].data[2]));
8835 sDescription += buf;
8836 }
8837 else {
8838 Lab[0] = icU16toF(m_pData[i].data[0]);
8839 Lab[1] = icU16toF(m_pData[i].data[1]);
8840 Lab[2] = icU16toF(m_pData[i].data[2]);
8841 icLabFromPcs(Lab);
8842 sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
8843 sDescription += buf;
8844 }
8845 }
8846
8847}
@ icSigXYZData
Definition icProfileHeader.h:846
unsigned long icUInt32Number
Definition icProfileHeader.h:262
float icFloatNumber
Definition IccDefs.h:101
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API icFloatNumber icU16toF(icUInt16Number num)
Definition IccUtil.cpp:759
ICCPROFLIB_API void icLabFromPcs(icFloatNumber *Lab)
Here are some conversion routines to convert to regular Lab encoding.
Definition IccUtil.cpp:919
ICCPROFLIB_API icFloatNumber icUSFtoD(icU1Fixed15Number num)
Definition IccUtil.cpp:601
icColorantTableEntry * m_pData
Definition IccTagBasic.h:1414
icUInt32Number m_nCount
Definition IccTagBasic.h:1413
icColorSpaceSignature m_PCS
Definition IccTagBasic.h:1415

References icColorantTableEntry::data, icLabFromPcs(), icSigXYZData, icU16toF(), icUSFtoD(), CIccTagColorantTable::m_nCount, CIccTagColorantTable::m_PCS, CIccTagColorantTable::m_pData, and icColorantTableEntry::name.

+ Here is the call graph for this function:

◆ DetachIO()

virtual void CIccTag::DetachIO ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

183{}

◆ GetClassName()

virtual const char * CIccTagXmlColorantTable::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTagColorantTable.

414{return "CIccTagXmlColorantTable"; }

◆ GetEntry()

icColorantTableEntry * CIccTagColorantTable::GetEntry ( icUInt32Number  index)
inlineinherited
1404{return &m_pData[index];}

References CIccTagColorantTable::m_pData.

◆ GetExtClassName()

virtual const char * CIccTagXml::GetExtClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

79{ return "CIccTagXml"; }

Referenced by icProfDescToXml(), and icXmlParseProfDesc().

+ Here is the caller graph for this function:

◆ GetExtDerivedClassName()

virtual const char * CIccTagXml::GetExtDerivedClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

Reimplemented in CIccCurveXml.

80{ return ""; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlColorantTable::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

416{return this; }

◆ GetPCS()

icColorSpaceSignature CIccTagColorantTable::GetPCS ( ) const
inlineinherited
1409{return m_PCS;};

References CIccTagColorantTable::m_PCS.

◆ GetSize()

icUInt32Number CIccTagColorantTable::GetSize ( ) const
inlineinherited
1405{ return m_nCount; }

References CIccTagColorantTable::m_nCount.

◆ GetTagArrayType()

virtual icArraySignature CIccTag::GetTagArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagArray.

133{ return icSigUndefinedArray; }
@ icSigUndefinedArray
Definition icProfileHeader.h:617

References icSigUndefinedArray.

Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ GetTagStructType()

virtual icStructSignature CIccTag::GetTagStructType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagStruct.

132{ return icSigUndefinedStruct; }
@ icSigUndefinedStruct
Definition icProfileHeader.h:606

References icSigUndefinedStruct.

Referenced by icGetTagStructHandlerOfType(), CIccArrayColorantInfo::Validate(), and CIccArrayNamedColor::Validate().

+ Here is the caller graph for this function:

◆ GetType()

virtual icTagTypeSignature CIccTagColorantTable::GetType ( ) const
inlinevirtualinherited

Function: GetType()

Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.

Reimplemented from CIccTag.

1395{ return icSigColorantTableType; }
@ icSigColorantTableType
Definition icProfileHeader.h:531

References icSigColorantTableType.

Referenced by CIccTagColorantTable::Write().

+ Here is the caller graph for this function:

◆ IsArrayType()

virtual bool CIccTag::IsArrayType ( )
inlinevirtualinherited

Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.

135{ return false; }

Referenced by MyTagDialog::MyTagDialog(), and DumpTag().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccTag::IsMBBType ( )
inlinevirtualinherited

Reimplemented in CIccMBB.

136{ return false; } //If true then CIccTag can be cast as an CIccMBB

Referenced by CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ IsNumArrayType()

virtual bool CIccTag::IsNumArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.

137{ return false;} //If true then CIccTag can be cast as a CIccTagNumArray

Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), CIccTagStruct::GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccTag::IsSupported ( )
inlinevirtualinherited

Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes. By Default inherited classes are supported. Unknown tag types are not supported.

Returns true if tag type is supported.

Reimplemented in CIccTagUnknown, CIccTagEmbeddedProfile, and CIccTagMultiProcessElement.

153{ return true; }

◆ NewCopy()

virtual CIccTag * CIccTagColorantTable::NewCopy ( ) const
inlinevirtualinherited

Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

Parameter(s): none

Returns a new CIccTag object that is a copy of this object.

Reimplemented from CIccTag.

1392{return new CIccTagColorantTable(*this);}
Definition IccTagBasic.h:1387

References CIccTagColorantTable::CIccTagColorantTable().

+ Here is the call graph for this function:

◆ operator[]()

icColorantTableEntry & CIccTagColorantTable::operator[] ( icUInt32Number  index)
inlineinherited
1403{return m_pData[index];}

References CIccTagColorantTable::m_pData.

◆ ParseXml()

bool CIccTagXmlColorantTable::ParseXml ( xmlNode *  pNode,
std::string &  parseStr 
)
virtual

Implements CIccTagXml.

1835{
1836 pNode = icXmlFindNode(pNode, "ColorantTable");
1837
1838 if (pNode && pNode->children) {
1839 pNode = pNode->children;
1840
1841 icUInt16Number n = (icUInt16Number)icXmlNodeCount(pNode, "Colorant");
1842
1843 if (n) {
1845 SetSize(n);
1846
1847 for (i=0; pNode; pNode=pNode->next) {
1848 if (pNode->type == XML_ELEMENT_NODE &&
1849 !icXmlStrCmp(pNode->name, "Colorant") &&
1850 i<n) {
1851 std::string str;
1852 const icChar *name = icXmlAttrValue(pNode, "Name");
1853 xmlAttr *L = icXmlFindAttr(pNode, "Channel1");
1854 xmlAttr *a = icXmlFindAttr(pNode, "Channel2");
1855 xmlAttr *b = icXmlFindAttr(pNode, "Channel3");
1856
1857 if (name && L && a && b) {
1858 strncpy(m_pData[i].name, icUtf8ToAnsi(str, name), sizeof(m_pData[i].name));
1859 m_pData[i].name[sizeof(m_pData[i].name)-1]=0;
1860
1861 icFloatNumber lab[3];
1862
1863 lab[0] = (icFloatNumber)atof(icXmlAttrValue(L));
1864 lab[1] = (icFloatNumber)atof(icXmlAttrValue(a));
1865 lab[2] = (icFloatNumber)atof(icXmlAttrValue(b));
1866
1867 icLabToPcs(lab);
1868 m_pData[i].data[0] = icFtoU16(lab[0]);
1869 m_pData[i].data[1] = icFtoU16(lab[1]);
1870 m_pData[i].data[2] = icFtoU16(lab[2]);
1871
1872 i++;
1873 }
1874 else
1875 return false;
1876 }
1877 }
1878 return i==n;
1879 }
1880 return false;
1881 }
1882 return false;
1883}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
icInt8Number name[32]
Definition icProfileHeader.h:1789
icUInt16Number data[3]
Definition icProfileHeader.h:1790
ICCPROFLIB_API void icLabToPcs(icFloatNumber *Lab)
Definition IccUtil.cpp:927
ICCPROFLIB_API icUInt16Number icFtoU16(icFloatNumber num)
Definition IccUtil.cpp:745
const char * icUtf8ToAnsi(std::string &buf, const char *szSrc)
Definition IccUtilXml.cpp:397
icUInt32Number icXmlNodeCount(xmlNode *pNode, const char *szNodeName)
Definition IccUtilXml.cpp:703
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
Definition IccUtilXml.cpp:669
#define icXmlStrCmp(x, y)
Definition IccUtilXml.h:134
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
Definition IccUtilXml.cpp:687
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault="")
Definition IccUtilXml.cpp:572
bool SetSize(icUInt16Number nSize, bool bZeroNew=true)
Definition IccTagBasic.cpp:8860

References icColorantTableEntry::data, icFtoU16(), icLabToPcs(), icUtf8ToAnsi(), icXmlAttrValue(), icXmlAttrValue(), icXmlFindAttr(), icXmlFindNode(), icXmlNodeCount(), CIccTagColorantTable::m_pData, icColorantTableEntry::name, and CIccTagColorantTable::SetSize().

+ Here is the call graph for this function:

◆ Read() [1/2]

bool CIccTagColorantTable::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtualinherited

Name: CIccTagColorantTable::Read

Purpose: Read in the tag contents into a data block

Args: size - # of bytes in tag, pIO - IO object to read tag from

Return: true = successful, false = failure

Reimplemented from CIccTag.

8702{
8704 icUInt32Number nCount;
8705
8706 if (sizeof(icTagTypeSignature) +
8707 sizeof(icUInt32Number) +
8708 sizeof(icUInt32Number) +
8709 sizeof(icColorantTableEntry) > size)
8710 return false;
8711
8712 if (!pIO) {
8713 return false;
8714 }
8715
8716 if (!pIO->Read32(&sig))
8717 return false;
8718
8719 if (!pIO->Read32(&m_nReserved))
8720 return false;
8721
8722 if (!pIO->Read32(&nCount))
8723 return false;
8724
8725 icUInt32Number nNum = (size - 3*sizeof(icUInt32Number))/sizeof(icColorantTableEntry);
8726 icUInt32Number nNum8 = sizeof(m_pData->name);
8727 icUInt32Number nNum16 = sizeof(m_pData->data)/sizeof(icUInt16Number);
8728
8729 if (nNum < nCount || nCount > 0xffff)
8730 return false;
8731
8732 if (!SetSize((icUInt16Number)nCount))
8733 return false;
8734
8735 for (icUInt32Number i=0; i<nCount; i++) {
8736 if (pIO->Read8(&m_pData[i].name[0], nNum8) != (icInt32Number)nNum8)
8737 return false;
8738
8739 if (pIO->Read16(&m_pData[i].data[0], nNum16) != (icInt32Number)nNum16)
8740 return false;
8741 }
8742
8743 return true;
8744}
long icInt32Number
Definition icProfileHeader.h:291
icTagTypeSignature
Definition icProfileHeader.h:526
Definition icProfileHeader.h:1788
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
Definition IccTagBasic.h:235

References icColorantTableEntry::data, CIccTag::m_nReserved, CIccTagColorantTable::m_pData, icColorantTableEntry::name, CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), and CIccTagColorantTable::SetSize().

+ Here is the call graph for this function:

◆ Read() [2/2]

virtual bool CIccTag::Read ( icUInt32Number  size,
CIccIO pIO,
CIccProfile pProfile 
)
inlinevirtualinherited

Function: Read(size, pIO) - Read tag from file. Each derived tag will implement it's own Read() function.

Parameter(s): size - number of bytes in tag including the type signature. pIO - IO object used to read in tag. The IO object should already be initialized to point to the begining of the tag.

Returns true if Read is successful.

Reimplemented in CIccTagEmbeddedProfile.

197{ return Read(size, pIO); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagBasic.h:167

References CIccTag::Read().

+ Here is the call graph for this function:

◆ ReadAll()

virtual bool CIccTag::ReadAll ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

Reimplemented in CIccTagEmbeddedProfile.

175{ return true; }

◆ SetPCS()

void CIccTagColorantTable::SetPCS ( icColorSpaceSignature  sig)
inlineinherited
1408{m_PCS = sig;}

References CIccTagColorantTable::m_PCS.

◆ SetSize()

bool CIccTagColorantTable::SetSize ( icUInt16Number  nSize,
bool  bZeroNew = true 
)
inherited

Name: CIccTagColorantTable::SetSize

Purpose: Sets the size of the data array.

Args: nSize - number of entries, bZeroNew - flag to zero newly formed values

8861{
8862 if (m_nCount == nSize)
8863 return true;
8864
8866
8867 if (!m_pData) {
8868 m_nCount = 0;
8869 return false;
8870 }
8871
8872 if (bZeroNew && nSize > m_nCount) {
8873 memset(&m_pData[m_nCount], 0, (nSize-m_nCount)*sizeof(icColorantTableEntry));
8874 }
8875 m_nCount = nSize;
8876
8877 return true;
8878}
ICCPROFLIB_API void * icRealloc(void *ptr, size_t size)
Definition IccUtil.cpp:111

References icRealloc(), CIccTagColorantTable::m_nCount, and CIccTagColorantTable::m_pData.

Referenced by ParseXml(), and CIccTagColorantTable::Read().

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

◆ ToXml()

bool CIccTagXmlColorantTable::ToXml ( std::string &  xml,
std::string  blanks = "" 
)
virtual

Implements CIccTagXml.

1810{
1811 char buf[256];
1812 char fix[256];
1813 int i;
1814 std::string str;
1815
1816 xml += blanks + "<ColorantTable>\n";
1817 for (i=0; i<(int)m_nCount; i++) {
1818 icFloatNumber lab[3];
1819 lab[0] = icU16toF(m_pData[i].data[0]);
1820 lab[1] = icU16toF(m_pData[i].data[1]);
1821 lab[2] = icU16toF(m_pData[i].data[2]);
1822 icLabFromPcs(lab);
1823 sprintf(buf, " <Colorant Name=\"%s\" Channel1=\"" icXmlFloatFmt "\" Channel2=\"" icXmlFloatFmt "\" Channel3=\"" icXmlFloatFmt "\"/>\n",
1824 icFixXml(fix, icAnsiToUtf8(str, m_pData[i].name)), lab[0], lab[1], lab[2]);
1825 xml += blanks + buf;
1826 }
1827 //xml += "\n";
1828 xml += blanks + "</ColorantTable>\n";
1829
1830 return true;
1831}
#define icXmlFloatFmt
Definition IccXmlConfig.h:75
const char * icFixXml(char *szDest, const char *szStr)
Definition IccUtilXml.cpp:305
const char * icAnsiToUtf8(std::string &buf, const char *szSrc)
Definition IccUtilXml.cpp:372

References icColorantTableEntry::data, icAnsiToUtf8(), icFixXml(), icLabFromPcs(), icU16toF(), CIccTagColorantTable::m_nCount, CIccTagColorantTable::m_pData, and icColorantTableEntry::name.

+ Here is the call graph for this function:

◆ Validate()

icValidateStatus CIccTagColorantTable::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccProfile pProfile = NULL 
) const
virtualinherited

Name: CIccTagColorantTable::Validate

Purpose: Check tag data validity.

Args: sig = signature of tag being validated, sReport = String to add report information to

Return: icValidateStatusOK if valid, or other error status.

Reimplemented from CIccTag.

8896{
8897 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
8898
8899 CIccInfo Info;
8900 std::string sSigPathName = Info.GetSigPathName(sigPath);
8901 icSignature sig = icGetFirstSigPathSig(sigPath);
8902
8903 if (!pProfile) {
8904 sReport += icMsgValidateWarning;
8905 sReport += sSigPathName;
8906 sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
8908 return rv;
8909 }
8910
8911
8912 if (sig==icSigColorantTableOutTag) {
8913 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
8914 sReport += icMsgValidateNonCompliant;
8915 sReport += sSigPathName;
8916 sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
8918 }
8919 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.pcs)) {
8920 sReport += icMsgValidateNonCompliant;
8921 sReport += sSigPathName;
8922 sReport += " - Incorrect number of colorants.\n";
8924 }
8925 }
8926 else {
8927 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
8928 sReport += icMsgValidateNonCompliant;
8929 sReport += sSigPathName;
8930 sReport += " - Incorrect number of colorants.\n";
8932 }
8933 }
8934
8935 return rv;
8936}
@ icSigLinkClass
Definition icProfileHeader.h:955
icUInt32Number icSignature
Definition icProfileHeader.h:271
@ icSigColorantTableOutTag
Definition icProfileHeader.h:390
icValidateStatus
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:121
@ icValidateNonCompliant
Definition IccDefs.h:122
ICCPROFLIB_API icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
ICCPROFLIB_API icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
ICCPROFLIB_API const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Definition IccTagBasic.cpp:164

References icHeader::colorSpace, icHeader::deviceClass, CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateNonCompliant, icMsgValidateWarning, icSigColorantTableOutTag, icSigLinkClass, icValidateNonCompliant, icValidateWarning, CIccTagColorantTable::m_nCount, icHeader::pcs, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagColorantTable::Write ( CIccIO pIO)
virtualinherited

Name: CIccTagColorantTable::Write

Purpose: Write the tag to a file

Args: pIO - The IO object to write tag to.

Return: true = succesful, false = failure

Reimplemented from CIccTag.

8761{
8763
8764 if (!pIO)
8765 return false;
8766
8767 if (!pIO->Write32(&sig))
8768 return false;
8769
8770 if (!pIO->Write32(&m_nReserved))
8771 return false;
8772
8773 if (!pIO->Write32(&m_nCount))
8774 return false;
8775
8776 icUInt32Number nNum8 = sizeof(m_pData->name);
8777 icUInt32Number nNum16 = sizeof(m_pData->data)/sizeof(icUInt16Number);
8778
8779 for (icUInt32Number i=0; i<m_nCount; i++) {
8780 if (pIO->Write8(&m_pData[i].name[0],nNum8) != (icInt32Number)nNum8)
8781 return false;
8782
8783 if (pIO->Write16(&m_pData[i].data[0],nNum16) != (icInt32Number)nNum16)
8784 return false;
8785 }
8786
8787 return true;
8788}
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual icTagTypeSignature GetType() const
Definition IccTagBasic.h:1395

References icColorantTableEntry::data, CIccTagColorantTable::GetType(), CIccTagColorantTable::m_nCount, CIccTag::m_nReserved, CIccTagColorantTable::m_pData, icColorantTableEntry::name, CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Field Documentation

◆ m_nCount

◆ m_nReserved

icUInt32Number CIccTag::m_nReserved
inherited

Referenced by CIccTag::CIccTag(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::operator=(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccTagText::Read(), CIccTagUtf8Text::Read(), CIccTagZipUtf8Text::Read(), CIccTagUtf16Text::Read(), CIccTagTextDescription::Read(), CIccTagSignature::Read(), CIccTagNamedColor2::Read(), CIccTagXYZ::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagSparseMatrixArray::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), CIccTagViewingConditions::Read(), CIccTagProfileSeqDesc::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagStruct::Read(), CIccTagArray::Read(), CIccTagDict::Read(), CIccTagCurve::Read(), CIccTagParametricCurve::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagMultiProcessElement::Read(), CIccTagProfileSequenceId::Read(), CIccTagEmbeddedProfile::Read(), CIccTag::Validate(), CIccTagText::Write(), CIccTagUtf8Text::Write(), CIccTagZipUtf8Text::Write(), CIccTagUtf16Text::Write(), CIccTagTextDescription::Write(), CIccTagSignature::Write(), CIccTagNamedColor2::Write(), CIccTagXYZ::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagSparseMatrixArray::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), CIccTagViewingConditions::Write(), CIccTagProfileSeqDesc::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagStruct::Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().

◆ m_PCS

◆ m_pData


The documentation for this class was generated from the following files: