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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlEmbeddedProfile:
+ Collaboration diagram for CIccTagXmlEmbeddedProfile:

Public Member Functions

virtual ~CIccTagXmlEmbeddedProfile ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual const char * GetGlassName () const
 
virtual CIccProfileGetProfile () 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
 
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 ()
 
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
 
CIccProfilem_pProfile
 

Private Member Functions

virtual const char * GetExtClassName () const
 
virtual const char * GetExtDerivedClassName () const
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CIccTagXmlEmbeddedProfile()

virtual CIccTagXmlEmbeddedProfile::~CIccTagXmlEmbeddedProfile ( )
inlinevirtual
716{}

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 CIccTagEmbeddedProfile::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccTagEmbedProfile::Describe

Purpose: Dump data associated with unknown tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

309{
310 if (m_pProfile) {
311 sDescription += "Embedded profile in Tag\n";
312
313 // Code below is copied from iccDumpProfile.cpp
314 icHeader* pHdr = &m_pProfile->m_Header;
315 CIccInfo Fmt;
316 char buf[180];
317
318 if (Fmt.IsProfileIDCalculated(&pHdr->profileID)) {
319 sDescription += "Profile ID: %s\n";
320 sDescription += Fmt.GetProfileID(&pHdr->profileID);
321 }
322 else
323 sDescription += "Profile ID: Profile ID not calculated.\n";
324 sDescription += "Size: ";
325 sprintf(buf, "%d(0x%x) bytes\n", pHdr->size, pHdr->size);
326 sDescription += buf;
327 sDescription += "\nHeader\n";
328 sDescription += "------\n";
329 sprintf(buf, "Attributes: %s\n", Fmt.GetDeviceAttrName(pHdr->attributes));
330 sDescription += buf;
331 sprintf(buf, "Cmm: %s\n", Fmt.GetCmmSigName((icCmmSignature)(pHdr->cmmId)));
332 sDescription += buf;
333 sprintf(buf, "Creation Date: %d/%d/%d %02u:%02u:%02u\n",
334 pHdr->date.month, pHdr->date.day, pHdr->date.year,
335 pHdr->date.hours, pHdr->date.minutes, pHdr->date.seconds);
336 sDescription += buf;
337 sprintf(buf, "Creator: %s\n", icGetSig(buf, pHdr->creator));
338 sDescription += buf;
339 sprintf(buf, "Data Color Space: %s\n", Fmt.GetColorSpaceSigName(pHdr->colorSpace));
340 sDescription += buf;
341 sprintf(buf, "Flags %s\n", Fmt.GetProfileFlagsName(pHdr->flags));
342 sDescription += buf;
343 sprintf(buf, "PCS Color Space: %s\n", Fmt.GetColorSpaceSigName(pHdr->pcs));
344 sDescription += buf;
345 sprintf(buf, "Platform: %s\n", Fmt.GetPlatformSigName(pHdr->platform));
346 sDescription += buf;
347 sprintf(buf, "Rendering Intent: %s\n", Fmt.GetRenderingIntentName((icRenderingIntent)(pHdr->renderingIntent)));
348 sDescription += buf;
349 sprintf(buf, "Profile Class: %s\n", Fmt.GetProfileClassSigName(pHdr->deviceClass));
350 sDescription += buf;
351 if (pHdr->deviceSubClass) {
352 sprintf(buf, "Profile SubClass: %s\n", icGetSig(buf, pHdr->deviceSubClass));
353 sDescription += buf;
354 }
355 else
356 sDescription += "Profile SubClass: Not Defined\n";
357 sprintf(buf, "Version: %s\n", Fmt.GetVersionName(pHdr->version));
358 sDescription += buf;
359 if (pHdr->version >= icVersionNumberV5 && pHdr->deviceSubClass) {
360 sprintf(buf, "SubClass Version: %s\n", Fmt.GetSubClassVersionName(pHdr->version));
361 sDescription += buf;
362 }
363 sprintf(buf, "Illuminant: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
364 icFtoD(pHdr->illuminant.X),
365 icFtoD(pHdr->illuminant.Y),
366 icFtoD(pHdr->illuminant.Z));
367 sDescription += buf;
368 sprintf(buf, "Spectral PCS: %s\n", Fmt.GetSpectralColorSigName(pHdr->spectralPCS));
369 sDescription += buf;
370 if (pHdr->spectralRange.start || pHdr->spectralRange.end || pHdr->spectralRange.steps) {
371 sprintf(buf, "Spectral PCS Range: start=%.1fnm, end=%.1fnm, steps=%d\n",
374 pHdr->spectralRange.steps);
375 sDescription += buf;
376 }
377 else {
378 sDescription += "Spectral PCS Range: Not Defined\n";
379 }
380
381 if (pHdr->biSpectralRange.start || pHdr->biSpectralRange.end || pHdr->biSpectralRange.steps) {
382 sprintf(buf, "BiSpectral Range: start=%.1fnm, end=%.1fnm, steps=%d\n",
385 pHdr->biSpectralRange.steps);
386 sDescription += buf;
387 }
388 else {
389 sDescription += "BiSpectral Range: Not Defined\n";
390 }
391 if (pHdr->mcs) {
392 sprintf(buf, "MCS Color Space: %s\n", Fmt.GetColorSpaceSigName((icColorSpaceSignature)pHdr->mcs));
393 sDescription += buf;
394 }
395 else {
396 sDescription += "MCS Color Space: Not Defined\n";
397 }
398
399 sDescription += "\nProfile Tags\n";
400 sDescription += "------------\n";
401
402 sprintf(buf, "%28s ID %8s\t%8s\t%8s\n", "Tag", "Offset", "Size", "Pad");
403 sDescription += buf;
404 sprintf(buf, "%28s ------ %8s\t%8s\t%8s\n", "----", "------", "----", "---");
405 sDescription += buf;
406
407 int n, closest, pad;
408 TagEntryList::iterator i, j;
409
410 // n is number of Tags in Tag Table
411 for (n = 0, i = m_pProfile->m_Tags->begin(); i != m_pProfile->m_Tags->end(); i++, n++) {
412 // Find closest tag after this tag, by scanning all offsets of other tags
413 closest = pHdr->size;
414 for (j = m_pProfile->m_Tags->begin(); j != m_pProfile->m_Tags->end(); j++) {
415 if ((i != j) && (j->TagInfo.offset >= i->TagInfo.offset + i->TagInfo.size) && ((int)j->TagInfo.offset <= closest)) {
416 closest = j->TagInfo.offset;
417 }
418 }
419 // Number of actual padding bytes between this tag and closest neighbour (or EOF)
420 // Should be 0-3 if compliant. Negative number if tags overlap!
421 pad = closest - i->TagInfo.offset - i->TagInfo.size;
422
423 sprintf(buf, "%28s %s %8d\t%8d\t%8d\n", Fmt.GetTagSigName(i->TagInfo.sig),
424 icGetSig(buf, i->TagInfo.sig, false), i->TagInfo.offset, i->TagInfo.size, pad);
425 sDescription += buf;
426 }
427 }
428 else {
429 sDescription += "No profile embedded in Tag\n";
430 }
431}
icSpectralRange spectralRange
Definition icProfileHeader.h:2063
icXYZNumber illuminant
Definition icProfileHeader.h:2058
icUInt32Number renderingIntent
Definition icProfileHeader.h:2057
icUInt64Number attributes
Definition icProfileHeader.h:2056
icColorSpaceSignature colorSpace
Definition icProfileHeader.h:2048
icUInt16Number year
Definition icProfileHeader.h:1419
icProfileClassSignature deviceClass
Definition icProfileHeader.h:2047
icUInt16Number month
Definition icProfileHeader.h:1420
icUInt16Number minutes
Definition icProfileHeader.h:1423
icUInt16Number steps
Definition icProfileHeader.h:1469
icS15Fixed16Number Y
Definition icProfileHeader.h:1430
icUInt16Number seconds
Definition icProfileHeader.h:1424
icSignature deviceSubClass
Definition icProfileHeader.h:2066
icSignature cmmId
Definition icProfileHeader.h:2045
icSpectralColorSignature spectralPCS
Definition icProfileHeader.h:2062
icColorSpaceSignature
Definition icProfileHeader.h:843
icFloat16Number start
Definition icProfileHeader.h:1467
icUInt16Number hours
Definition icProfileHeader.h:1422
icDateTimeNumber date
Definition icProfileHeader.h:2050
icPlatformSignature platform
Definition icProfileHeader.h:2052
#define icVersionNumberV5
Definition icProfileHeader.h:193
icFloat16Number end
Definition icProfileHeader.h:1468
icS15Fixed16Number Z
Definition icProfileHeader.h:1431
icS15Fixed16Number X
Definition icProfileHeader.h:1429
icSignature creator
Definition icProfileHeader.h:2059
icUInt32Number flags
Definition icProfileHeader.h:2053
icUInt16Number day
Definition icProfileHeader.h:1421
icUInt32Number version
Definition icProfileHeader.h:2046
icMaterialColorSignature mcs
Definition icProfileHeader.h:2065
icProfileID profileID
Definition icProfileHeader.h:2060
icRenderingIntent
Definition icProfileHeader.h:1142
icUInt32Number size
Definition icProfileHeader.h:2044
icSpectralRange biSpectralRange
Definition icProfileHeader.h:2064
icCmmSignature
Definition icProfileHeader.h:985
icColorSpaceSignature pcs
Definition icProfileHeader.h:2049
Definition icProfileHeader.h:2043
ICCPROFLIB_API icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
ICCPROFLIB_API const icChar * icGetSig(icChar *pBuf, icUInt32Number sig, bool bGetHexVal=true)
Definition IccUtil.cpp:1028
ICCPROFLIB_API icFloat32Number icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
Definition IccUtil.h:303
bool IsProfileIDCalculated(icProfileID *profileID)
Definition IccUtil.cpp:2305
const icChar * GetVersionName(icUInt32Number val)
Definition IccUtil.cpp:1428
const icChar * GetSpectralColorSigName(icSpectralColorSignature sig)
Definition IccUtil.cpp:1769
const icChar * GetCmmSigName(icCmmSignature sig)
Definition IccUtil.cpp:1874
const icChar * GetProfileClassSigName(icProfileClassSignature sig)
Definition IccUtil.cpp:1804
const icChar * GetTagSigName(icTagSignature sig)
Definition IccUtil.cpp:1495
const icChar * GetProfileFlagsName(icUInt32Number val, bool bCheckMCS=false)
Definition IccUtil.cpp:1465
const icChar * GetPlatformSigName(icPlatformSignature sig)
Definition IccUtil.cpp:1845
const icChar * GetProfileID(icProfileID *profileID)
Definition IccUtil.cpp:2293
const icChar * GetColorSpaceSigName(icColorSpaceSignature sig)
Definition IccUtil.cpp:1640
const icChar * GetDeviceAttrName(icUInt64Number val)
Definition IccUtil.cpp:1448
const icChar * GetSubClassVersionName(icUInt32Number val)
Definition IccUtil.cpp:1438
const icChar * GetRenderingIntentName(icRenderingIntent val, bool bIsV5=false)
Definition IccUtil.cpp:2091
CIccProfile * m_pProfile
Definition IccTagEmbedIcc.h:112

