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

Class: CIccTagLutAtoB. More...

#include <IccTagLut.h>

+ Inheritance diagram for CIccTagLutAtoB:
+ Collaboration diagram for CIccTagLutAtoB:

Public Member Functions

 CIccTagLutAtoB ()
 Name: CIccTagLutAtoB::CIccTagLutAtoB.
 
 CIccTagLutAtoB (const CIccTagLutAtoB &ITLA2B)
 Name: CIccTagLutAtoB::CIccTagLutAtoB.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagLutAtoBoperator= (const CIccTagLutAtoB &ITLA2B)
 Name: CIccTagLutAtoB::operator=.
 
bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagLutAtoB::Read.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
 Name: CIccTagLutAtoB::Validate.
 
bool Write (CIccIO *pIO)
 Name: CIccTagLutAtoB::Write.
 
virtual ~CIccTagLutAtoB ()
 Name: CIccTagLutAtoB::~CIccTagLutAtoB.
 
- Public Member Functions inherited from CIccMBB
 CIccMBB ()
 Name: CIccMBB::CIccMBB.
 
 CIccMBB (const CIccMBB &IMBB)
 Name: CIccMBB::CIccMBB.
 
void Cleanup ()
 Name: CIccMBB::Cleanup.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccMBB::Describe.
 
CIccCLUTGetCLUT () const
 
icColorSpaceSignature GetCsInput ()
 
icColorSpaceSignature GetCsOutput ()
 
LPIccCurveGetCurvesA () const
 
LPIccCurveGetCurvesB () const
 
LPIccCurveGetCurvesM () const
 
CIccMatrixGetMatrix () const
 
virtual icUInt8Number GetPrecision ()
 
void Init (icUInt8Number nInputChannels, icUInt8Number nOutputChannels)
 Name: CIccMBB::Init.
 
icUInt8Number InputChannels () const
 
bool IsInputB ()
 
virtual bool IsInputMatrix ()
 
virtual bool IsMBBType ()
 
CIccCLUTNewCLUT (icUInt8Number *pGridPoints, icUInt8Number nPrecision=2)
 Name: CIccMBB::NewCLUT.
 
CIccCLUTNewCLUT (icUInt8Number nGridPoints, icUInt8Number nPrecision=2)
 Name: CIccMBB::NewCLUT.
 
LPIccCurveNewCurvesA ()
 Name: CIccMBB::NewCurvesA.
 
LPIccCurveNewCurvesB ()
 Name: CIccMBB::NewCurvesB.
 
LPIccCurveNewCurvesM ()
 Name: CIccMBB::NewCurvesM.
 
CIccMatrixNewMatrix ()
 Name: CIccMBB::NewMatrix.
 
CIccMBBoperator= (const CIccMBB &IMBB)
 Name: CIccMBB::operator=.
 
icUInt8Number OutputChannels () const
 
CIccCLUTSetCLUT (CIccCLUT *clut)
 Name: CIccMBB::SetCLUT.
 
virtual void SetColorSpaces (icColorSpaceSignature csInput, icColorSpaceSignature csOutput)
 Name: CIccMBB::SetColorSpaces.
 
bool SwapMBCurves ()
 
virtual bool UseLegacyPCS () const
 
virtual ~CIccMBB ()
 Name: CIccMBB::~CIccMBB.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual const icCharGetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsArrayType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
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.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Attributes

icUInt16Number m_nReservedWord
 
- Protected Attributes inherited from CIccMBB
bool m_bInputMatrix
 
bool m_bUseMCurvesAsBCurves
 
CIccCLUTm_CLUT
 
icColorSpaceSignature m_csInput
 
icColorSpaceSignature m_csOutput
 
LPIccCurvem_CurvesA
 
LPIccCurvem_CurvesB
 
LPIccCurvem_CurvesM
 
CIccMatrixm_Matrix
 
icUInt8Number m_nInput
 
icUInt8Number m_nOutput
 

Additional Inherited Members

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

Detailed Description

Class: CIccTagLutAtoB.

Purpose: The LutA2B tag type

Definition at line 501 of file IccTagLut.h.

Constructor & Destructor Documentation

◆ CIccTagLutAtoB() [1/2]

CIccTagLutAtoB::CIccTagLutAtoB ( )

Name: CIccTagLutAtoB::CIccTagLutAtoB.

Purpose: Constructor

Definition at line 3833 of file IccTagLut.cpp.

