Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1739
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 11, 2019
1 parent ccd4843 commit 3d71aa8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions MagickCore/gem-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,20 @@ static inline void ConvertLabToXYZ(const double L,const double a,const double b,
static inline void ConvertLuvToXYZ(const double L,const double u,const double v,
double *X,double *Y,double *Z)
{
double
gamma;

assert(X != (double *) NULL);
assert(Y != (double *) NULL);
assert(Z != (double *) NULL);
if (L > (CIEK*CIEEpsilon))
*Y=(double) pow((L+16.0)/116.0,3.0);
else
*Y=L/CIEK;
*X=((*Y*((39.0*L/(v+13.0*L*(9.0*D65Y/(D65X+15.0*D65Y+3.0*D65Z))))-5.0))+
5.0*(*Y))/((((52.0*L/(u+13.0*L*(4.0*D65X/(D65X+15.0*D65Y+3.0*D65Z))))-1.0)/
3.0)-(-1.0/3.0));
gamma=PerceptibleReciprocal((((52.0*L/(u+13.0*L*(4.0*D65X/(D65X+15.0*D65Y+
3.0*D65Z))))-1.0)/3.0)-(-1.0/3.0));
*X=gamma*((*Y*((39.0*L/(v+13.0*L*(9.0*D65Y/(D65X+15.0*D65Y+3.0*D65Z))))-5.0))+
5.0*(*Y));
*Z=(*X*(((52.0*L/(u+13.0*L*(4.0*D65X/(D65X+15.0*D65Y+3.0*D65Z))))-1.0)/3.0))-
5.0*(*Y);
}
Expand Down

0 comments on commit 3d71aa8

Please sign in to comment.