Fix Luv2RGB function

This commit is contained in:
vbystricky
2014-08-01 14:18:35 +04:00
parent 05164bf713
commit b724208510
2 changed files with 19 additions and 7 deletions

View File

@@ -2038,6 +2038,10 @@ struct Luv2RGB_f
float G = X*C3 + Y*C4 + Z*C5;
float B = X*C6 + Y*C7 + Z*C8;
R = std::min(std::max(R, 0.f), 1.f);
G = std::min(std::max(G, 0.f), 1.f);
B = std::min(std::max(B, 0.f), 1.f);
if( gammaTab )
{
R = splineInterpolate(R*gscale, gammaTab, GAMMA_TAB_SIZE);