References icHeader::attributes, icHeader::biSpectralRange, icHeader::cmmId, icHeader::colorSpace, icHeader::creator, icHeader::date, icDateTimeNumber::day, icHeader::deviceClass, icHeader::deviceSubClass, icSpectralRange::end, icHeader::flags, CIccInfo::GetCmmSigName(), CIccInfo::GetColorSpaceSigName(), CIccInfo::GetDeviceAttrName(), CIccInfo::GetPlatformSigName(), CIccInfo::GetProfileClassSigName(), CIccInfo::GetProfileFlagsName(), CIccInfo::GetProfileID(), CIccInfo::GetRenderingIntentName(), CIccInfo::GetSpectralColorSigName(), CIccInfo::GetSubClassVersionName(), CIccInfo::GetTagSigName(), CIccInfo::GetVersionName(), icDateTimeNumber::hours, icF16toF(), icFtoD(), icGetSig(), icHeader::illuminant, CIccInfo::IsProfileIDCalculated(), CIccTagEmbeddedProfile::m_pProfile, icHeader::mcs, icDateTimeNumber::minutes, icDateTimeNumber::month, icTag::offset, icHeader::pcs, icHeader::platform, icHeader::profileID, icHeader::renderingIntent, icDateTimeNumber::seconds, icTag::sig, icTag::size, icHeader::size, icHeader::spectralPCS, icHeader::spectralRange, icSpectralRange::start, icSpectralRange::steps, icHeader::version, icXYZNumber::X, icXYZNumber::Y, icDateTimeNumber::year, and icXYZNumber::Z.

