From: cristy <urban-warrior@git.imagemagick.org>
Date: Mon, 8 Apr 2013 14:25:26 +0000 (+0000)
Subject: (no commit message)
X-Git-Tag: 7.0.1-0~3913
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=429dbe8d8c7f0f94f6a96547e5a433c22882452e;p=imagemagick

---

diff --git a/MagickCore/gem.c b/MagickCore/gem.c
index 8df3e5aab..bd4a3f158 100644
--- a/MagickCore/gem.c
+++ b/MagickCore/gem.c
@@ -530,8 +530,8 @@ MagickPrivate void ConvertRGBToHCL(const double red,const double green,
   assert(hue != (double *) NULL);
   ConvertRGBToXYZ(red,green,blue,&X,&Y,&Z);
   ConvertXYZToLuv(X,Y,Z,&L,&u,&v);
-  C=hypot(u-134.0/254.0,v-140.0/262.0);
-  H=180.0*atan2(v-140.0/262.0,u-134.0/254.0)/MagickPI/360.0;
+  C=hypot(u-134.0/354.0,v-140.0/262.0);
+  H=180.0*atan2(v-140.0/262.0,u-134.0/354.0)/MagickPI/360.0;
   if (H < 0.0)
     H+=1.0;
   if (H >= 1.0)
@@ -882,8 +882,8 @@ MagickPrivate void ConvertRGBToLCHuv(const double red,const double green,
   assert(hue != (double *) NULL);
   ConvertRGBToXYZ(red,green,blue,&X,&Y,&Z);
   ConvertXYZToLuv(X,Y,Z,&L,&u,&v);
-  C=hypot(u-134.0/254.0,v-140.0/262.0);
-  H=180.0*atan2(v-140.0/262.0,u-134.0/254.0)/MagickPI/360.0;
+  C=hypot(u-134.0/354.0,v-140.0/262.0);
+  H=180.0*atan2(v-140.0/262.0,u-134.0/354.0)/MagickPI/360.0;
   if (H < 0.0)
     H+=1.0;
   if (H >= 1.0)