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

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagColorantTable:
+ Collaboration diagram for CIccTagColorantTable:

Public Member Functions

 CIccTagColorantTable (const CIccTagColorantTable &ITCT)
 
 CIccTagColorantTable (int nsize=1)
 
virtual ~CIccTagColorantTable ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
icColorantTableEntryGetEntry (icUInt32Number index)
 
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
 
CIccTagColorantTableoperator= (const CIccTagColorantTable &ColorantTableTag)
 
icColorantTableEntryoperator[] (icUInt32Number index)
 
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 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

Class: CIccTagColorantTable

Purpose: Colorant Table Tag

Constructor & Destructor Documentation

◆ CIccTagColorantTable() [1/2]

CIccTagColorantTable::CIccTagColorantTable ( int  nSize = 1)

Name: CIccTagColorantTable::CIccTagColorantTable

Purpose: Constructor

Args: nSize = number of entries

8616{
8617 m_nCount = nSize;
8618 if (m_nCount<1)
8619 m_nCount = 1;
8620
8621 m_pData = (icColorantTableEntry*)calloc(nSize, sizeof(icColorantTableEntry));
8622}
Definition icProfileHeader.h:1788
icColorantTableEntry * m_pData
Definition IccTagBasic.h:1414
icUInt32Number m_nCount
Definition IccTagBasic.h:1413

References m_nCount, and m_pData.

◆ CIccTagColorantTable() [2/2]

CIccTagColorantTable::CIccTagColorantTable ( const CIccTagColorantTable ITCT)

Name: CIccTagColorantTable::CIccTagColorantTable

Purpose: Copy Constructor

Args: ITCT = The CIccTagUnknown object to be copied

8636{
8637 m_PCS = ITCT.m_PCS;
8638 m_nCount = ITCT.m_nCount;
8639
8641 memcpy(m_pData, ITCT.m_pData, m_nCount*sizeof(icColorantTableEntry));
8642}
icColorSpaceSignature m_PCS
Definition IccTagBasic.h:1415

References m_nCount, m_PCS, and m_pData.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccTagColorantTable()

CIccTagColorantTable::~CIccTagColorantTable ( )
virtual

Name: CIccTagColorantTable::~CIccTagColorantTable

Purpose: Destructor

8681{
8682 if (m_pData)
8683 free(m_pData);
8684}

References m_pData.

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 
)
virtual

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

References icColorantTableEntry::data, icLabFromPcs(), icSigXYZData, icU16toF(), icUSFtoD(), m_nCount, m_PCS, 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 icChar * CIccTagColorantTable::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlColorantTable.

1396{ return "CIccTagColorantTable"; }

◆ GetEntry()

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

References m_pData.

◆ GetExtension()

virtual IIccExtensionTag * CIccTag::GetExtension ( )
inlinevirtualinherited

Reimplemented in CIccTagXmlUnknown, CIccTagXmlText, CIccTagXmlUtf8Text, CIccTagXmlZipUtf8Text, CIccTagXmlZipXml, CIccTagXmlUtf16Text, CIccTagXmlTextDescription, CIccTagXmlSignature, CIccTagXmlNamedColor2, CIccTagXmlXYZ, CIccTagXmlChromaticity, CIccTagXmlCicp, CIccTagXmlSparseMatrixArray, CIccTagXmlFixedNum< T, Tsig >, CIccTagXmlNum< T, A, Tsig >, CIccTagXmlFloatNum< T, A, Tsig >, CIccTagXmlMeasurement, CIccTagXmlMultiLocalizedUnicode, CIccTagXmlTagData, CIccTagXmlDateTime, CIccTagXmlColorantOrder, CIccTagXmlColorantTable, CIccTagXmlViewingConditions, CIccTagXmlSpectralDataInfo, CIccTagXmlSpectralViewingConditions, CIccTagXmlProfileSeqDesc, CIccTagXmlResponseCurveSet16, CIccTagXmlCurve, CIccTagXmlParametricCurve, CIccTagXmlSegmentedCurve, CIccTagXmlLutAtoB, CIccTagXmlLutBtoA, CIccTagXmlLut8, CIccTagXmlLut16, CIccTagXmlMultiProcessElement, CIccTagXmlProfileSequenceId, CIccTagXmlDict, CIccTagXmlStruct, CIccTagXmlArray, CIccTagXmlGamutBoundaryDesc, CIccTagXmlEmbeddedHeightImage, CIccTagXmlEmbeddedNormalImage, and CIccTagXmlEmbeddedProfile.

143{return NULL;}

Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ GetPCS()

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

References m_PCS.

◆ GetSize()

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

References 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
inlinevirtual

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 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
inlinevirtual

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().

+ Here is the call graph for this function:

◆ operator=()

CIccTagColorantTable & CIccTagColorantTable::operator= ( const CIccTagColorantTable ColorantTableTag)

Name: CIccTagColorantTable::operator=

Purpose: Copy Operator

Args: ColorantTableTag = The CIccTagColorantTable object to be copied

8656{
8657 if (&ColorantTableTag == this)
8658 return *this;
8659
8660 m_PCS = ColorantTableTag.m_PCS;
8661 m_nCount = ColorantTableTag.m_nCount;
8662
8663 if (m_pData)
8664 free(m_pData);
8666 memcpy(m_pData, ColorantTableTag.m_pData, m_nCount*sizeof(icColorantTableEntry));
8667
8668 return *this;
8669}

References m_nCount, m_PCS, and m_pData.

◆ operator[]()

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

References m_pData.

◆ Read() [1/2]

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

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}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
long icInt32Number
Definition icProfileHeader.h:291
icTagTypeSignature
Definition icProfileHeader.h:526
icInt8Number name[32]
Definition icProfileHeader.h:1789
icUInt16Number data[3]
Definition icProfileHeader.h:1790
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
bool SetSize(icUInt16Number nSize, bool bZeroNew=true)
Definition IccTagBasic.cpp:8860

References icColorantTableEntry::data, CIccTag::m_nReserved, m_pData, icColorantTableEntry::name, CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), and 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)
inline
1408{m_PCS = sig;}

References m_PCS.

◆ SetSize()

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

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(), m_nCount, and m_pData.

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

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

◆ Validate()

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

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, m_nCount, icHeader::pcs, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagColorantTable::Write ( CIccIO pIO)
virtual

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, GetType(), m_nCount, CIccTag::m_nReserved, 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(), 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(), 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

icColorSpaceSignature CIccTagColorantTable::m_PCS
protected

◆ m_pData


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