]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 15 Oct 2011 15:32:24 +0000 (15:32 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 15 Oct 2011 15:32:24 +0000 (15:32 +0000)
MagickCore/display.c
MagickCore/image.c
MagickCore/string-private.h

index cca29f2a9a1e5ab6d4706accda9fc509ee1b94b1..59906bf68ae46c50c7182dffc6030368d6d416fe 100644 (file)
@@ -3541,7 +3541,7 @@ static MagickBooleanType XColorEditImage(Display *display,
               break;
             if (entry != 5)
               {
-                (*image)->fuzz=SiPrefixToDouble(FuzzMenu[entry],1.0*
+                (*image)->fuzz=SiPrefixToDouble(FuzzMenu[entry],(double)
                   QuantumRange+1.0);
                 break;
               }
@@ -3551,7 +3551,7 @@ static MagickBooleanType XColorEditImage(Display *display,
             if (*fuzz == '\0')
               break;
             (void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
-            (*image)->fuzz=SiPrefixToDouble(fuzz,1.0*QuantumRange+1.0);
+            (*image)->fuzz=SiPrefixToDouble(fuzz,(double) QuantumRange+1.0);
             break;
           }
           case ColorEditUndoCommand:
@@ -9854,7 +9854,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
               break;
             if (entry != 5)
               {
-                (*image)->fuzz=SiPrefixToDouble(FuzzMenu[entry],1.0*
+                (*image)->fuzz=SiPrefixToDouble(FuzzMenu[entry],(double)
                   QuantumRange+1.0);
                 break;
               }
@@ -9864,7 +9864,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
             if (*fuzz == '\0')
               break;
             (void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
-            (*image)->fuzz=SiPrefixToDouble(fuzz,1.0*QuantumRange+1.0);
+            (*image)->fuzz=SiPrefixToDouble(fuzz,(double) QuantumRange+1.0);
             break;
           }
           case MatteEditValueCommand:
index bf79a4787461a1df7d9571df59e73abb07fae387..36333666ae1117e0a370c9b481c89b1094aa31a9 100644 (file)
@@ -4248,7 +4248,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
       MagickFalse,option);
   option=GetImageOption(image_info,"fuzz");
   if (option != (const char *) NULL)
-    image->fuzz=SiPrefixToDouble(option,QuantumRange);
+    image->fuzz=SiPrefixToDouble(option,(double) QuantumRange+1.0);
   option=GetImageOption(image_info,"gravity");
   if (option != (const char *) NULL)
     image->gravity=(GravityType) ParseCommandOption(MagickGravityOptions,
index b3dd2e16d41f7bb4e105842560866cf29968f561..6e4308c9b6af4ba09647fd2382d9ddd6a402b6e7 100644 (file)
@@ -31,6 +31,9 @@ static inline double SiPrefixToDouble(const char *string,const double interval)
     scale,
     value;
 
+  /*
+    Interpret string with International System of Units (SI) unit prefix.
+  */
   value=InterpretLocaleValue(string,&q);
   scale=1000.0;
   if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))