+ 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 * CIccTagEmbeddedProfile::GetClassName ( ) const
inlinevirtualinherited

Reimplemented from CIccTag.

96{ return "CIccTagEmbeddedProfile"; }

◆ 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 * CIccTagXmlEmbeddedProfile::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

720{ return this; }

◆ GetGlassName()

virtual const char * CIccTagXmlEmbeddedProfile::GetGlassName ( ) const
inlinevirtual
718{ return "CIccTagXmlEmbeddedProfile"; }

◆ GetProfile()

virtual CIccProfile * CIccTagEmbeddedProfile::GetProfile ( ) const
inlinevirtualinherited

◆ 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 CIccTagEmbeddedProfile::GetType ( ) const
inlinevirtualinherited

Function: GetType()

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

Reimplemented from CIccTag.

@ icSigEmbeddedProfileType
Definition icProfileHeader.h:585

References icSigEmbeddedProfileType.

Referenced by CIccTagEmbeddedProfile::Read(), and CIccTagEmbeddedProfile::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 CIccTagEmbeddedProfile::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 from CIccTag.

93{ return true; }

◆ NewCopy()

virtual CIccTag * CIccTagEmbeddedProfile::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.

90{ return new CIccTagEmbeddedProfile(*this); }
CIccTagEmbeddedProfile()
Definition IccTagEmbedIcc.cpp:93

