Skip to content

Commit

Permalink
ImfAcesFile.cpp: Fix primary conversion edge case.
Browse files Browse the repository at this point in the history
This fixes the edge case when the file chromaticities.white != file adopted
neutral.

In such a scenario the adoptedNeutral file attr must be used as the
display white point value passed into RGBtoXYZ() method since
the adaption matrix (Bradform Transform)  is computed using the adopted neutral as its
input white point.

Signed-off-by: Arkell Rasiah <arasiah@pixsystem.com>
  • Loading branch information
arkellr authored and cary-ilm committed Feb 26, 2020
1 parent 3576a8b commit adc21e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OpenEXR/IlmImf/ImfAcesFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ AcesInputFile::Data::initColorConversion ()
V2f fileNeutral = fileChr.white;

if (hasAdoptedNeutral (header))
{
fileNeutral = adoptedNeutral (header);
fileChr.white = fileNeutral; // for RGBtoXYZ() purposes.
}

const Chromaticities acesChr = acesChromaticities();

Expand Down

0 comments on commit adc21e5

Please sign in to comment.