]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 12 Feb 2013 18:08:53 +0000 (18:08 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 12 Feb 2013 18:08:53 +0000 (18:08 +0000)
MagickCore/composite.c

index dfcaa94bebc1925e2e407b79d1c25628d8d6cb42..65b9f9f4baef126bcefce7bfc3c911dbe576d361 100644 (file)
@@ -220,8 +220,7 @@ static void HCLComposite(const MagickRealType hue,const MagickRealType chroma,
     h,
     m,
     r,
-    x,
-    z;
+    x;
 
   /*
     Convert HCL to RGB colorspace.
@@ -271,25 +270,9 @@ static void HCLComposite(const MagickRealType hue,const MagickRealType chroma,
                 b=x;
               }
   m=luma-(0.298839f*r+0.586811f*g+0.114350f*b);
-  /*
-    Choose saturation strategy to clip it into the RGB cube; hue and luma are
-    preserved and chroma may be changed.
-  */
-  z=1.0;
-  if (m < 0.0)
-    {
-      z=luma/(luma-m);
-      m=0.0;
-    }
-  else
-    if (m+c > 1.0)
-      {
-        z=(1.0-luma)/(m+c-luma);
-        m=1.0-z*c;
-      }
-  *red=QuantumRange*(z*r+m);
-  *green=QuantumRange*(z*g+m);
-  *blue=QuantumRange*(z*b+m);
+  *red=QuantumRange*(r+m);
+  *green=QuantumRange*(g+m);
+  *blue=QuantumRange*(b+m);
 }
 
 static void CompositeHCL(const MagickRealType red,const MagickRealType green,