Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccTagEmbeddedProfile Class Reference

Class: IccTagEmbeddedProfile. More...

#include <IccTagEmbedIcc.h>

+ Inheritance diagram for CIccTagEmbeddedProfile:
+ Collaboration diagram for CIccTagEmbeddedProfile:

Public Member Functions

 CIccTagEmbeddedProfile ()
 Name: CIccTagEmbedProfile::CIccTagEmbedProfile.
 
 CIccTagEmbeddedProfile (const CIccTagEmbeddedProfile &ITU)
 Name: CIccTagEmbedProfile::CIccTagEmbedProfile.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagEmbedProfile::Describe.
 
virtual const icCharGetClassName () const
 
virtual CIccProfile * GetProfile () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagEmbeddedProfileoperator= (const CIccTagEmbeddedProfile &UnknownTag)
 Name: CIccTagEmbedProfile::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Name: CIccTagEmbedProfile::Read.
 
virtual bool ReadAll ()
 Name: CIccTagEmbedProfile::ReadAll.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagEmbedProfile::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagEmbedProfile::Write.
 
virtual ~CIccTagEmbeddedProfile ()
 Name: CIccTagEmbedProfile::~CIccTagEmbedProfile.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Public Attributes

CIccProfile * m_pProfile
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 

Detailed Description

Class: IccTagEmbeddedProfile.

Purpose: This "private" tag is used to embed a profile within a profile allowing for v5 profiles to be embedded in v2/v4 profiles

Definition at line 84 of file IccTagEmbedIcc.h.

Constructor & Destructor Documentation

◆ CIccTagEmbeddedProfile() [1/2]

CIccTagEmbeddedProfile::CIccTagEmbeddedProfile ( )

Name: CIccTagEmbedProfile::CIccTagEmbedProfile.

Purpose: Constructor

Definition at line 93 of file IccTagEmbedIcc.cpp.

94{
95 m_pProfile = NULL;
96}

References m_pProfile.

◆ CIccTagEmbeddedProfile() [2/2]

CIccTagEmbeddedProfile::CIccTagEmbeddedProfile ( const CIccTagEmbeddedProfile & ITEP)

Name: CIccTagEmbedProfile::CIccTagEmbedProfile.

Purpose: Copy Constructor

Args: ITU = The CIccTagEmbedProfile object to be copied

Definition at line 108 of file IccTagEmbedIcc.cpp.

109{
110 if (ITEP.m_pProfile) {
111 m_pProfile = ITEP.m_pProfile->NewCopy();
112 }
113 else
114 m_pProfile = NULL;
115}

References m_pProfile.

◆ ~CIccTagEmbeddedProfile()

CIccTagEmbeddedProfile::~CIccTagEmbeddedProfile ( )
virtual

Name: CIccTagEmbedProfile::~CIccTagEmbedProfile.

Purpose: Destructor

Definition at line 150 of file IccTagEmbedIcc.cpp.

151{
152 if (m_pProfile)
153 delete m_pProfile;
154}

References m_pProfile.

Member Function Documentation

◆ Describe()

void CIccTagEmbeddedProfile::Describe ( std::string & sDescription,
int nVerboseness )
virtual

Name: CIccTagEmbedProfile::Describe.

Purpose: Dump data associated with unknown tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

