461 cmsFloat32Number Sum;
462
463
464 // Evaluate the xform
465 cmsDoTransform(bp->hRoundTrip, In, RoundTrip, 1);
466
467 // All all amounts of ink
468 for (Sum=0, i=0; i < bp ->nOutputChans; i++)
469 Sum += RoundTrip[i];
470
471 // If above maximum, keep track of input values
472 if (Sum > bp ->MaxTAC) {
473
474 bp ->MaxTAC = Sum;
475
476 for (i=0; i < bp ->nOutputChans; i++) {
477 bp ->MaxInput[i] = In[i];
478 }
479 }
480
481 return TRUE;
482
483 cmsUNUSED_PARAMETER(Out);
484 }
485
486
487 // Detect Total area coverage of the profile
488 cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile)
489 {
490 cmsTACestimator bp;
491 cmsUInt32Number dwFormatter;
492 cmsUInt32Number GridPoints[MAX_INPUT_DIMENSIONS];
493 cmsHPROFILE hLab;
494 cmsContext ContextID = cmsGetProfileContextID(hProfile);
495
496 // TAC only works on output profiles
497 if (cmsGetDeviceClass(hProfile) != cmsSigOutputClass) {
498 return 0;
499 }
500
501 // Create a fake formatter for result
502 dwFormatter = cmsFormatterForColorspaceOfProfile(hProfile, 4, TRUE);
503
|
461 cmsFloat32Number Sum;
462
463
464 // Evaluate the xform
465 cmsDoTransform(bp->hRoundTrip, In, RoundTrip, 1);
466
467 // All all amounts of ink
468 for (Sum=0, i=0; i < bp ->nOutputChans; i++)
469 Sum += RoundTrip[i];
470
471 // If above maximum, keep track of input values
472 if (Sum > bp ->MaxTAC) {
473
474 bp ->MaxTAC = Sum;
475
476 for (i=0; i < bp ->nOutputChans; i++) {
477 bp ->MaxInput[i] = In[i];
478 }
479 }
480
481 cmsUNUSED_PARAMETER(Out);
482 return TRUE;
483
484 }
485
486
487 // Detect Total area coverage of the profile
488 cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile)
489 {
490 cmsTACestimator bp;
491 cmsUInt32Number dwFormatter;
492 cmsUInt32Number GridPoints[MAX_INPUT_DIMENSIONS];
493 cmsHPROFILE hLab;
494 cmsContext ContextID = cmsGetProfileContextID(hProfile);
495
496 // TAC only works on output profiles
497 if (cmsGetDeviceClass(hProfile) != cmsSigOutputClass) {
498 return 0;
499 }
500
501 // Create a fake formatter for result
502 dwFormatter = cmsFormatterForColorspaceOfProfile(hProfile, 4, TRUE);
503
|