]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 24 Jun 2012 00:36:34 +0000 (00:36 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 24 Jun 2012 00:36:34 +0000 (00:36 +0000)
MagickCore/colorspace.c
MagickWand/operation.c

index 63d3f3593e913802a6bbb12ce5883fe3772fad5f..520181a93b59dd7b0d0dcab961126eeab176271f 100644 (file)
@@ -165,11 +165,13 @@ static inline void ConvertXYZToLab(const double X,const double Y,const double Z,
     z=(CIEK*Z/D50Z+16.0)/116.0;
   *L=((116.0*y)-16.0)/100.0;
   *a=(500.0*(x-y))/255.0;
+  *b=(200.0*(y-z))/255.0;
+#if !defined(MAGICKCORE_HDRI_SUPPORT)
   if (*a < 0.0)
     *a+=1.0;
-  *b=(200.0*(y-z))/255.0;
   if (*b < 0.0)
     *b+=1.0;
+#endif
 }
 
 static MagickBooleanType sRGBTransformImage(Image *image,
@@ -1539,8 +1541,13 @@ static inline void ConvertLabToXYZ(const double L,const double a,const double b,
   assert(Y != (double *) NULL);
   assert(Z != (double *) NULL);
   y=(100.0*L+16.0)/116.0;
+#if !defined(MAGICKCORE_HDRI_SUPPORT)
   x=y+255.0*(a > 0.5 ? a-1.0 : a)/500.0;
   z=y-255.0*(b > 0.5 ? b-1.0 : b)/200.0;
+#else
+  x=y+255.0*a/500.0;
+  z=y-255.0*b/200.0;
+#endif
   if (pow(x,3.0) > CIEEpsilon)
     x=pow(x,3.0);
   else
index 9821315c87614442af8d08d03e3274c1ae2b0d90..78697841ff574fcc7064b7e1da6cb139aebe3bac 100644 (file)
@@ -3285,9 +3285,9 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
         }
       if (LocaleCompare("swirl",option+1) == 0)
         {
-          flags=ParseGeometry(arg2,&geometry_info);
+          flags=ParseGeometry(arg1,&geometry_info);
           if ((flags & RhoValue) == 0)
-            CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg2);
+            CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           new_image=SwirlImage(_image,geometry_info.rho,
             _image->interpolate,_exception);
           break;