Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
iccApplyNamedCmm.cpp
Go to the documentation of this file.
1/*
2 File: IccApplyNamedCmm.cpp
3
4 Contains: Console app that applies profiles to text data geting test results
5
6 Version: V1
7
8 Copyright: (c) see below
9*/
10
11/*
12 * The ICC Software License, Version 0.2
13 *
14 *
15 * Copyright (c) 2003-2023 The International Color Consortium. All rights
16 * reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 *
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 *
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in
27 * the documentation and/or other materials provided with the
28 * distribution.
29 *
30 * 3. In the absence of prior written permission, the names "ICC" and "The
31 * International Color Consortium" must not be used to imply that the
32 * ICC organization endorses or promotes products derived from this
33 * software.
34 *
35 *
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
40 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 * SUCH DAMAGE.
48 * ====================================================================
49 *
50 * This software consists of voluntary contributions made by many
51 * individuals on behalf of the The International Color Consortium.
52 *
53 *
54 * Membership in the ICC is encouraged when this software is used for
55 * commercial purposes.
56 *
57 *
58 * For more information on The International Color Consortium, please
59 * see <http://www.color.org/>.
60 *
61 *
62 */
63
64 //////////////////////////////////////////////////////////////////////
65 // HISTORY:
66 //
67 // -Initial implementation by Max Derhak 5-15-2003
68 // -Modification to support iccMAX by Max Derhak in 2014
69 // -Addition of JSON configuraiton by Max Derhak in 2024
70 //
71 //////////////////////////////////////////////////////////////////////
72
73
74#include "IccCmm.h"
75#include "IccUtil.h"
76#include "IccDefs.h"
77#include "IccApplyBPC.h"
78#include "IccEnvVar.h"
79#include "IccMpeCalc.h"
80#include "IccProfLibVer.h"
81#include "..\IccCommon\IccCmmConfig.h"
82
83
84using namespace nlohmann;
85
86//----------------------------------------------------
87// Function Declarations
88//----------------------------------------------------
89#define IsSpacePCS(x) ((x)==icSigXYZData || (x)==icSigLabData)
90
91
92
94{
95public:
96
97 virtual ~CIccLogDebugger() {}
98
99 void reset()
100 {
101 m_log.clear();
102 }
103
104 std::list<std::string> m_log;
105
106 virtual void BeginApply()
107 {
108 m_log.push_back("Begin Calc Apply");
109 }
110
111 virtual void EndApply()
112 {
113 m_log.push_back("End Calculator Apply");
114 m_log.push_back("");
115 }
116
117 virtual bool BeforeOp(SIccCalcOp* op, SIccOpState& os, SIccCalcOp* ops)
118 {
119 if (op->sig == icSigIfOp || op->sig == icSigSelectOp) {
120 std::string str = "Start:";
121 std::string opDesc;
122 op->Describe(opDesc, 100);
123 char buf[200];
124 sprintf(buf, "%7s ", opDesc.c_str());
125 str += buf;
126 for (int j = 0; j < (int)os.pStack->size(); j++) {
127 sprintf(buf, " %.4f", (*os.pStack)[j]);
128 str += buf;
129 }
130 m_log.push_back(str);
131 }
132 return false;
133 }
134
135 virtual bool AfterOp(SIccCalcOp* op, SIccOpState& os, SIccCalcOp* ops)
136 {
137 std::string str;
138 char buf[200];
139 if (op->sig == icSigDataOp) {
140 sprintf(buf, "%13s ", "data");
141 str = buf;
142 }
143 else {
144 bool bEnd = false;
145 if (op->sig == icSigIfOp || op->sig == icSigSelectOp) {
146 str += "End: ";
147 bEnd = true;
148 }
149 std::string opDesc;
150 op->Describe(opDesc, 100);
151
152 if (bEnd)
153 sprintf(buf, "%7s ", opDesc.c_str());
154 else
155 sprintf(buf, "%13s ", opDesc.c_str());
156 str += buf;
157 }
158
159 for (int j = 0; j < (int)os.pStack->size(); j++) {
160 sprintf(buf, " %.4f", (*os.pStack)[j]);
161 str += buf;
162 }
163 m_log.push_back(str);
164
165 if (op->sig == icSigIfOp || op->sig == icSigSelectOp)
166 m_log.push_back("");
167
168 return false;
169 }
170 virtual void Error(const char* szMsg)
171 {
172 m_log.push_back(szMsg);
173 }
174};
175
176typedef std::shared_ptr<CIccLogDebugger> LogDebuggerPtr;
177
178//----------------------------------------------------
179// Function Definitions
180//----------------------------------------------------
181
182
183typedef std::list<CIccProfile*> IccProfilePtrList;
184
185void Usage()
186{
187 printf("iccApplyNamedCmm built with IccProfLib version " ICCPROFLIBVER "\n\n");
188
189 printf("Usage 1: iccApplyNamedCmm -cfg config_file_path\n");
190 printf(" Where config_file_path is a json formatted ICC profile aplication configuration file\n\n");
191 printf("Usage 2: iccApplyNamedCmm {-debugcalc} data_file_path final_data_encoding{:FmtPrecision{:FmtDigits}} interpolation {{-ENV:Name value} profile_file_path Rendering_intent {-PCC connection_conditions_path}}\n\n");
192 printf("Built with IccProfLib version " ICCPROFLIBVER "\n");
193
194 printf(" For final_data_encoding:\n");
195 printf(" 0 - icEncodeValue (converts to/from lab encoding when samples=3)\n");
196 printf(" 1 - icEncodePercent\n");
197 printf(" 2 - icEncodeUnitFloat (may clip to 0.0 to 1.0)\n");
198 printf(" 3 - icEncodeFloat\n");
199 printf(" 4 - icEncode8Bit\n");
200 printf(" 5 - icEncode16Bit\n");
201 printf(" 6 - icEncode16BitV2\n\n");
202
203 printf(" FmtPrecision - formatting for # of digits after decimal (default=4)\n");
204 printf(" FmtDigits - formatting for total # of digits (default=5+FmtPrecision)\n\n");
205
206 printf(" For interpolation:\n");
207 printf(" 0 - Linear\n");
208 printf(" 1 - Tetrahedral\n\n");
209
210 printf(" For Rendering_intent:\n");
211 printf(" 0 - Perceptual\n");
212 printf(" 1 - Relative\n");
213 printf(" 2 - Saturation\n");
214 printf(" 3 - Absolute\n");
215 printf(" 10 + Intent - without D2Bx/B2Dx\n");
216 printf(" 20 + Intent - Preview\n");
217 printf(" 30 - Gamut\n");
218 printf(" 33 - Gamut Absolute\n");
219 printf(" 40 + Intent - with BPC\n");
220 printf(" 50 - BDRF Model\n");
221 printf(" 60 - BDRF Light\n");
222 printf(" 70 - BDRF Output\n");
223 printf(" 80 - MCS connection\n");
224 printf(" 90 + Intent - Colorimetric Only\n");
225 printf(" 100 + Intent - Spectral Only\n");
226 printf(" +1000 - Use Luminance based PCS adjustment\n");
227 printf(" +10000 - Use V5 sub-profile if present\n");
228 printf("+100000 - Use HToS tag if present\n");
229}
230
231
232//===================================================
233
234int main(int argc, const char* argv[])
235{
236 int minargs = 2;
237 if (argc < minargs) {
238 Usage();
239 return -1;
240 }
241
242 CIccCfgDataApply cfgApply;
243 CIccCfgProfileSequence cfgProfiles;
244 CIccCfgColorData cfgData;
245
246 if (argc > 2 && !stricmp(argv[1], "-cfg")) {
247 json cfg;
248 if (!loadJsonFrom(cfg, argv[2]) || !cfg.is_object()) {
249 printf("Unable to read configuration from '%s'\n", argv[2]);
250 return -1;
251 }
252
253 if (cfg.find("dataFiles") == cfg.end() || !cfgApply.fromJson(cfg["dataFiles"])) {
254 printf("Unable to parse dataFile configuration from '%s'\n", argv[2]);
255 return -1;
256 }
257
258 if (cfg.find("profileSequence") == cfg.end() || !cfgProfiles.fromJson(cfg["profileSequence"])) {
259 printf("Unable to parse profileSequence configuration from '%s'\n", argv[2]);
260 return -1;
261 }
262
263 if (cfgApply.m_srcType == icCfgColorData) {
264 if (cfgApply.m_srcFile.empty()) {
265 if (!cfgData.fromJson(cfg["colorData"])) {
266 printf("Unable to parse colorData configuration from '%s'\n", argv[2]);
267 }
268 }
269 else {
270 json data;
271 if (!loadJsonFrom(data, cfgApply.m_srcFile.c_str()) || !cfgData.fromJson(data)) {
272 printf("Unable to load color data from '%s'\n", cfgApply.m_srcFile.c_str());
273 return -1;
274 }
275 }
276 }
277 }
278 else {
279 argv++;
280 argc--;
281
282 if (argc > 1 && !stricmp(argv[0], "-debugcalc")) {
283 cfgApply.m_debugCalc = true;
284
285 argv++;
286 argc--;
287 }
288
289 int nArg = cfgApply.fromArgs(&argv[0], argc);
290 if (!nArg) {
291 printf("Unable to parse configuration arguments\n");
292 return -1;
293 }
294 argv += nArg;
295 argc -= nArg;
296
297 nArg = cfgProfiles.fromArgs(&argv[0], argc);
298 if (!nArg) {
299 printf("Unable to parse profile sequence arguments\n");
300 return -1;
301 }
302
303 if (cfgApply.m_srcType != icCfgLegacy || !cfgData.fromLegacy(cfgApply.m_srcFile.c_str())) {
304 printf("Unable to parse legacy data file '%s'\n", cfgApply.m_srcFile.c_str());
305 return -1;
306 }
307 }
308 LogDebuggerPtr pDebugger;
309
310 if (cfgApply.m_debugCalc) {
311 pDebugger = LogDebuggerPtr(new CIccLogDebugger());
312 IIccCalcDebugger::SetDebugger(pDebugger.get());
313 }
314
315 char precisionStr[30];
316 sprintf(precisionStr, "%%%d.%dlf ", cfgApply.m_dstDigits, cfgApply.m_dstPrecision);
317
318 icFloatColorEncoding srcEncoding, destEncoding;
319
320 //Setup source encoding
321 srcEncoding = cfgData.m_encoding;
322
323 icColorSpaceSignature SrcspaceSig = cfgData.m_srcSpace;
324
325 //If first profile colorspace is PCS and it matches the source data space then treat as input profile
326 bool bInputProfile = !IsSpacePCS(SrcspaceSig);
327 if (!bInputProfile) {
328 CIccProfile *pProf = OpenIccProfile(cfgProfiles.m_profiles[0]->m_iccFile.c_str());
329 if (pProf) {
330 if (pProf->m_Header.deviceClass!=icSigAbstractClass && IsSpacePCS(pProf->m_Header.colorSpace))
331 bInputProfile = true;
332 delete pProf;
333 }
334 }
335
336 //Allocate a CIccCmm to use to apply profiles
337 CIccNamedColorCmm namedCmm(SrcspaceSig, icSigUnknownData, bInputProfile);
338 IccProfilePtrList pccList;
339
340 icCmmEnvSigMap sigMap;
341 bool bUseSubProfile = false;
342
343 for (auto pProfIter = cfgProfiles.m_profiles.begin(); pProfIter != cfgProfiles.m_profiles.end(); pProfIter++) {
344 CIccCfgProfile* pProfCfg = pProfIter->get();
345
346 if (!pProfCfg)
347 continue;
348
349 CIccProfile *pPccProfile = NULL;
350
351 //Adjust type and hint information based on rendering intent
352 CIccCreateXformHintManager Hint;
353 if (pProfCfg->m_useBPC)
354 Hint.AddHint(new CIccApplyBPCHint());
355
356 if (pProfCfg->m_adjustPcsLuminance) {
357 Hint.AddHint(new CIccLuminanceMatchingHint());
358 }
359
360 if (pProfCfg->m_pccFile.size()) {
361 pPccProfile = OpenIccProfile(pProfCfg->m_pccFile.c_str());
362 if (!pPccProfile) {
363 printf("Unable to open Profile Connections Conditions from '%s'\n", pProfCfg->m_pccFile.c_str());
364 return -1;
365 }
366 //Keep track of pPccProfile for until after cmm.Begin is called
367 pccList.push_back(pPccProfile);
368 }
369
370 //CMM Environment variables are passed in as a Hint to the Xform associated with the profile
371 if (pProfCfg->m_iccEnvVars.size()>0) {
372 Hint.AddHint(new CIccCmmEnvVarHint(pProfCfg->m_iccEnvVars));
373 }
374
375 if (pProfCfg->m_pccEnvVars.size() > 0) {
376 Hint.AddHint(new CIccCmmPccEnvVarHint(pProfCfg->m_pccEnvVars));
377 }
378
379 //Read profile from path and add it to namedCmm
380 if (namedCmm.AddXform(pProfCfg->m_iccFile.c_str(),
381 pProfCfg->m_intent<0 ? icUnknownIntent : (icRenderingIntent)pProfCfg->m_intent,
382 pProfCfg->m_interpolation,
383 pPccProfile,
384 pProfCfg->m_transform,
385 pProfCfg->m_useD2BxB2Dx,
386 &Hint,
387 pProfCfg->m_useV5SubProfile)) {
388 printf("Invalid Profile: %s\n", pProfCfg->m_iccFile.c_str());
389 return -1;
390 }
391 }
392
393 icStatusCMM stat;
394
395 //All profiles have been added to CMM. Tell CMM that we are ready to begin applying colors/pixels
396 if((stat=namedCmm.Begin())) {
397 printf("Error %d - Unable to begin profile application - Possibly invalid or incompatible profiles\n", stat);
398 return -1;
399 }
400
401 CIccCmm *pMruCmm = NULL; // CIccMruCmm::Attach(&namedCmm, 6, false);
402
403 //Now we can release the pccProfile nodes.
404 IccProfilePtrList::iterator pcc;
405 for (pcc=pccList.begin(); pcc!=pccList.end(); pcc++) {
406 CIccProfile *pPccProfile = *pcc;
407 delete pPccProfile;
408 }
409 pccList.clear();
410
411 //Get and validate the source color space from namedCmm.
412 SrcspaceSig = namedCmm.GetSourceSpace();
413 int nSrcSamples = icGetSpaceSamples(SrcspaceSig);
414
415 bool bClip = true;
416 //We don't want to interpret device data as pcs encoded data
417 if (bInputProfile && IsSpacePCS(SrcspaceSig)) {
418 if (SrcspaceSig == icSigXYZPcsData)
419 SrcspaceSig = icSigDevXYZData;
420 else if (SrcspaceSig == icSigLabPcsData)
421 SrcspaceSig = icSigDevLabData;
422
423 if (srcEncoding == icEncodeFloat)
424 bClip = false;
425 }
426
427 //Get and validate the destination color space from namedCmm.
428 icColorSpaceSignature DestspaceSig = namedCmm.GetDestSpace();
429 int nDestSamples = icGetSpaceSamples(DestspaceSig);
430
431 //Allocate pixel buffers for performing encoding transformations
432 char SrcNameBuf[256], DestNameBuf[256];
433 CIccPixelBuf SrcPixel(nSrcSamples+16), DestPixel(nDestSamples+16), Pixel(icIntMax(nSrcSamples, nDestSamples)+16);
434
435 CIccCfgColorData outData;
436
437 outData.m_space = DestspaceSig;
438
439 destEncoding = cfgApply.m_dstEncoding;
440 if(DestspaceSig==icSigNamedData)
441 destEncoding = icEncodeValue;
442 outData.m_encoding = destEncoding;
443
444 outData.m_srcSpace = SrcspaceSig;
445
446 if(SrcspaceSig==icSigNamedData)
447 srcEncoding = icEncodeValue;
448 outData.m_srcEncoding = srcEncoding;
449
450 //Apply profiles to each input color
451 for (auto dataIter = cfgData.m_data.begin(); dataIter != cfgData.m_data.end(); dataIter++) {
452 CIccCfgDataEntry* pData = dataIter->get();
453
454 int i;
455
456 if (!pData)
457 continue;
458
459 if (pDebugger)
460 pDebugger->reset();
461
463
464 out->m_srcName = pData->m_name;
465 out->m_srcValues = pData->m_srcValues;
466
467 //Are names coming is as an input?
468 if(SrcspaceSig ==icSigNamedData) {
469
470 const char* szName = pData->m_name.c_str();
471 icFloatNumber tint;
472
473 if (pData->m_values.size())
474 tint = pData->m_values[0];
475 else
476 tint = 1.0;
477
478 switch(namedCmm.GetInterface()) {
479 case icApplyNamed2Pixel:
480 {
481
482 if(namedCmm.Apply(DestPixel, szName, tint)) {
483 printf("Profile application failed.\n");
484 return -1;
485 }
486
487 if(CIccCmm::FromInternalEncoding(DestspaceSig, destEncoding, DestPixel, DestPixel, destEncoding!=icEncodeFloat)) {
488 printf("Invalid final data encoding\n");
489 return -1;
490 }
491
492 for(i = 0; i<nDestSamples; i++) {
493 out->m_values.push_back(DestPixel[i]);
494 }
495 break;
496 }
497 case icApplyNamed2Named:
498 {
499 if(namedCmm.Apply(DestNameBuf, SrcNameBuf, tint)) {
500 printf("Profile application failed.\n");
501 return -1;
502 }
503
504 out->m_name = DestNameBuf;
505 break;
506 }
507 case icApplyPixel2Pixel:
508 case icApplyPixel2Named:
509 default:
510 printf("Incorrect interface.\n");
511 return -1;
512 }
513 }
514 else {
515 for (i = 0; i < nSrcSamples && i < pData->m_values.size(); i++) {
516 Pixel[i] = pData->m_values[i];
517 }
518
519 out->m_srcValues = pData->m_values;
520
521 if(CIccCmm::ToInternalEncoding(SrcspaceSig, srcEncoding, SrcPixel, Pixel, bClip)) {
522 printf("Invalid source data encoding\n");
523 return -1;
524 }
525
526 switch(namedCmm.GetInterface()) {
527 case icApplyPixel2Pixel:
528 {
529 if (pMruCmm) {
530 if (pMruCmm->Apply(DestPixel, SrcPixel)) {
531 printf("Profile application failed.\n");
532 return -1;
533 }
534 }
535 else if(namedCmm.Apply(DestPixel, SrcPixel)) {
536 printf("Profile application failed.\n");
537 return -1;
538 }
539 if(CIccCmm::FromInternalEncoding(DestspaceSig, destEncoding, DestPixel, DestPixel)) {
540 printf("Invalid final data encoding\n");
541 return -1;
542 }
543
544 for(i = 0; i<nDestSamples; i++) {
545 out->m_values.push_back(DestPixel[i]);
546 }
547 break;
548 }
549 case icApplyPixel2Named:
550 {
551 if(namedCmm.Apply(DestNameBuf, SrcPixel)) {
552 printf("Profile application failed.\n");
553 return -1;
554 }
555 out->m_name = DestNameBuf;
556 break;
557 }
558 case icApplyNamed2Pixel:
559 case icApplyNamed2Named:
560 default:
561 printf("Incorrect interface.\n");
562 return -1;
563 }
564 }
565
566 if (pDebugger)
567 out->m_debugInfo = pDebugger->m_log;
568
569 outData.m_data.push_back(out);
570 }
571
572 //Now output the data
573// cfgApply.m_dstType = icCfgIt8;
574// cfgApply.m_dstDigits = 0;
575// cfgApply.m_dstPrecision = 2;
576// cfgApply.m_debugCalc = false;
577
578 if (cfgApply.m_dstType == icCfgLegacy) {
579 outData.toLegacy(cfgApply.m_dstFile.c_str(), &cfgProfiles, cfgApply.m_dstDigits, cfgApply.m_dstPrecision, cfgApply.m_debugCalc);
580 }
581 else if (cfgApply.m_dstType == icCfgColorData) {
582 json out;
583 json seq;
584 cfgProfiles.toJson(seq);
585 if (seq.is_object())
586 out["appliedProfileSequence"] = seq;
587
588 json data;
589 outData.toJson(data);
590 if (data.is_object())
591 out["colorData"] = data;
592
593 if (out.is_object())
594 saveJsonAs(out, cfgApply.m_dstFile.c_str());
595 }
596 else if (cfgApply.m_dstType==icCfgIt8) {
597 outData.toIt8(cfgApply.m_dstFile.c_str(), cfgApply.m_dstDigits, cfgApply.m_dstPrecision);
598 }
599 else {
600 printf("Unsupported output format\n");
601 delete pMruCmm;
602
603 return -1;
604 }
605
606 if (pMruCmm)
607 delete pMruCmm;
608
609 return 0;
610}
File: IccApplyBPC.h.
File: IccCmm.h.
icStatusCMM
CMM return status values.
Definition IccCmm.h:90
std::shared_ptr< CIccCfgDataEntry > CIccCfgDataEntryPtr
@ icCfgLegacy
@ icCfgColorData
Definition IccCmmConfig.h:9
@ icCfgIt8
File: IccDefs.h
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
#define icSigDevXYZData
Definition IccDefs.h:92
#define icSigDevLabData
Additional convenience color space signatures to distinguish between device encoding and PCS encoding...
Definition IccDefs.h:91
File: IccEnvVar.h.
std::map< icSignature, icFloatNumber > icCmmEnvSigMap
Definition IccEnvVar.h:83
bool loadJsonFrom(json &j, const char *szFname)
bool saveJsonAs(const json &j, const char *szFname, int indent)
File: IccMpeCalc.h.
@ icSigDataOp
Definition IccMpeCalc.h:112
@ icSigSelectOp
Definition IccMpeCalc.h:214
@ icSigIfOp
Definition IccMpeCalc.h:210
#define stricmp
#define ICCPROFLIBVER
CIccProfile * OpenIccProfile(const icChar *szFilename, bool bUseSubProfile)
Name: OpenIccProfile.
const icChar * szName
icUInt32Number icGetSpaceSamples(icColorSpaceSignature sig)
Definition IccUtil.cpp:1303
icUInt32Number icIntMax(icUInt32Number v1, icUInt32Number v2)
Definition IccUtil.cpp:913
File: IccUtil.h.
int main()
Core and external libraries necessary for the fuzzer functionality.
Type: Class.
Definition IccApplyBPC.h:89
bool fromLegacy(const char *filename, bool bReset=false)
icFloatColorEncoding m_srcEncoding
bool toIt8(const char *filename, icUInt8Number nDigits, icUInt8Number nPrecision)
icColorSpaceSignature m_srcSpace
bool fromJson(json obj, bool bReset=false)
void toJson(json &obj) const
icFloatColorEncoding m_encoding
CIccCfgDataEntryList m_data
icColorSpaceSignature m_space
bool toLegacy(const char *filename, CIccCfgProfileSequence *pProfiles, icUInt8Number nDigits, icUInt8Number nPrecision, bool bShowDebug=false)
bool fromJson(json obj, bool bReset=false)
icCfgDataType m_srcType
icUInt8Number m_dstPrecision
icCfgDataType m_dstType
int fromArgs(const char **args, int nArg, bool bReset=false)
icUInt8Number m_dstDigits
std::string m_dstFile
icFloatColorEncoding m_dstEncoding
std::string m_srcFile
void reset()
std::vector< icFloatNumber > m_srcValues
std::vector< icFloatNumber > m_values
std::string m_name
icCmmEnvSigMap m_pccEnvVars
icXformInterp m_interpolation
std::string m_iccFile
std::string m_pccFile
icXformLutType m_transform
icCmmEnvSigMap m_iccEnvVars
bool m_adjustPcsLuminance
CIccCfgProfileArray m_profiles
int fromArgs(const char **args, int nArg, bool bReset=false)
bool fromJson(json obj, bool bReset=false)
void toJson(json &obj) const
std::list< std::string > m_log
virtual void BeginApply()
virtual void Error(const char *szMsg)
virtual bool BeforeOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)
virtual bool AfterOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)
virtual void EndApply()
static void SetDebugger(IIccCalcDebugger *pDebugger)
#define icSigLabPcsData
Allowable icColorSpaceSignature values for xform PCS purposes.
#define icUnknownIntent
Convenience Enum Definitions - Not defined in ICC specification.
@ icSigAbstractClass
#define icSigXYZPcsData
icColorSpaceSignature
Color Space Signatures.
@ icSigNamedData
#define icSigUnknownData
icRenderingIntent
Rendering Intents, used in the profile header.
std::list< CIccProfile * > IccProfilePtrList
void Usage()
std::shared_ptr< CIccLogDebugger > LogDebuggerPtr
#define IsSpacePCS(x)
Structure: SIccCalcOp.
Definition IccMpeCalc.h:231
icSigCalcOp sig
Definition IccMpeCalc.h:233
void Describe(std::string &desc, int nVerboseness=100)
Name: SIccCalcOp::Describe.
Structure: SIccOpState.
Definition IccMpeCalc.h:273
CIccFloatVector * pStack
Definition IccMpeCalc.h:275