References CIccTagEmbeddedProfile::CIccTagEmbeddedProfile().

+ Here is the call graph for this function:

◆ ParseXml()

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

Implements CIccTagXml.

5065{
5066 // parse each tag
5067 xmlNode *tagNode;
5068
5069 tagNode = icXmlFindNode(pNode, "IccProfile");
5070 if (!tagNode)
5071 return false;
5072
5073 if (m_pProfile) {
5074 delete m_pProfile;
5075 }
5076
5077 CIccProfileXml *pProfile = new CIccProfileXml();
5078 m_pProfile = pProfile;
5079
5080 if (!pProfile->ParseXml(tagNode, parseStr)) {
5081 delete m_pProfile;
5082 m_pProfile = NULL;
5083 return false;
5084 }
5085 return true;
5086}
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
Definition IccUtilXml.cpp:687
Definition IccProfileXml.h:76
bool ParseXml(xmlNode *pNode, std::string &parseStr)
Definition IccProfileXml.cpp:801

References CIccProfileXml::CIccProfileXml(), icXmlFindNode(), CIccTagEmbeddedProfile::m_pProfile, and CIccProfileXml::ParseXml().

+ Here is the call graph for this function:

◆ Read() [1/2]

virtual bool CIccTagEmbeddedProfile::Read ( icUInt32Number  size,
CIccIO pIO 
)
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 from CIccTag.