3834{
3835 m_bInputMatrix = false;
3836 m_nReservedWord = 0;
3837}
bool m_bInputMatrix
Definition IccTagLut.h:477
icUInt16Number m_nReservedWord
Definition IccTagLut.h:517

◆ CIccTagLutAtoB() [2/2]

CIccTagLutAtoB::CIccTagLutAtoB ( const CIccTagLutAtoB & ITLA2B)

Name: CIccTagLutAtoB::CIccTagLutAtoB.

Purpose: Copy Constructor

Args: ITLA2B = The CIccTagLutAtoB object to be copied

Definition at line 3850 of file IccTagLut.cpp.

3850 : CIccMBB(ITLA2B)
3851{
3852 m_nReservedWord = 0;
3853}
CIccMBB()
Name: CIccMBB::CIccMBB.

References m_nReservedWord.

◆ ~CIccTagLutAtoB()

CIccTagLutAtoB::~CIccTagLutAtoB ( )
virtual

Name: CIccTagLutAtoB::~CIccTagLutAtoB.

Purpose: Destructor

Definition at line 3885 of file IccTagLut.cpp.

3886{
3887}

Member Function Documentation

◆ GetType()

virtual icTagTypeSignature CIccTagLutAtoB::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagLutBtoA.

Definition at line 510 of file IccTagLut.h.

510{ return icSigLutAtoBType; }
@ icSigLutAtoBType

References icSigLutAtoBType.

Referenced by Read(), Validate(), and Write().

+ Here is the caller graph for this function:

◆ NewCopy()

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

Reimplemented in CIccTagLutBtoA.

Definition at line 507 of file IccTagLut.h.

507{ return new CIccTagLutAtoB(*this); }
CIccTagLutAtoB()
Name: CIccTagLutAtoB::CIccTagLutAtoB.

◆ operator=()

CIccTagLutAtoB & CIccTagLutAtoB::operator= ( const CIccTagLutAtoB & ITLA2B)

Name: CIccTagLutAtoB::operator=.

Purpose: Copy Operator

Args: ITLA2B = The CIccTagLutAtoB object to be copied

Definition at line 3866 of file IccTagLut.cpp.

3867{
3868 if (&ITLA2B == this)
3869 return *this;
3870
3871 CIccMBB::operator=(ITLA2B);
3872
3873 return *this;
3874}
CIccMBB & operator=(const CIccMBB &IMBB)
Name: CIccMBB::operator=.

References CIccMBB::operator=().

+ Here is the call graph for this function:

◆ Read()

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

Name: CIccTagLutAtoB::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.

Definition at line 3904 of file IccTagLut.cpp.

