]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 6 May 2013 17:04:29 +0000 (17:04 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 6 May 2013 17:04:29 +0000 (17:04 +0000)
MagickCore/gem.c

index 37cb75a9cff31d31d1a0bc849acf42eaca00ea2c..55b8e4a4c4651f25f4021f52015d2fed180a903b 100644 (file)
@@ -1341,10 +1341,10 @@ static inline void ConvertXYZToLCHab(const double X,const double Y,
   ConvertXYZToLab(X,Y,Z,luma,&a,&b);
   *chroma=hypot(255.0*(a-0.5),255.0*(b-0.5));
   *hue=180.0*atan2(255.0*(b-0.5),255.0*(a-0.5))/MagickPI;
-  if (*hue < 0.0)
-    *hue+=360.0;
   *chroma=(*chroma)/255.0+0.5;
   *hue=(*hue)/255.0+0.5;
+  if (*hue < 0.0)
+    *hue+=1.0;
 }
 
 MagickPrivate void ConvertRGBToLCHab(const double red,const double green,