Skip to content

Commit

Permalink
Fix D computation on CAM02
Browse files Browse the repository at this point in the history
Fix a small bug in CAM02
Thanks to Chris Cox for spotting that
  • Loading branch information
mm2 committed Jan 4, 2024
1 parent a6fad99 commit 59aea91
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/cmscam02.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,16 @@ cmsFloat64Number computeFL(cmsCIECAM02* pMod)
return FL;
}

static
cmsFloat64Number computeD(cmsCIECAM02* pMod)
static cmsFloat64Number computeD(cmsCIECAM02* pMod)
{
cmsFloat64Number D;

D = pMod->F - (1.0/3.6)*(exp(((-pMod ->LA-42) / 92.0)));
cmsFloat64Number D, temp;

temp = 1.0 - ((1.0 / 3.6) * exp((-pMod->LA - 42) / 92.0));

D = pMod->F * temp;
return D;
}


static
CAM02COLOR XYZtoCAT02(CAM02COLOR clr)
{
Expand Down

0 comments on commit 59aea91

Please sign in to comment.