86int main(
int argc,
char* argv[])
89 printf(
"Usage: iccV5DspObsToV4Dsp v5DspIccPath v5ObsPcc v4DspIccPath\n");
98 printf(
"Unable to parse '%s'\n", argv[1]);
104 printf(
"%s is not a V5 display profile\n", argv[1]);
111 printf(
"%s doesn't have an AToB1Tag of type mulitProcessElementType\n", argv[1]);
120 ((curveMpe = pTagIn->
GetElement(0))==
nullptr) ||
122 ((matrixMpe = pTagIn->
GetElement(1))==
nullptr) ||
124 printf(
"%s doesn't have a spectral emission AToB1Tag\n", argv[1]);
131 printf(
"Unable to parse '%s'\n", argv[2]);
136 printf(
"%s is not a V5 profile\n", argv[1]);
147 printf(
"%s doesn't have Profile Connection Conditions\n", argv[2]);
153 std::shared_ptr<CIccApplyTagMpe> pApplyMpe = std::shared_ptr<CIccApplyTagMpe>(pTagIn->
GetNewApply());
155 auto applyList = pApplyMpe->GetList();
156 auto applyIter = applyList->begin();
157 auto curveApply = applyIter->ptr;
159 auto mtxApply = applyIter->ptr;
163 std::shared_ptr<CIccApplyTagMpe> pAppyC2S = std::shared_ptr<CIccApplyTagMpe>(pTagC2S->
GetNewApply());
166 CIccProfilePtr pIcc = CIccProfilePtr(
new CIccProfile());
177 text = std::string(
"Display profile from '") + argv[1] +
"' and PCC '" + argv[2] +
"'";
178 pDspText->
SetText(text.c_str());
183 pDspText->
SetText(
"Copyright (C) 2023 International Color Consortium");
194 curveMpe->
Apply(curveApply, out, in);
195 (*pTrcR)[i] = out[0];
196 (*pTrcG)[i] = out[1];
197 (*pTrcB)[i] = out[2];
206 matrixMpe->
Apply(mtxApply, in, rRGB);
207 pTagC2S->
Apply(pAppyC2S.get(), out, in);
210 (*primaryXYZ)[0] =
icDtoF(out[0]); (*primaryXYZ)[1] =
icDtoF(out[1]); (*primaryXYZ)[2] =
icDtoF(out[2]);
213 matrixMpe->
Apply(mtxApply, in, gRGB);
214 pTagC2S->
Apply(pAppyC2S.get(), out, in);
217 (*primaryXYZ)[0] =
icDtoF(out[0]); (*primaryXYZ)[1] =
icDtoF(out[1]); (*primaryXYZ)[2] =
icDtoF(out[2]);
220 matrixMpe->
Apply(mtxApply, in, bRGB);
221 pTagC2S->
Apply(pAppyC2S.get(), out, in);
224 (*primaryXYZ)[0] =
icDtoF(out[0]); (*primaryXYZ)[1] =
icDtoF(out[1]); (*primaryXYZ)[2] =
icDtoF(out[2]);
228 printf(
"%s successfully created\n", argv[3]);
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
bool SaveIccProfile(const icChar *szFilename, CIccProfile *pIcc, icProfileIDSaveMethod nWriteId)
Name: SaveIccProfile.
CIccProfile * ReadIccProfile(const icChar *szFilename, bool bUseSubProfile)
Name: ReadIccProfile.
bool icGetTagText(const CIccTag *pTag, std::string &text)
CIccTagFixedNum< icS15Fixed16Number, icSigS15Fixed16ArrayType > CIccTagS15Fixed16
Class: CIccTagS15Fixed16.
icS15Fixed16Number icDtoF(icFloatNumber num)
std::shared_ptr< CIccProfile > CIccProfileSharedPtr
int main()
Core and external libraries necessary for the fuzzer functionality.
Class: CIccMultiProcessElement.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const =0
virtual icElemTypeSignature GetType() const =0
Class: CIccTagMultiLocalizedUnicode.
void SetText(const icChar *szText, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
Class: CIccTagMultiProcessElement.
icUInt16Number NumInputChannels() const
virtual bool Begin(icElemInterp nInterp=icElemInterpLinear, IIccProfileConnectionConditions *pProfilePCC=NULL, IIccProfileConnectionConditions *pAppliedPCC=NULL, IIccCmmEnvVarLookup *pCmmEnvVarLookup=NULL)
Name: CIccTagMultiProcessElement::Begin.
icUInt16Number NumOutputChannels() const
virtual CIccApplyTagMpe * GetNewApply()
Name: CIccTagMultiProcessElement::GetNewApply.
virtual void Apply(CIccApplyTagMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
Name: CIccTagMultiProcessElement::Apply.
icUInt32Number NumElements() const
CIccMultiProcessElement * GetElement(int nIndex)
Name: CIccTagMultiProcessElement::GetElement.
Class: CIccTagSpectralViewingConditions.