3905{
3907 icUInt32Number Offset[5], nStart, nEnd, nPos;
3908 icUInt8Number nCurves, i;
3909
3910 if (size<8*sizeof(icUInt32Number) || !pIO) {
3911 return false;
3912 }
3913
3914 nStart = pIO->Tell();
3915 nEnd = nStart + size;
3916
3917 if (!pIO->Read32(&sig) ||
3918 !pIO->Read32(&m_nReserved) ||
3919 !pIO->Read8(&m_nInput) ||
3920 !pIO->Read8(&m_nOutput) ||
3921 !pIO->Read16(&m_nReservedWord) ||
3922 pIO->Read32(Offset, 5)!=5)
3923 return false;
3924
3925 if (sig!=GetType())
3926 return false;
3927
3928 //B Curves
3929 if (Offset[0]) {
3930 nCurves = IsInputB() ? m_nInput : m_nOutput;
3931 LPIccCurve *pCurves = NewCurvesB();
3932
3933 if (pIO->Seek(nStart + Offset[0], icSeekSet)<0)
3934 return false;
3935
3936 for (i=0; i<nCurves; i++) {
3937 nPos = pIO->Tell();
3938
3939 if (!pIO->Read32(&sig))
3940 return false;
3941
3942 if (pIO->Seek(nPos, icSeekSet)<0)
3943 return false;
3944
3945 if (sig!=icSigCurveType &&
3947 return false;
3948
3949 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
3950
3951 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
3952 return false;
3953
3954 if (!pIO->Sync32(Offset[1]))
3955 return false;
3956 }
3957 }
3958
3959 //Matrix
3960 if (Offset[1]) {
3962
3963 if (Offset[1] + 12*sizeof(icS15Fixed16Number) >size)
3964 return false;
3965
3966 m_Matrix = new CIccMatrix();
3967
3968 if (pIO->Seek(nStart + Offset[1], icSeekSet)<0)
3969 return false;
3970
3971 for (i=0; i<12; i++) {
3972 if (pIO->Read32(&tmp, 1)!=1)
3973 return false;
3974 m_Matrix->m_e[i] = icFtoD(tmp);
3975 }
3976 }
3977
3978
3979 //M Curves
3980 if (Offset[2]) {
3981 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
3982 LPIccCurve *pCurves = NewCurvesM();
3983
3984 if (pIO->Seek(nStart + Offset[2], icSeekSet)<0)
3985 return false;
3986
3987 for (i=0; i<nCurves; i++) {
3988 nPos = pIO->Tell();
3989
3990 if (!pIO->Read32(&sig))
3991 return false;
3992
3993 if (pIO->Seek(nPos, icSeekSet)<0)
3994 return false;
3995
3996 if (sig!=icSigCurveType &&
3998 return false;
3999
4000 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
4001
4002 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
4003 return false;
4004
4005 if (!pIO->Sync32(Offset[2]))
4006 return false;
4007 }
4008 }
4009
4010 //CLUT
4011 if (Offset[3]) {
4012 if (pIO->Seek(nStart + Offset[3], icSeekSet)<0)
4013 return false;
4014
4016
4017 if (!m_CLUT->Read(nEnd - pIO->Tell(), pIO))
4018 return false;
4019 }
4020
4021 //A Curves
4022 if (Offset[4]) {
4023 nCurves = !IsInputB() ? m_nInput : m_nOutput;
4024 LPIccCurve *pCurves = NewCurvesA();
4025
4026 if (pIO->Seek(nStart + Offset[4], icSeekSet)<0)
4027 return false;
4028
4029 for (i=0; i<nCurves; i++) {
4030 nPos = pIO->Tell();
4031
4032 if (!pIO->Read32(&sig))
4033 return false;
4034
4035 if (pIO->Seek(nPos, icSeekSet)<0)
4036 return false;
4037
4038 if (sig!=icSigCurveType &&
4040 return false;
4041
4042 pCurves[i] = (CIccCurve*)CIccTag::Create(sig);
4043
4044 if (!pCurves[i]->Read(nEnd - pIO->Tell(), pIO))
4045 return false;
4046
4047 if (!pIO->Sync32(Offset[4]))
4048 return false;
4049 }
4050 }
4051 return true;
4052}
icArraySignature sig
@ icSeekSet
Definition IccIO.h:83
icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
icTagTypeSignature
unsigned int icUInt32Number
Class: CIccCLUT.
Definition IccTagLut.h:326
bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccCLUT::Read.
Class: CIccCurve.
Definition IccTagLut.h:91
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
virtual icInt32Number Tell()
Definition IccIO.h:133
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
Definition IccIO.h:132
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
bool Sync32(icUInt32Number nOffset=0)
Operation to make sure read position is evenly divisible by 4.
Definition IccIO.cpp:357
bool IsInputB()
Definition IccTagLut.h:445
LPIccCurve * NewCurvesB()
Name: CIccMBB::NewCurvesB.
virtual bool IsInputMatrix()
Definition IccTagLut.h:442
CIccCLUT * m_CLUT
Definition IccTagLut.h:487
LPIccCurve * NewCurvesM()
Name: CIccMBB::NewCurvesM.
icUInt8Number m_nOutput
Definition IccTagLut.h:481
LPIccCurve * NewCurvesA()
Name: CIccMBB::NewCurvesA.
icUInt8Number m_nInput
Definition IccTagLut.h:480
CIccMatrix * m_Matrix
Definition IccTagLut.h:488
Class: CIccMatrix.
Definition IccTagLut.h:260
icFloatNumber m_e[12]
Definition IccTagLut.h:269
icUInt32Number m_nReserved
static CIccTag * Create(icTagTypeSignature sig)
Name: CIccTag::Create.
virtual icTagTypeSignature GetType() const
Function: GetType()
Definition IccTagLut.h:510
bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccTagLutAtoB::Read.
unsigned char icUInt8Number
Number definitions.
@ icSigParametricCurveType
@ icSigCurveType
icInt32Number icS15Fixed16Number
Fixed numbers.

References CIccTag::Create(), GetType(), icFtoD(), icSeekSet, icSigCurveType, icSigParametricCurveType, CIccMBB::IsInputB(), CIccMBB::IsInputMatrix(), CIccMBB::m_CLUT, CIccMatrix::m_e, CIccMBB::m_Matrix, CIccMBB::m_nInput, CIccMBB::m_nOutput, CIccTag::m_nReserved, m_nReservedWord, CIccMBB::NewCurvesA(), CIccMBB::NewCurvesB(), CIccMBB::NewCurvesM(), CIccCLUT::Read(), Read(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), CIccIO::Seek(), sig, CIccIO::Sync32(), and CIccIO::Tell().

Referenced by Read().

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

◆ Validate()

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

Name: CIccTagLutAtoB::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 CIccMBB.

Reimplemented in CIccTagLutBtoA.

Definition at line 4191 of file IccTagLut.cpp.

4192{
4193 icValidateStatus rv = CIccMBB::Validate(sigPath, sReport, pProfile);
4194
4195 CIccInfo Info;
4196 std::string sSigPathName = Info.GetSigPathName(sigPath);
4198
4199 if (!pProfile) {
4200 return rv;
4201 }
4202
4203 switch(sig) {
4204 case icSigAToB0Tag:
4205 case icSigAToB1Tag:
4206 case icSigAToB2Tag:
4207 {
4208 icUInt32Number nInput = icGetSpaceSamples(pProfile->m_Header.colorSpace);
4209
4210 icUInt32Number nOutput = icGetSpaceSamples(pProfile->m_Header.pcs);
4211
4212 icUInt8Number i;
4213 if (m_CurvesB) {
4214 for (i=0; i<nOutput; i++) {
4215 if (m_CurvesB[i]) {
4216 rv = icMaxStatus(rv, m_CurvesB[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4217 }
4218 else {
4219 sReport += icMsgValidateCriticalError;
4220 sReport += sSigPathName;
4221 sReport += " - Incorrect number of B-curves.\n";
4223 }
4224 }
4225 }
4226
4227 if (m_CurvesM) {
4228 for (i=0; i<nOutput; i++) {
4229 if (m_CurvesM[i]) {
4230 rv = icMaxStatus(rv, m_CurvesM[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4231 }
4232 else {
4233 sReport += icMsgValidateCriticalError;
4234 sReport += sSigPathName;
4235 sReport += " - Incorrect number of M-curves.\n";
4237 }
4238 }
4239 }
4240
4241 if (m_CurvesA) {
4242 if (!m_CLUT) {
4243 sReport += icMsgValidateNonCompliant;
4244 sReport += sSigPathName;
4245 sReport += " - CLUT must be present if using A-curves.\n";
4246
4248 }
4249
4250 for (i=0; i<nInput; i++) {
4251 if (m_CurvesA[i]) {
4252 rv = icMaxStatus(rv, m_CurvesA[i]->Validate(sigPath+icGetSigPath(GetType()), sReport, pProfile));
4253 }
4254 else {
4255 sReport += icMsgValidateCriticalError;
4256 sReport += sSigPathName;
4257 sReport += " - Incorrect number of A-curves.\n";
4259 }
4260 }
4261
4262 }
4263
4264 break;
4265 }
4266 default:
4267 {
4268 }
4269 }
4270
4271
4272 return rv;
4273}
icValidateStatus
Definition IccDefs.h:118
@ icValidateCriticalError
Definition IccDefs.h:122
@ icValidateNonCompliant
Definition IccDefs.h:121
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
std::string icGetSigPath(icUInt32Number nSig)
Definition IccUtil.cpp:1191
icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
LPIccCurve * m_CurvesB
Definition IccTagLut.h:490
LPIccCurve * m_CurvesM
Definition IccTagLut.h:489
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
Name: CIccMBB::Validate.
LPIccCurve * m_CurvesA
Definition IccTagLut.h:486
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL)
Name: CIccTagLutAtoB::Validate.
icUInt32Number icSignature
@ icSigAToB0Tag
@ icSigAToB2Tag
@ icSigAToB1Tag

References CIccInfo::GetSigPathName(), GetType(), icGetFirstSigPathSig(), icGetSigPath(), icGetSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icMsgValidateNonCompliant, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icValidateCriticalError, icValidateNonCompliant, CIccMBB::m_CLUT, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, sig, CIccMBB::Validate(), and Validate().

Referenced by Validate().

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

◆ Write()

bool CIccTagLutAtoB::Write ( CIccIO * pIO)
virtual

Name: CIccTagLutAtoB::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.

Definition at line 4069 of file IccTagLut.cpp.

4070{
4072 icUInt32Number Offset[5], nStart, nEnd, nOffsetPos;
4073 icUInt8Number nCurves, i;
4074
4075 nStart = pIO->Tell();
4076 memset(&Offset[0], 0, sizeof(Offset));
4077
4078 if (!pIO->Write32(&sig) ||
4079 !pIO->Write32(&m_nReserved) ||
4080 !pIO->Write8(&m_nInput) ||
4081 !pIO->Write8(&m_nOutput) ||
4082 !pIO->Write16(&m_nReservedWord))
4083 return false;
4084
4085 nOffsetPos = pIO->Tell();
4086 if (pIO->Write32(Offset, 5)!=5)
4087 return false;
4088
4089 //B Curves
4090 if (m_CurvesB) {
4091 Offset[0] = pIO->Tell() - nStart;
4092 nCurves = IsInputB() ? m_nInput : m_nOutput;
4093
4094 for (i=0; i<nCurves; i++) {
4095 if (!m_CurvesB[i])
4096 return false;
4097
4098 if (!m_CurvesB[i]->Write(pIO))
4099 return false;
4100
4101 if (!pIO->Align32())
4102 return false;
4103 }
4104 }
4105
4106 //Matrix
4107 if (m_Matrix) {
4109
4110 Offset[1] = pIO->Tell() - nStart;
4111
4112 for (i=0; i<12; i++) {
4113 tmp = icDtoF(m_Matrix->m_e[i]);
4114 if (pIO->Write32(&tmp, 1)!=1)
4115 return false;
4116 }
4117 }
4118
4119
4120 //M Curves
4121 if (m_CurvesM) {
4122 Offset[2] = pIO->Tell() - nStart;
4123 nCurves = IsInputMatrix() ? m_nInput : m_nOutput;
4124
4125 for (i=0; i<nCurves; i++) {
4126 if (!m_CurvesM[i])
4127 return false;
4128
4129 if (!m_CurvesM[i]->Write(pIO))
4130 return false;
4131
4132 if (!pIO->Align32())
4133 return false;
4134 }
4135 }
4136
4137 //CLUT
4138 if (m_CLUT) {
4139 Offset[3] = pIO->Tell() - nStart;
4140
4141 if (!m_CLUT->Write(pIO))
4142 return false;
4143
4144 if (!pIO->Align32())
4145 return false;
4146 }
4147
4148 //A Curves
4149 if (m_CurvesA) {
4150 Offset[4] = pIO->Tell() - nStart;
4151 nCurves = !IsInputB() ? m_nInput : m_nOutput;
4152
4153 for (i=0; i<nCurves; i++) {
4154 if (!m_CurvesA[i])
4155 return false;
4156
4157 if (!m_CurvesA[i]->Write(pIO))
4158 return false;
4159
4160 if (!pIO->Align32())
4161 return false;
4162 }
4163 }
4164
4165 nEnd = pIO->Tell();
4166
4167 if (!pIO->Seek(nOffsetPos, icSeekSet))
4168 return false;
4169
4170 if (pIO->Write32(&Offset[0], 5)!=5)
4171 return false;
4172
4173 return pIO->Seek(nEnd, icSeekSet)>=0;
4174}
icS15Fixed16Number icDtoF(icFloatNumber num)
Definition IccUtil.cpp:545
bool Write(CIccIO *pIO)
Name: CIccCLUT::Write.
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
Definition IccIO.cpp:341
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
bool Write(CIccIO *pIO)
Name: CIccTagLutAtoB::Write.

References CIccIO::Align32(), GetType(), icDtoF(), icSeekSet, CIccMBB::IsInputB(), CIccMBB::IsInputMatrix(), CIccMBB::m_CLUT, CIccMBB::m_CurvesA, CIccMBB::m_CurvesB, CIccMBB::m_CurvesM, CIccMatrix::m_e, CIccMBB::m_Matrix, CIccMBB::m_nInput, CIccMBB::m_nOutput, CIccTag::m_nReserved, m_nReservedWord, CIccIO::Seek(), sig, CIccIO::Tell(), CIccCLUT::Write(), Write(), CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

Referenced by Write().

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

Member Data Documentation

◆ m_nReservedWord

icUInt16Number CIccTagLutAtoB::m_nReservedWord
protected

Definition at line 517 of file IccTagLut.h.

Referenced by CIccTagLutAtoB(), Read(), and Write().


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