100{ return Read(size, pIO, NULL); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagEmbedIcc.h:100

References CIccTagEmbeddedProfile::Read().

+ Here is the call graph for this function:

◆ Read() [2/2]

bool CIccTagEmbeddedProfile::Read ( icUInt32Number  size,
CIccIO pIO,
CIccProfile pProfile 
)
virtualinherited

Name: CIccTagEmbedProfile::Read

Purpose: Read in an unknown tag type into a data block

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

Return: true = successful, false = failure

Reimplemented from CIccTag.

173{
174 if (size<sizeof(icTagTypeSignature) || !pIO) {
175 return false;
176 }
177
178 icTagTypeSignature nType;
179
180 if (!pIO->Read32(&nType))
181 return false;
182
183 if (nType != GetType())
184 return false;
185
186 size = size - sizeof(icTagTypeSignature);
187
188 if (size < sizeof(m_nReserved))
189 return false;
190
191 if (!pIO->Read32(&m_nReserved))
192 return false;
193
194 size = size - sizeof(m_nReserved);
195
196 CIccEmbedIO *pEmbedIO = new CIccEmbedIO();
197
198 if (!pEmbedIO->Attach(pIO, size)) {
199 delete pEmbedIO;
200 return false;
201 }
202
203 if (m_pProfile)
204 delete m_pProfile;
205
206 m_pProfile = pProfile ? pProfile->NewProfile() : new CIccProfile();
207
208 if (pProfile && pProfile->HasIO()) {
209 if (!m_pProfile->Attach(pEmbedIO)) {
210 delete pEmbedIO;
211 delete m_pProfile;
212 m_pProfile = NULL;
213
214 return false;
215 }
216 }
217 else {
218 bool stat = m_pProfile->Read(pEmbedIO);
219 delete pEmbedIO;
220
221 if (!stat) {
222 delete m_pProfile;
223 m_pProfile = NULL;
224
225 return false;
226 }
227
228 return stat;
229 }
230
231 return true;
232}
icTagTypeSignature
Definition icProfileHeader.h:526
class ICCPROFLIB_API CIccProfile
Definition IccPcc.h:80
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
Definition IccIO.h:185
icUInt32Number m_nReserved
Definition IccTagBasic.h:235
virtual icTagTypeSignature GetType() const
Definition IccTagEmbedIcc.h:95

References CIccEmbedIO::CIccEmbedIO(), CIccEmbedIO::Attach(), CIccProfile, CIccTagEmbeddedProfile::GetType(), CIccTag::m_nReserved, CIccTagEmbeddedProfile::m_pProfile, and CIccIO::Read32().

Referenced by CIccTagEmbeddedProfile::Read().

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

◆ ReadAll()

bool CIccTagEmbeddedProfile::ReadAll ( )
virtualinherited

Name: CIccTagEmbedProfile::ReadAll

Purpose: Read all tags associated with the embedded profile

Return: true = successful, false = failure

Reimplemented from CIccTag.

246{
247 if (!m_pProfile)
248 return true;
249
250 return m_pProfile->ReadTags(m_pProfile);
251}

References CIccTagEmbeddedProfile::m_pProfile.

◆ ToXml()

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

Implements CIccTagXml.

5089{
5090 if (!m_pProfile || strcmp(m_pProfile->GetClassName(), "CIccProfileXml")) {
5091 return false;
5092 }
5093
5095
5096 return pProfile->ToXmlWithBlanks(xml, blanks);
5097}
bool ToXmlWithBlanks(std::string &xmlString, std::string blanks)
Definition IccProfileXml.cpp:82

References CIccTagEmbeddedProfile::m_pProfile, and CIccProfileXml::ToXmlWithBlanks().

+ Here is the call graph for this function:

◆ Validate()

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

Name: CIccTagEmbedProfile::Validate

Purpose: Check tag data validity. In base class we only look at the tag's reserved data value

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.

449{
450 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
451
452 CIccInfo Info;
453
454 if (!m_pProfile) {
455 sReport += icMsgValidateWarning;
456 sReport += Info.GetSigPathName(sigPath);
457 sReport += " - No Profile defined for embedded profile tag.\n";
458
460 return rv;
461 }
462
463 rv = icMaxStatus(rv, m_pProfile->Validate(sReport, sigPath));
464
465 if (pProfile) {
466 if (m_pProfile->m_Header.colorSpace != pProfile->m_Header.colorSpace) {
468 sReport += Info.GetSigPathName(sigPath);
469 sReport += " - color space does not match for embedded profile.\n";
470
472 }
473 if (m_pProfile->m_Header.deviceClass != pProfile->m_Header.deviceClass) {
475 sReport += Info.GetSigPathName(sigPath);
476 sReport += " - device class does not match for embedded profile.\n";
477
479 }
480 }
481
482 return rv;
483}
icValidateStatus
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:121
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
ICCPROFLIB_API const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
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(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icValidateCriticalError, icValidateWarning, CIccTagEmbeddedProfile::m_pProfile, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagEmbeddedProfile::Write ( CIccIO pIO)
virtualinherited

Name: CIccTagEmbedProfile::Write

Purpose: Write an unknown tag to a file

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

Return: true = succesful, false = failure

Reimplemented from CIccTag.

268{
269 if (!pIO)
270 return false;
271
272 icTagTypeSignature nType = GetType();
273
274 if (!pIO->Write32(&nType))
275 return false;
276
277 if (!pIO->Write32(&m_nReserved))
278 return false;
279
280
281 if (m_pProfile) {
282 CIccEmbedIO embedIO;
283 if (!embedIO.Attach(pIO))
284 return false;
285
286 icProfileIDSaveMethod bWriteId = (m_pProfile->m_Header.profileID.ID32[0] ||
287 m_pProfile->m_Header.profileID.ID32[1] ||
288 m_pProfile->m_Header.profileID.ID32[2] ||
289 m_pProfile->m_Header.profileID.ID32[3]) ? icAlwaysWriteID : icVersionBasedID;
290 bool rv = m_pProfile->Write(&embedIO, bWriteId);
291 return rv;
292 }
293
294 return true;
295}
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
bool Attach(CIccIO *pIO, icInt32Number nSize=0, bool bOwnIO=false)
Definition IccIO.cpp:519

References CIccEmbedIO::Attach(), CIccTagEmbeddedProfile::GetType(), icProfileID::ID32, CIccTag::m_nReserved, CIccTagEmbeddedProfile::m_pProfile, icHeader::profileID, and CIccIO::Write32().

+ Here is the call graph for this function:

Field Documentation

◆ 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_pProfile


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