Definition at line 308 of file IccTagEmbedIcc.cpp.

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}
icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
icFloatNumber icF16toF(icFloat16Number num)
Definition IccUtil.cpp:629
const icChar * icGetSig(icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
Definition IccUtil.cpp:1028
Type: Class.
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
icColorSpaceSignature
Color Space Signatures.
#define icVersionNumberV5
icRenderingIntent
Rendering Intents, used in the profile header.
icCmmSignature
CMM signatures from the signature registry (as of Mar 6, 2018)
icUInt16Number year
icUInt16Number month
icUInt16Number minutes
icUInt16Number seconds
icUInt16Number hours
icUInt16Number day
The Profile header.
icSpectralRange spectralRange
icXYZNumber illuminant
icUInt32Number renderingIntent
icUInt64Number attributes
icColorSpaceSignature colorSpace
icProfileClassSignature deviceClass
icSignature deviceSubClass
icSignature cmmId
icSpectralColorSignature spectralPCS
icDateTimeNumber date
icPlatformSignature platform
icSignature creator
icUInt32Number flags
icUInt32Number version
icMaterialColorSignature mcs
icProfileID profileID
icUInt32Number size
icSpectralRange biSpectralRange
icColorSpaceSignature pcs
icUInt16Number steps
icFloat16Number start
icFloat16Number end
icS15Fixed16Number Y
icS15Fixed16Number Z
icS15Fixed16Number X

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(), icVersionNumberV5, icHeader::illuminant, CIccInfo::IsProfileIDCalculated(), m_pProfile, icHeader::mcs, icDateTimeNumber::minutes, icDateTimeNumber::month, icHeader::pcs, icHeader::platform, icHeader::profileID, icHeader::renderingIntent, icDateTimeNumber::seconds, 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:

◆ GetClassName()

virtual const icChar * CIccTagEmbeddedProfile::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

Definition at line 96 of file IccTagEmbedIcc.h.

96{ return "CIccTagEmbeddedProfile"; }

◆ GetProfile()

virtual CIccProfile * CIccTagEmbeddedProfile::GetProfile ( ) const
inlinevirtual

Definition at line 98 of file IccTagEmbedIcc.h.

98{ return m_pProfile; }

◆ GetType()

virtual icTagTypeSignature CIccTagEmbeddedProfile::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

Definition at line 95 of file IccTagEmbedIcc.h.

@ icSigEmbeddedProfileType

References icSigEmbeddedProfileType.

Referenced by Read(), and Write().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccTagEmbeddedProfile::IsSupported ( )
inlinevirtual

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.

Definition at line 93 of file IccTagEmbedIcc.h.

93{ return true; }

◆ NewCopy()

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

Definition at line 90 of file IccTagEmbedIcc.h.

90{ return new CIccTagEmbeddedProfile(*this); }
CIccTagEmbeddedProfile()
Name: CIccTagEmbedProfile::CIccTagEmbedProfile.

◆ operator=()

CIccTagEmbeddedProfile & CIccTagEmbeddedProfile::operator= ( const CIccTagEmbeddedProfile & ITEP)

Name: CIccTagEmbedProfile::operator=.

Purpose: Copy Operator

Args: UnknownTag = The CIccTagEmbedProfile object to be copied

Definition at line 127 of file IccTagEmbedIcc.cpp.

128{
129 if (&ITEP == this)
130 return *this;
131
132 if (m_pProfile)
133 delete m_pProfile;
134
135 if (ITEP.m_pProfile)
136 m_pProfile = ITEP.m_pProfile->NewCopy();
137 else
138 m_pProfile = NULL;
139
140 return *this;
141}

References m_pProfile.

◆ Read() [1/2]

virtual bool CIccTagEmbeddedProfile::Read ( icUInt32Number size,
CIccIO * pIO )
inlinevirtual

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.

Definition at line 100 of file IccTagEmbedIcc.h.

100{ return Read(size, pIO, NULL); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Function: Read(size, pIO) - Read tag from file.

References Read().

Referenced by Read().

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

◆ Read() [2/2]

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

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.

Definition at line 172 of file IccTagEmbedIcc.cpp.

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
Type: Class.
Definition IccIO.h:185
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
virtual icTagTypeSignature GetType() const
Function: GetType()
icUInt32Number m_nReserved

References GetType(), CIccTag::m_nReserved, m_pProfile, and CIccIO::Read32().

+ Here is the call graph for this function:

◆ ReadAll()

bool CIccTagEmbeddedProfile::ReadAll ( )
virtual

Name: CIccTagEmbedProfile::ReadAll.

Purpose: Read all tags associated with the embedded profile

Return: true = successful, false = failure

Reimplemented from CIccTag.

Definition at line 245 of file IccTagEmbedIcc.cpp.

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

References m_pProfile.

◆ Validate()

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

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.

Definition at line 448 of file IccTagEmbedIcc.cpp.

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:118
@ icValidateWarning
Definition IccDefs.h:120
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
const char * icMsgValidateWarning
Definition IccUtil.cpp:90
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Function: Validate Each derived tag will implement it's own IsValid() function.

References CIccInfo::GetSigPathName(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateWarning, icValidateCriticalError, icValidateWarning, m_pProfile, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagEmbeddedProfile::Write ( CIccIO * pIO)
virtual

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.

Definition at line 267 of file IccTagEmbedIcc.cpp.

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}
bool Attach(CIccIO *pIO, icInt32Number nSize=0, bool bOwnIO=false)
Definition IccIO.cpp:519
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152

References CIccEmbedIO::Attach(), GetType(), CIccTag::m_nReserved, m_pProfile, and CIccIO::Write32().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_pProfile

CIccProfile* CIccTagEmbeddedProfile::m_pProfile

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