]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 4 Nov 2011 23:29:40 +0000 (23:29 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 4 Nov 2011 23:29:40 +0000 (23:29 +0000)
46 files changed:
MagickCore/colorspace.c
MagickCore/display.c
MagickCore/distort.c
MagickCore/draw.c
MagickCore/enhance.c
MagickCore/fx.c
MagickCore/geometry.c
MagickCore/image.c
MagickCore/locale.c
MagickCore/morphology.c
MagickCore/property.c
MagickCore/quantum.c
MagickCore/resize.c
MagickCore/resource.c
MagickCore/string-private.h
MagickCore/string.c
MagickCore/string_.h
MagickCore/threshold.c
MagickCore/token.c
MagickWand/animate.c
MagickWand/compare.c
MagickWand/composite.c
MagickWand/convert.c
MagickWand/display.c
MagickWand/drawing-wand.c
MagickWand/identify.c
MagickWand/import.c
MagickWand/magick-property.c
MagickWand/mogrify.c
MagickWand/montage.c
MagickWand/operation.c
MagickWand/stream.c
PerlMagick/Magick.xs
coders/cin.c
coders/dpx.c
coders/fits.c
coders/hdr.c
coders/jbig.c
coders/jpeg.c
coders/miff.c
coders/mpc.c
coders/msl.c
coders/pnm.c
coders/sct.c
coders/svg.c
coders/tiff.c

index 1748073def97fe1d51961f201cb7dc9f2f51f2b8..84e5cd64e21f609d460ac835718e7302b66e7aaf 100644 (file)
@@ -619,20 +619,20 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma",exception);
       if (value != (const char *) NULL)
-        gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
-          MagickEpsilon ? InterpretLocaleValue(value,(char **) NULL) : 1.0;
+        gamma=1.0/fabs(StringToDouble(value,(char **) NULL)) >=
+          MagickEpsilon ? StringToDouble(value,(char **) NULL) : 1.0;
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma",exception);
       if (value != (const char *) NULL)
-        film_gamma=InterpretLocaleValue(value,(char **) NULL);
+        film_gamma=StringToDouble(value,(char **) NULL);
       reference_black=ReferenceBlack;
       value=GetImageProperty(image,"reference-black",exception);
       if (value != (const char *) NULL)
-        reference_black=InterpretLocaleValue(value,(char **) NULL);
+        reference_black=StringToDouble(value,(char **) NULL);
       reference_white=ReferenceWhite;
       value=GetImageProperty(image,"reference-white",exception);
       if (value != (const char *) NULL)
-        reference_white=InterpretLocaleValue(value,(char **) NULL);
+        reference_white=StringToDouble(value,(char **) NULL);
       logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
         sizeof(*logmap));
       if (logmap == (Quantum *) NULL)
@@ -2067,20 +2067,20 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma",exception);
       if (value != (const char *) NULL)
-        gamma=1.0/fabs(InterpretLocaleValue(value,(char **) NULL)) >=
-          MagickEpsilon ? InterpretLocaleValue(value,(char **) NULL) : 1.0;
+        gamma=1.0/fabs(StringToDouble(value,(char **) NULL)) >=
+          MagickEpsilon ? StringToDouble(value,(char **) NULL) : 1.0;
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma",exception);
       if (value != (const char *) NULL)
-        film_gamma=InterpretLocaleValue(value,(char **) NULL);
+        film_gamma=StringToDouble(value,(char **) NULL);
       reference_black=ReferenceBlack;
       value=GetImageProperty(image,"reference-black",exception);
       if (value != (const char *) NULL)
-        reference_black=InterpretLocaleValue(value,(char **) NULL);
+        reference_black=StringToDouble(value,(char **) NULL);
       reference_white=ReferenceWhite;
       value=GetImageProperty(image,"reference-white",exception);
       if (value != (const char *) NULL)
-        reference_white=InterpretLocaleValue(value,(char **) NULL);
+        reference_white=StringToDouble(value,(char **) NULL);
       logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
         sizeof(*logmap));
       if (logmap == (Quantum *) NULL)
index ecd5ee7f79578c1cfd6a7c2727782c3c40eef1ac..408251c574b0a9c6d5ac8a6df289fc45beca7e57 100644 (file)
@@ -2127,14 +2127,14 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
               break;
             if (entry != 8)
               {
-                degrees=InterpretLocaleValue(RotateMenu[entry],(char **) NULL);
+                degrees=StringToDouble(RotateMenu[entry],(char **) NULL);
                 break;
               }
             (void) XDialogWidget(display,windows,"OK","Enter rotation angle:",
               angle);
             if (*angle == '\0')
               break;
-            degrees=InterpretLocaleValue(angle,(char **) NULL);
+            degrees=StringToDouble(angle,(char **) NULL);
             break;
           }
           case AnnotateHelpCommand:
@@ -3543,7 +3543,7 @@ static MagickBooleanType XColorEditImage(Display *display,
               break;
             if (entry != 5)
               {
-                (*image)->fuzz=InterpretLocaleInterval(FuzzMenu[entry],(double)
+                (*image)->fuzz=StringToDoubleInterval(FuzzMenu[entry],(double)
                   QuantumRange+1.0);
                 break;
               }
@@ -3553,7 +3553,7 @@ static MagickBooleanType XColorEditImage(Display *display,
             if (*fuzz == '\0')
               break;
             (void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
-            (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+            (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
             break;
           }
           case ColorEditUndoCommand:
@@ -4091,7 +4091,7 @@ static MagickBooleanType XCompositeImage(Display *display,
               GXinvert);
             if (*factor == '\0')
               break;
-            blend=InterpretLocaleValue(factor,(char **) NULL);
+            blend=StringToDouble(factor,(char **) NULL);
             compose=DissolveCompositeOp;
             break;
           }
@@ -7728,7 +7728,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) XDialogWidget(display,windows,"Trim","Enter fuzz factor:",fuzz);
       if (*fuzz == '\0')
         break;
-      (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+      (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
       /*
         Trim image.
       */
@@ -8310,7 +8310,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       */
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      threshold=InterpretLocaleInterval(factor,QuantumRange);
+      threshold=StringToDoubleInterval(factor,QuantumRange);
       (void) BilevelImage(*image,threshold,exception);
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
@@ -8512,7 +8512,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       */
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      threshold=InterpretLocaleInterval(factor,QuantumRange);
+      threshold=StringToDoubleInterval(factor,QuantumRange);
       sepia_image=SepiaToneImage(*image,threshold,exception);
       if (sepia_image != (Image *) NULL)
         {
@@ -8547,7 +8547,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       */
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      threshold=InterpretLocaleInterval(factor,QuantumRange);
+      threshold=StringToDoubleInterval(factor,QuantumRange);
       (void) SolarizeImage(*image,threshold,exception);
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
@@ -9864,7 +9864,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
               break;
             if (entry != 5)
               {
-                (*image)->fuzz=InterpretLocaleInterval(FuzzMenu[entry],(double)
+                (*image)->fuzz=StringToDoubleInterval(FuzzMenu[entry],(double)
                   QuantumRange+1.0);
                 break;
               }
@@ -9874,7 +9874,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
             if (*fuzz == '\0')
               break;
             (void) ConcatenateMagickString(fuzz,"%",MaxTextExtent);
-            (*image)->fuzz=InterpretLocaleInterval(fuzz,(double) QuantumRange+1.0);
+            (*image)->fuzz=StringToDoubleInterval(fuzz,(double) QuantumRange+1.0);
             break;
           }
           case MatteEditValueCommand:
@@ -10178,7 +10178,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
               }
             draw_info=CloneDrawInfo(resource_info->image_info,
               (DrawInfo *) NULL);
-            draw_info->fill.alpha=ClampToQuantum(InterpretLocaleValue(matte,
+            draw_info->fill.alpha=ClampToQuantum(StringToDouble(matte,
               (char **) NULL));
             channel_mask=SetPixelChannelMask(*image,AlphaChannel); 
             (void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t)
index daade12ff40e1fbb8499a551160cf509979d9c06..2c24a8beb1d15c0db7ecad2bb0b1bce52f27614e 100644 (file)
@@ -2189,7 +2189,7 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
     artifact=GetImageArtifact(image,"distort:scale");
     output_scaling = 1.0;
     if (artifact != (const char *) NULL) {
-      output_scaling = fabs(InterpretLocaleValue(artifact,(char **) NULL));
+      output_scaling = fabs(StringToDouble(artifact,(char **) NULL));
       geometry.width  *= (size_t) output_scaling;
       geometry.height *= (size_t) output_scaling;
       geometry.x      *= (ssize_t) output_scaling;
index f3f141f6f94761e67913b53f54070b86122a1607..7ba5d516b9a632242f7a4953f404fbcb8596bd95 100644 (file)
@@ -1652,7 +1652,7 @@ static inline MagickBooleanType IsPoint(const char *point)
   double
     value;
 
-  value=InterpretLocaleValue(point,&p);
+  value=StringToDouble(point,&p);
   return((value == 0.0) && (p == point) ? MagickFalse : MagickTrue);
 }
 
@@ -1819,27 +1819,27 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("affine",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=InterpretLocaleValue(token,(char **) NULL);
+            affine.sx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.rx=InterpretLocaleValue(token,(char **) NULL);
+            affine.rx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ry=InterpretLocaleValue(token,(char **) NULL);
+            affine.ry=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=InterpretLocaleValue(token,(char **) NULL);
+            affine.sy=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.tx=InterpretLocaleValue(token,(char **) NULL);
+            affine.tx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=InterpretLocaleValue(token,(char **) NULL);
+            affine.ty=StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("arc",keyword) == 0)
@@ -2006,7 +2006,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
             GetMagickToken(q,&q,token);
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->fill.alpha=(MagickRealType) QuantumRange*
-              factor*InterpretLocaleValue(token,(char **) NULL);
+              factor*StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("fill-rule",keyword) == 0)
@@ -2041,7 +2041,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("font-size",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->pointsize=InterpretLocaleValue(token,
+            graphic_context[n]->pointsize=StringToDouble(token,
               (char **) NULL);
             break;
           }
@@ -2136,14 +2136,14 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("interline-spacing",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->interline_spacing=InterpretLocaleValue(token,
+            graphic_context[n]->interline_spacing=StringToDouble(token,
               (char **) NULL);
             break;
           }
         if (LocaleCompare("interword-spacing",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->interword_spacing=InterpretLocaleValue(token,
+            graphic_context[n]->interword_spacing=StringToDouble(token,
               (char **) NULL);
             break;
           }
@@ -2156,7 +2156,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("kerning",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->kerning=InterpretLocaleValue(token,
+            graphic_context[n]->kerning=StringToDouble(token,
               (char **) NULL);
             break;
           }
@@ -2195,7 +2195,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->alpha=ClampToQuantum((MagickRealType)
               QuantumRange*(1.0-((1.0-QuantumScale*graphic_context[n]->alpha)*
-              factor*InterpretLocaleValue(token,(char **) NULL))));
+              factor*StringToDouble(token,(char **) NULL))));
             graphic_context[n]->fill.alpha=(double) graphic_context[n]->alpha;
             graphic_context[n]->stroke.alpha=(double) graphic_context[n]->alpha;
             break;
@@ -2297,19 +2297,19 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(type,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                segment.x1=InterpretLocaleValue(token,(char **) NULL);
+                segment.x1=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.y1=InterpretLocaleValue(token,(char **) NULL);
+                segment.y1=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.x2=InterpretLocaleValue(token,(char **) NULL);
+                segment.x2=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.y2=InterpretLocaleValue(token,(char **) NULL);
+                segment.y2=StringToDouble(token,(char **) NULL);
                 if (LocaleCompare(type,"radial") == 0)
                   {
                     GetMagickToken(q,&q,token);
@@ -2359,22 +2359,22 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(name,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                bounds.x=(ssize_t) ceil(InterpretLocaleValue(token,
+                bounds.x=(ssize_t) ceil(StringToDouble(token,
                   (char **) NULL)-0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.y=(ssize_t) ceil(InterpretLocaleValue(token,
+                bounds.y=(ssize_t) ceil(StringToDouble(token,
                   (char **) NULL)-0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.width=(size_t) floor(InterpretLocaleValue(token,
+                bounds.width=(size_t) floor(StringToDouble(token,
                   (char **) NULL)+0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.height=(size_t) floor(InterpretLocaleValue(token,
+                bounds.height=(size_t) floor(StringToDouble(token,
                   (char **) NULL)+0.5);
                 for (p=q; *q != '\0'; )
                 {
@@ -2432,7 +2432,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("rotate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=InterpretLocaleValue(token,(char **) NULL);
+            angle=StringToDouble(token,(char **) NULL);
             affine.sx=cos(DegreesToRadians(fmod((double) angle,360.0)));
             affine.rx=sin(DegreesToRadians(fmod((double) angle,360.0)));
             affine.ry=(-sin(DegreesToRadians(fmod((double) angle,360.0))));
@@ -2453,24 +2453,24 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("scale",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=InterpretLocaleValue(token,(char **) NULL);
+            affine.sx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=InterpretLocaleValue(token,(char **) NULL);
+            affine.sy=StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("skewX",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=InterpretLocaleValue(token,(char **) NULL);
+            angle=StringToDouble(token,(char **) NULL);
             affine.ry=sin(DegreesToRadians(angle));
             break;
           }
         if (LocaleCompare("skewY",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=InterpretLocaleValue(token,(char **) NULL);
+            angle=StringToDouble(token,(char **) NULL);
             affine.rx=(-tan(DegreesToRadians(angle)/2.0));
             break;
           }
@@ -2557,7 +2557,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
                   GetMagickToken(q,&q,token);
                   if (*token == ',')
                     GetMagickToken(q,&q,token);
-                  graphic_context[n]->dash_pattern[j]=InterpretLocaleValue(
+                  graphic_context[n]->dash_pattern[j]=StringToDouble(
                     token,(char **) NULL);
                 }
                 if ((x & 0x01) != 0)
@@ -2573,7 +2573,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("stroke-dashoffset",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->dash_offset=InterpretLocaleValue(token,
+            graphic_context[n]->dash_offset=StringToDouble(token,
               (char **) NULL);
             break;
           }
@@ -2615,13 +2615,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
             GetMagickToken(q,&q,token);
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->stroke.alpha=(MagickRealType) QuantumRange*
-              factor*InterpretLocaleValue(token,(char **) NULL);
+              factor*StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("stroke-width",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->stroke_width=InterpretLocaleValue(token,
+            graphic_context[n]->stroke_width=StringToDouble(token,
               (char **) NULL);
             break;
           }
@@ -2679,11 +2679,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("translate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.tx=InterpretLocaleValue(token,(char **) NULL);
+            affine.tx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=InterpretLocaleValue(token,(char **) NULL);
+            affine.ty=StringToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -2695,23 +2695,23 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
         if (LocaleCompare("viewbox",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->viewbox.x=(ssize_t) ceil(InterpretLocaleValue(
+            graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(
               token,(char **) NULL)-0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            graphic_context[n]->viewbox.y=(ssize_t) ceil(InterpretLocaleValue(
+            graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(
               token,(char **) NULL)-0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
             graphic_context[n]->viewbox.width=(size_t) floor(
-              InterpretLocaleValue(token,(char **) NULL)+0.5);
+              StringToDouble(token,(char **) NULL)+0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
             graphic_context[n]->viewbox.height=(size_t) floor(
-              InterpretLocaleValue(token,(char **) NULL)+0.5);
+              StringToDouble(token,(char **) NULL)+0.5);
             break;
           }
         status=MagickFalse;
@@ -2759,11 +2759,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
       if (IsPoint(q) == MagickFalse)
         break;
       GetMagickToken(q,&q,token);
-      point.x=InterpretLocaleValue(token,(char **) NULL);
+      point.x=StringToDouble(token,(char **) NULL);
       GetMagickToken(q,&q,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
-      point.y=InterpretLocaleValue(token,(char **) NULL);
+      point.y=StringToDouble(token,(char **) NULL);
       GetMagickToken(q,(const char **) NULL,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
@@ -2845,7 +2845,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
           double
             value;
 
-          value=InterpretLocaleValue(s,&t);
+          value=StringToDouble(s,&t);
           (void) value;
           if (s == t)
             {
@@ -4783,14 +4783,14 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
         (void) CloneString(&draw_info->encoding,option);
       option=GetImageOption(image_info,"kerning");
       if (option != (const char *) NULL)
-        draw_info->kerning=InterpretLocaleValue(option,(char **) NULL);
+        draw_info->kerning=StringToDouble(option,(char **) NULL);
       option=GetImageOption(image_info,"interline-spacing");
       if (option != (const char *) NULL)
-        draw_info->interline_spacing=InterpretLocaleValue(option,
+        draw_info->interline_spacing=StringToDouble(option,
           (char **) NULL);
       option=GetImageOption(image_info,"interword-spacing");
       if (option != (const char *) NULL)
-        draw_info->interword_spacing=InterpretLocaleValue(option,
+        draw_info->interword_spacing=StringToDouble(option,
           (char **) NULL);
       option=GetImageOption(image_info,"direction");
       if (option != (const char *) NULL)
@@ -4808,7 +4808,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
           exception);
       option=GetImageOption(image_info,"strokewidth");
       if (option != (const char *) NULL)
-        draw_info->stroke_width=InterpretLocaleValue(option,(char **) NULL);
+        draw_info->stroke_width=StringToDouble(option,(char **) NULL);
       option=GetImageOption(image_info,"undercolor");
       if (option != (const char *) NULL)
         (void) QueryColorCompliance(option,AllCompliance,&draw_info->undercolor,
@@ -5286,15 +5286,15 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          arc.x=InterpretLocaleValue(token,(char **) NULL);
+          arc.x=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          arc.y=InterpretLocaleValue(token,(char **) NULL);
+          arc.y=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          angle=InterpretLocaleValue(token,(char **) NULL);
+          angle=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
@@ -5306,11 +5306,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=InterpretLocaleValue(token,(char **) NULL);
+          x=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=InterpretLocaleValue(token,(char **) NULL);
+          y=StringToDouble(token,(char **) NULL);
           end.x=(double) (attribute == (int) 'A' ? x : point.x+x);
           end.y=(double) (attribute == (int) 'A' ? y : point.y+y);
           TraceArcPath(q,point,end,arc,angle,large_arc,sweep);
@@ -5333,11 +5333,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=InterpretLocaleValue(token,(char **) NULL);
+            x=StringToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=InterpretLocaleValue(token,(char **) NULL);
+            y=StringToDouble(token,(char **) NULL);
             end.x=(double) (attribute == (int) 'C' ? x : point.x+x);
             end.y=(double) (attribute == (int) 'C' ? y : point.y+y);
             points[i]=end;
@@ -5358,7 +5358,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=InterpretLocaleValue(token,(char **) NULL);
+          x=StringToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'H' ? x: point.x+x);
           TracePoint(q,point);
           q+=q->coordinates;
@@ -5373,11 +5373,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=InterpretLocaleValue(token,(char **) NULL);
+          x=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=InterpretLocaleValue(token,(char **) NULL);
+          y=StringToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'L' ? x : point.x+x);
           point.y=(double) (attribute == (int) 'L' ? y : point.y+y);
           TracePoint(q,point);
@@ -5400,11 +5400,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=InterpretLocaleValue(token,(char **) NULL);
+          x=StringToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=InterpretLocaleValue(token,(char **) NULL);
+          y=StringToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'M' ? x : point.x+x);
           point.y=(double) (attribute == (int) 'M' ? y : point.y+y);
           if (i == 0)
@@ -5434,11 +5434,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=InterpretLocaleValue(token,(char **) NULL);
+            x=StringToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=InterpretLocaleValue(token,(char **) NULL);
+            y=StringToDouble(token,(char **) NULL);
             if (*p == ',')
               p++;
             end.x=(double) (attribute == (int) 'Q' ? x : point.x+x);
@@ -5469,11 +5469,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=InterpretLocaleValue(token,(char **) NULL);
+            x=StringToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=InterpretLocaleValue(token,(char **) NULL);
+            y=StringToDouble(token,(char **) NULL);
             if (*p == ',')
               p++;
             end.x=(double) (attribute == (int) 'S' ? x : point.x+x);
@@ -5509,11 +5509,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=InterpretLocaleValue(token,(char **) NULL);
+            x=StringToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=InterpretLocaleValue(token,(char **) NULL);
+            y=StringToDouble(token,(char **) NULL);
             end.x=(double) (attribute == (int) 'T' ? x : point.x+x);
             end.y=(double) (attribute == (int) 'T' ? y : point.y+y);
             points[i]=end;
@@ -5539,7 +5539,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=InterpretLocaleValue(token,(char **) NULL);
+          y=StringToDouble(token,(char **) NULL);
           point.y=(double) (attribute == (int) 'V' ? y : point.y+y);
           TracePoint(q,point);
           q+=q->coordinates;
index 1877b24cfc5521fc6bdb7abcd8bab79cd09f6172..5514776bbbc4616eb73e11d67cc4a8e23782557c 100644 (file)
@@ -573,19 +573,19 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
             {
               case 0:
               {
-                color_correction.red.slope=InterpretLocaleValue(token,
+                color_correction.red.slope=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 1:
               {
-                color_correction.green.slope=InterpretLocaleValue(token,
+                color_correction.green.slope=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 2:
               {
-                color_correction.blue.slope=InterpretLocaleValue(token,
+                color_correction.blue.slope=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
@@ -606,19 +606,19 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
             {
               case 0:
               {
-                color_correction.red.offset=InterpretLocaleValue(token,
+                color_correction.red.offset=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 1:
               {
-                color_correction.green.offset=InterpretLocaleValue(token,
+                color_correction.green.offset=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 2:
               {
-                color_correction.blue.offset=InterpretLocaleValue(token,
+                color_correction.blue.offset=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
@@ -639,19 +639,19 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
             {
               case 0:
               {
-                color_correction.red.power=InterpretLocaleValue(token,
+                color_correction.red.power=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 1:
               {
-                color_correction.green.power=InterpretLocaleValue(token,
+                color_correction.green.power=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
               case 2:
               {
-                color_correction.blue.power=InterpretLocaleValue(token,
+                color_correction.blue.power=StringToDouble(token,
                   (char **) NULL);
                 break;
               }
@@ -671,7 +671,7 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
           content=GetXMLTreeContent(saturation);
           p=(const char *) content;
           GetMagickToken(p,&p,token);
-          color_correction.saturation=InterpretLocaleValue(token,
+          color_correction.saturation=StringToDouble(token,
             (char **) NULL);
         }
     }
index 981373fadea3161af263a509505a219d0cb8f58f..afd37389736c5695c348b8bee6f0af081e0d41e5 100644 (file)
@@ -1175,7 +1175,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
     (double) channel,symbol);
   value=(const char *) GetValueFromSplayTree(fx_info->symbols,key);
   if (value != (const char *) NULL)
-    return(QuantumScale*InterpretLocaleValue(value,(char **) NULL));
+    return(QuantumScale*StringToDouble(value,(char **) NULL));
   (void) DeleteNodeFromSplayTree(fx_info->symbols,key);
   if (LocaleNCompare(symbol,"depth",5) == 0)
     {
@@ -1242,7 +1242,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
     }
   (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key),
     ConstantString(statistic));
-  return(QuantumScale*InterpretLocaleValue(statistic,(char **) NULL));
+  return(QuantumScale*StringToDouble(statistic,(char **) NULL));
 }
 
 static MagickRealType
@@ -1835,7 +1835,7 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
   }
   value=(const char *) GetValueFromSplayTree(fx_info->symbols,symbol);
   if (value != (const char *) NULL)
-    return((MagickRealType) InterpretLocaleValue(value,(char **) NULL));
+    return((MagickRealType) StringToDouble(value,(char **) NULL));
   (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
     "UnableToParseExpression","`%s'",symbol);
   return(0.0);
@@ -2876,7 +2876,7 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info,
       break;
   }
   q=(char *) expression;
-  alpha=InterpretLocaleValue(expression,&q);
+  alpha=InterpretSiPrefixValue(expression,&q);
   if (q == expression)
     return(FxGetSymbol(fx_info,channel,x,y,expression,exception));
   return(alpha);
index d5ab4144b9517c717372e6695b3005ebac05df77..fea3a269594f11c929b4b9f1801e5b65669a8d2b 100644 (file)
@@ -192,7 +192,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
   if (*p == '\0')
     return(flags);
   q=p;
-  value=InterpretLocaleValue(p,&q);
+  value=StringToDouble(p,&q);
   (void) value;
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
@@ -206,7 +206,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
       if (LocaleNCompare(p,"0x",2) == 0)
         *width=(size_t) strtol(p,&p,10);
       else
-        *width=(size_t) floor(InterpretLocaleValue(p,&p)+0.5);
+        *width=(size_t) floor(StringToDouble(p,&p)+0.5);
       if (p != q)
         flags|=WidthValue;
     }
@@ -221,7 +221,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
             Parse height.
           */
           q=p;
-          *height=(size_t) floor(InterpretLocaleValue(p,&p)+0.5);
+          *height=(size_t) floor(StringToDouble(p,&p)+0.5);
           if (p != q)
             flags|=HeightValue;
         }
@@ -234,7 +234,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
       if (*p == '-')
         flags|=XNegative;
       q=p;
-      *x=(ssize_t) ceil(InterpretLocaleValue(p,&p)-0.5);
+      *x=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
       if (p != q)
         flags|=XValue;
       if ((*p == '+') || (*p == '-'))
@@ -245,7 +245,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
           if (*p == '-')
             flags|=YNegative;
           q=p;
-          *y=(ssize_t) ceil(InterpretLocaleValue(p,&p)-0.5);
+          *y=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
           if (p != q)
             flags|=YValue;
         }
@@ -560,7 +560,7 @@ MagickExport MagickBooleanType IsSceneGeometry(const char *geometry,
   if (geometry == (const char *) NULL)
     return(MagickFalse);
   p=(char *) geometry;
-  value=InterpretLocaleValue(geometry,&p);
+  value=StringToDouble(geometry,&p);
   (void) value;
   if (p == geometry)
     return(MagickFalse);
@@ -671,33 +671,33 @@ MagickExport MagickStatusType ParseAffineGeometry(const char *geometry,
     {
       case 0:
       {
-        affine_matrix->sx=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->sx=StringToDouble(token,(char **) NULL);
         break;
       }
       case 1:
       {
-        affine_matrix->rx=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->rx=StringToDouble(token,(char **) NULL);
         break;
       }
       case 2:
       {
-        affine_matrix->ry=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->ry=StringToDouble(token,(char **) NULL);
         break;
       }
       case 3:
       {
-        affine_matrix->sy=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->sy=StringToDouble(token,(char **) NULL);
         break;
       }
       case 4:
       {
-        affine_matrix->tx=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->tx=StringToDouble(token,(char **) NULL);
         flags|=XValue;
         break;
       }
       case 5:
       {
-        affine_matrix->ty=InterpretLocaleValue(token,(char **) NULL);
+        affine_matrix->ty=StringToDouble(token,(char **) NULL);
         flags|=YValue;
         break;
       }
@@ -861,7 +861,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   if (*p == '\0')
     return(flags);
   q=p;
-  value=InterpretLocaleValue(p,&q);
+  value=StringToDouble(p,&q);
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
   c=(int) ((unsigned char) *q);
@@ -875,7 +875,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       if (LocaleNCompare(p,"0x",2) == 0)
         value=(double) strtol(p,&p,10);
       else
-        value=InterpretLocaleValue(p,&p);
+        value=StringToDouble(p,&p);
       if (p != q)
         {
           flags|=RhoValue;
@@ -898,7 +898,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           (*p != '-')))
         {
           q=p;
-          value=InterpretLocaleValue(p,&p);
+          value=StringToDouble(p,&p);
           if (p != q)
             {
               flags|=SigmaValue;
@@ -916,7 +916,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       if ((*p == ',') || (*p == '/') || (*p == ':'))
         p++;
       q=p;
-      value=InterpretLocaleValue(p,&p);
+      value=StringToDouble(p,&p);
       if (p != q)
         {
           flags|=XiValue;
@@ -935,7 +935,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           if ((*p == ',') || (*p == '/') || (*p == ':'))
             p++;
           q=p;
-          value=InterpretLocaleValue(p,&p);
+          value=StringToDouble(p,&p);
           if (p != q)
             {
               flags|=PsiValue;
@@ -955,7 +955,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           if ((*p == ',') || (*p == '/') || (*p == ':'))
             p++;
           q=p;
-          value=InterpretLocaleValue(p,&p);
+          value=StringToDouble(p,&p);
           if (p != q)
             {
               flags|=ChiValue;
index 2d54db2a7434c12dbeb4b5d58e41d101bc99e3a2..e6c30558a00b06daef4813e926c2e551aee3f6ab 100644 (file)
@@ -4130,7 +4130,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
       exception);
   option=GetImageOption(image_info,"bias");
   if (option != (const char *) NULL)
-    image->bias=InterpretLocaleInterval(option,QuantumRange);
+    image->bias=StringToDoubleInterval(option,QuantumRange);
   option=GetImageOption(image_info,"black-point-compensation");
   if (option != (const char *) NULL)
     image->black_point_compensation=(MagickBooleanType) ParseCommandOption(
@@ -4185,7 +4185,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
       MagickFalse,option);
   option=GetImageOption(image_info,"fuzz");
   if (option != (const char *) NULL)
-    image->fuzz=InterpretLocaleInterval(option,(double) QuantumRange+1.0);
+    image->fuzz=StringToDoubleInterval(option,(double) QuantumRange+1.0);
   option=GetImageOption(image_info,"gravity");
   if (option != (const char *) NULL)
     image->gravity=(GravityType) ParseCommandOption(MagickGravityOptions,
index 64a15d604fe479717f6af82cba8f88aee0aa2fee..9668321d13a92565d2efc760b31b714424046c7d 100644 (file)
@@ -885,31 +885,6 @@ MagickExport double InterpretLocaleValue(const char *restrict string,
   double
     value;
 
-  static const double
-    SIPrefixes['z'-'E'+1] =
-    {
-      ['y'-'E'] = (-24.0),
-      ['z'-'E'] = (-21.0),
-      ['a'-'E'] = (-18.0),
-      ['f'-'E'] = (-15.0),
-      ['p'-'E'] = (-12.0),
-      ['n'-'E'] = (-9.0),
-      ['u'-'E'] = (-6.0),
-      ['m'-'E'] = (-3.0),
-      ['c'-'E'] = (-2.0),
-      ['d'-'E'] = (-1.0),
-      ['h'-'E'] = 2.0,
-      ['k'-'E'] = 3.0,
-      ['K'-'E'] = 3.0,
-      ['M'-'E'] = 6.0,
-      ['G'-'E'] = 9.0,
-      ['T'-'E'] = 12.0,
-      ['P'-'E'] = 15.0,
-      ['E'-'E'] = 18.0,
-      ['Z'-'E'] = 21.0,
-      ['Y'-'E'] = 24.0
-    };
-
   if ((*string == '0') && ((string[1] | 0x20)=='x'))
     value=(double) strtoul(string,&q,16);
   else
@@ -927,34 +902,6 @@ MagickExport double InterpretLocaleValue(const char *restrict string,
       value=strtod(string,&q);
 #endif
     }
-  if (q != string)
-    {
-      if ((*q >= 'E') && (*q <= 'z'))
-        {
-          double
-            e;
-
-          e=SIPrefixes[*q-'E'];
-          if (e >= MagickEpsilon)
-            {
-              if (q[1] == 'i')
-                {
-                  value*=pow(2.0,e/0.3);
-                  q+=2;
-                }
-              else
-                {
-                  value*=pow(10.0,e);
-                  q++;
-                }
-            }
-        }
-      if (*q == 'B')
-        {
-          value*=8.0;
-          q++;
-        }
-    }
   if (sentinal != (char **) NULL)
     *sentinal=q;
   return(value);
index 139e3bfd2ea0a25eba876679461dd8e5d8669f4a..743ce7040e2a81c9230825800ac33e66c3fbd410 100644 (file)
@@ -331,7 +331,7 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
       kernel->values[i] = nan; /* do not include this value in kernel */
     }
     else {
-      kernel->values[i] = InterpretLocaleValue(token,(char **) NULL);
+      kernel->values[i] = StringToDouble(token,(char **) NULL);
       ( kernel->values[i] < 0)
           ?  ( kernel->negative_range += kernel->values[i] )
           :  ( kernel->positive_range += kernel->values[i] );
index da7e19cbb89d2d9c8d97df8d68b6caf0567b2890..ce4a5f11bc8ae001fdd99264cf564a32f79740c6 100644 (file)
@@ -3200,7 +3200,7 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
         }
       if (LocaleCompare(property,"bias") == 0)
         {
-          image->bias=InterpretLocaleInterval(value,QuantumRange);
+          image->bias=StringToDoubleInterval(value,QuantumRange);
           break;
         }
       status=AddValueToSplayTree((SplayTreeInfo *) image->properties,
index 28ca73c5ad19170c3f761e528bd7202b0635c2c5..2b117d8f734972cbfdae7bb9270897aca92b9461 100644 (file)
@@ -373,10 +373,10 @@ MagickExport void GetQuantumInfo(const ImageInfo *image_info,
       MagickQuantumFormatOptions,MagickFalse,option);
   option=GetImageOption(image_info,"quantum:minimum");
   if (option != (char *) NULL)
-    quantum_info->minimum=InterpretLocaleValue(option,(char **) NULL);
+    quantum_info->minimum=StringToDouble(option,(char **) NULL);
   option=GetImageOption(image_info,"quantum:maximum");
   if (option != (char *) NULL)
-    quantum_info->maximum=InterpretLocaleValue(option,(char **) NULL);
+    quantum_info->maximum=StringToDouble(option,(char **) NULL);
   if ((quantum_info->minimum == 0.0) && (quantum_info->maximum == 0.0))
     quantum_info->scale=0.0;
   else
@@ -390,7 +390,7 @@ MagickExport void GetQuantumInfo(const ImageInfo *image_info,
         quantum_info->minimum);
   option=GetImageOption(image_info,"quantum:scale");
   if (option != (char *) NULL)
-    quantum_info->scale=InterpretLocaleValue(option,(char **) NULL);
+    quantum_info->scale=StringToDouble(option,(char **) NULL);
   option=GetImageOption(image_info,"quantum:polarity");
   if (option != (char *) NULL)
     quantum_info->min_is_white=LocaleCompare(option,"min-is-white") == 0 ?
index d243ed9643dfb793956b604ea949c5493d0bf4ed..f9c59be9fcff26247a5d7a12fce981c9da9c22b4 100644 (file)
@@ -932,7 +932,7 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
   }
   artifact=GetImageArtifact(image,"filter:sigma");
   if (artifact != (const char *) NULL)
-    sigma=InterpretLocaleValue(artifact,(char **) NULL);  /* override sigma */
+    sigma=StringToDouble(artifact,(char **) NULL);  /* override sigma */
   if (GaussianFilter)
     {
       /*
@@ -944,17 +944,19 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
     }
   artifact=GetImageArtifact(image,"filter:blur");
   if (artifact != (const char *) NULL)
-    resize_filter->blur*=InterpretLocaleValue(artifact,
-      (char **) NULL);  /* override blur */
+    resize_filter->blur*=StringToDouble(artifact,(char **) NULL);  /* override blur */
   if (resize_filter->blur < MagickEpsilon)
     resize_filter->blur=(MagickRealType) MagickEpsilon;
   artifact=GetImageArtifact(image,"filter:lobes");
   if (artifact != (const char *) NULL)
     {
+      ssize_t
+        lobes;
+
       /*
         Override lobes.
       */
-      ssize_t lobes=(ssize_t) StringToLong(artifact);
+      lobes=(ssize_t) StringToLong(artifact);
       if (lobes < 1)
         lobes=1;
       resize_filter->support=(MagickRealType) lobes;
@@ -971,7 +973,7 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
     }
   artifact=GetImageArtifact(image,"filter:support");
   if (artifact != (const char *) NULL)
-    resize_filter->support=fabs(InterpretLocaleValue(artifact,
+    resize_filter->support=fabs(StringToDouble(artifact,
       (char **) NULL)); /* override support */
   /*
     Scale windowing function separately to the support 'clipping' window that
@@ -980,7 +982,7 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
   resize_filter->window_support=resize_filter->support; /* default */
   artifact=GetImageArtifact(image,"filter:win-support");
   if (artifact != (const char *) NULL)
-    resize_filter->window_support=fabs(InterpretLocaleValue(artifact,
+    resize_filter->window_support=fabs(StringToDouble(artifact,
       (char **) NULL));
   /*
     Adjust window function scaling to match windowing support for weighting
@@ -1005,18 +1007,18 @@ MagickPrivate ResizeFilter *AcquireResizeFilter(const Image *image,
       artifact=GetImageArtifact(image,"filter:b");
       if (artifact != (const char *) NULL)
         {
-          B=InterpretLocaleValue(artifact,(char **) NULL);
+          B=StringToDouble(artifact,(char **) NULL);
           C=(1.0-B)/2.0; /* Calculate C to get a Keys cubic filter. */
           artifact=GetImageArtifact(image,"filter:c"); /* user C override */
           if (artifact != (const char *) NULL)
-            C=InterpretLocaleValue(artifact,(char **) NULL);
+            C=StringToDouble(artifact,(char **) NULL);
         }
       else
         {
           artifact=GetImageArtifact(image,"filter:c");
           if (artifact != (const char *) NULL)
             {
-              C=InterpretLocaleValue(artifact,(char **) NULL);
+              C=StringToDouble(artifact,(char **) NULL);
               B=1.0-2.0*C; /* Calculate B to get a Keys cubic filter. */
             }
         }
index 1c417d056aa15a85433b095fd1c75bb727be9f17..b92e205c05af361c2d555fb97649d0ac1a9c0ee4 100644 (file)
@@ -899,7 +899,7 @@ static inline MagickSizeType StringToSizeType(const char *string,
   double
     value;
 
-  value=InterpretLocaleInterval(string,interval);
+  value=StringToDoubleInterval(string,interval);
   if (value >= (double) MagickULLConstant(~0))
     return(MagickULLConstant(~0));
   return((MagickSizeType) value);
index 47d431726c0d94b8e0bd30b0a93e03e5895ddd25..8c99324e24460222180f2bfd2d033abe56970e5b 100644 (file)
 extern "C" {
 #endif
 
-static inline double InterpretLocaleInterval(const char *string,
+#include <MagickCore/locale_.h>
+
+static inline double StringToDouble(const char *restrict string,
+  char **restrict sentinal)
+{
+  return(InterpretLocaleValue(string,sentinal));
+}
+
+static inline double StringToDoubleInterval(const char *string,
   const double interval)
 {
   char
@@ -31,26 +39,23 @@ static inline double InterpretLocaleInterval(const char *string,
   double
     value;
 
-  /*
-    Interpret string with International System of Units (SI) unit prefix.
-  */
-  value=InterpretLocaleValue(string,&q);
+  value=InterpretSiPrefixValue(string,&q);
   if (*q == '%')
     value*=interval/100.0;
   return(value);
 }
 
-static inline int StringToInteger(const char *value)
+static inline int StringToInteger(const char *restrict value)
 {
   return((int) strtol(value,(char **) NULL,10));
 }
 
-static inline long StringToLong(const char *value)
+static inline long StringToLong(const char *restrict value)
 {
   return(strtol(value,(char **) NULL,10));
 }
 
-static inline unsigned long StringToUnsignedLong(const char *value)
+static inline unsigned long StringToUnsignedLong(const char *restrict value)
 {
   return(strtoul(value,(char **) NULL,10));
 }
index dd6ded76958f43ad9b2e6715dddc9e076ad082e3..7fe1fac049db5eaa586d83f0f6af900817d81e9b 100644 (file)
@@ -1311,6 +1311,101 @@ MagickExport const char *GetStringInfoPath(const StringInfo *string_info)
 %                                                                             %
 %                                                                             %
 %                                                                             %
++   I n t e r p r e t S i P r e f i x V a l u e                               %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  InterpretSiPrefixValue() converts the initial portion of the string to a
+%  double representation.  It also recognizes SI prefixes (e.g. B, KB, MiB,
+%  etc.).
+%
+%  The format of the InterpretSiPrefixValue method is:
+%
+%      double InterpretSiPrefixValue(const char *value,char **sentinal)
+%
+%  A description of each parameter follows:
+%
+%    o value: the string value.
+%
+%    o sentinal:  if sentinal is not NULL, return a pointer to the character
+%      after the last character used in the conversion.
+%
+*/
+MagickExport double InterpretSiPrefixValue(const char *restrict string,
+  char **restrict sentinal)
+{
+  char
+    *q;
+
+  double
+    value;
+
+  static const double
+    SIPrefixes['z'-'E'+1] =
+    {
+      ['y'-'E'] = (-24.0),
+      ['z'-'E'] = (-21.0),
+      ['a'-'E'] = (-18.0),
+      ['f'-'E'] = (-15.0),
+      ['p'-'E'] = (-12.0),
+      ['n'-'E'] = (-9.0),
+      ['u'-'E'] = (-6.0),
+      ['m'-'E'] = (-3.0),
+      ['c'-'E'] = (-2.0),
+      ['d'-'E'] = (-1.0),
+      ['h'-'E'] = 2.0,
+      ['k'-'E'] = 3.0,
+      ['K'-'E'] = 3.0,
+      ['M'-'E'] = 6.0,
+      ['G'-'E'] = 9.0,
+      ['T'-'E'] = 12.0,
+      ['P'-'E'] = 15.0,
+      ['E'-'E'] = 18.0,
+      ['Z'-'E'] = 21.0,
+      ['Y'-'E'] = 24.0
+    };
+
+  value=InterpretLocaleValue(string,&q);
+  if (q != string)
+    {
+      if ((*q >= 'E') && (*q <= 'z'))
+        {
+          double
+            e;
+
+          e=SIPrefixes[*q-'E'];
+          if (e >= MagickEpsilon)
+            {
+              if (q[1] == 'i')
+                {
+                  value*=pow(2.0,e/0.3);
+                  q+=2;
+                }
+              else
+                {
+                  value*=pow(10.0,e);
+                  q++;
+                }
+            }
+        }
+      if (*q == 'B')
+        {
+          value*=8.0;
+          q++;
+        }
+    }
+  if (sentinal != (char **) NULL)
+    *sentinal=q;
+  return(value);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %   L o c a l e C o m p a r e                                                 %
 %                                                                             %
 %                                                                             %
index fd91415d88d0fc2176a24542bf127218f56f2b54..712e863a233409f4cd3ecbe159bc3e5b2e66fa85 100644 (file)
@@ -57,6 +57,9 @@ extern MagickExport char
 extern MagickExport const char
   *GetStringInfoPath(const StringInfo *);
 
+extern MagickExport double
+  InterpretSiPrefixValue(const char *restrict,char **restrict);
+
 extern MagickExport int
   CompareStringInfo(const StringInfo *,const StringInfo *),
   LocaleCompare(const char *,const char *),
index e42e3abada6a4f5b6848df75b32c2a00f9d63d57..cb200c66518314cbd63c5944bf681a119b4a2a09 100644 (file)
@@ -1273,7 +1273,7 @@ MagickExport MagickBooleanType OrderedPosterizeImage(Image *image,
       GetMagickToken(p,&p,token);
       if (*token == ',')
         GetMagickToken(p,&p,token);
-      levels[i]=InterpretLocaleValue(token,(char **) NULL);
+      levels[i]=StringToDouble(token,(char **) NULL);
     }
   for (i=0; i < MaxPixelChannels; i++)
     if (fabs(levels[i]) >= 1)
index fbc732d31448c5210d56ec6ea638794c3a41684f..73deea4b494c8999782be354a9012dcf4c6b42ce 100644 (file)
@@ -230,7 +230,7 @@ MagickExport void GetMagickToken(const char *start,const char **end,char *token)
         char
           *q;
 
-        value=InterpretLocaleValue(p,&q);
+        value=StringToDouble(p,&q);
         (void) value;
         if ((p != q) && (*p != ','))
           {
index 0b09f453acb3b278052f2631ca65fd9e026c0326..46acd4ce1fd79cef3bb58b25205aaab169b19468 100644 (file)
@@ -1008,7 +1008,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowAnimateException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowAnimateInvalidArgumentException(option,argv[i]);
index 93e9a8b33257d120816a1aae3ba71c3b81ad609f..481b38ede9003998e2bedebd05b3560bcdcc5f24 100644 (file)
@@ -529,7 +529,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
             if (*option == '+')
               dissimilarity_threshold=DefaultDissimilarityThreshold;
             else
-              dissimilarity_threshold=InterpretLocaleValue(argv[i],
+              dissimilarity_threshold=StringToDouble(argv[i],
                 (char **) NULL);
             break;
           }
@@ -660,7 +660,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowCompareException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowCompareInvalidArgumentException(option,argv[i]);
index 00dcf0b82ccc14afbaf2cf58cb0b54ea4c1a3540..fbc640755336dd39b722c523c36750df07a83fe1 100644 (file)
@@ -1134,7 +1134,7 @@ WandExport MagickBooleanType CompositeImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowCompositeException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowCompositeInvalidArgumentException(option,argv[i]);
index 44655487b37449193668c863b4dd402e88648980..e990ca420981cf6089be2479a150ea8965061a6d 100644 (file)
@@ -1853,7 +1853,7 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowConvertException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowConvertInvalidArgumentException(option,argv[i]);
index 49d3868d91bc20ffec1fd8d8fac835694e643ed2..4fe2bfb7d31a7f86b2c99c433d0d73dc574c3cd0 100644 (file)
@@ -1314,7 +1314,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowDisplayException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowDisplayInvalidArgumentException(option,argv[i]);
@@ -1850,7 +1850,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowDisplayException(OptionError,"MissingArgument",option);
-            if (InterpretLocaleValue(argv[i],(char **) NULL) != 0)
+            if (StringToDouble(argv[i],(char **) NULL) != 0)
               resource_info.window_group=argv[i];
             break;
           }
index 89102c5b5d30b930ffdd89129de23be4ff5ef43b..5253879769adb6cc42de92b123ef14a7c5846da6 100644 (file)
@@ -6190,7 +6190,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
         CurrentContext->fill.alpha=ClampToQuantum((MagickRealType)
-          QuantumRange*(1.0-InterpretLocaleValue(value,(char **) NULL)));
+          QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
     }
   child=GetXMLTreeChild(xml_info,"fill-rule");
   if (child != (XMLTreeInfo *) NULL)
@@ -6211,7 +6211,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->pointsize=InterpretLocaleValue(value,(char **) NULL);
+        CurrentContext->pointsize=StringToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"font-stretch");
   if (child != (XMLTreeInfo *) NULL)
@@ -6307,7 +6307,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                CurrentContext->dash_pattern[j]=InterpretLocaleValue(token,
+                CurrentContext->dash_pattern[j]=StringToDouble(token,
                   (char **) NULL);
               }
               if ((x & 0x01) != 0)
@@ -6323,7 +6323,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->dash_offset=InterpretLocaleValue(value,(char **) NULL);
+        CurrentContext->dash_offset=StringToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"stroke-linecap");
   if (child != (XMLTreeInfo *) NULL)
@@ -6354,14 +6354,14 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
         CurrentContext->stroke.alpha=ClampToQuantum((MagickRealType)
-          QuantumRange*(1.0-InterpretLocaleValue(value,(char **) NULL)));
+          QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
     }
   child=GetXMLTreeChild(xml_info,"stroke-width");
   if (child != (XMLTreeInfo *) NULL)
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->stroke_width=InterpretLocaleValue(value,(char **) NULL);
+        CurrentContext->stroke_width=StringToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"text-align");
   if (child != (XMLTreeInfo *) NULL)
index df1c0717285a2eca7d0b0bd0a0ee56dbf1b900c7..7d0c969045236365db344e125ae0f034ee96095e 100644 (file)
@@ -639,7 +639,7 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowIdentifyException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowIdentifyInvalidArgumentException(option,argv[i]);
index a23f05783e85367af42c929c9b19c89501134015..0f37727585d0a58afea53398e2217345a8032e7c 100644 (file)
@@ -944,7 +944,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowImportException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowImportInvalidArgumentException(option,argv[i]);
index b431aaffdcf52d8388f2bed0f719386a2f51ac14..972f9fbf32fda5040ceca550de789aa68e167b8e 100644 (file)
@@ -1538,7 +1538,7 @@ WandExport double *MagickGetSamplingFactors(MagickWand *wand,
     while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
            (*p == ',')))
       p++;
-    sampling_factors[i]=InterpretLocaleValue(p,(char **) NULL);
+    sampling_factors[i]=StringToDouble(p,(char **) NULL);
     i++;
   }
   *number_factors=(size_t) i;
index f961d3ec99f54cbad5e98fb17f3e55efc24f322d..d002e861b8bc417b34ce3f1ef7dc2c13342cc17f 100644 (file)
@@ -153,7 +153,7 @@ WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
     if (LocaleCompare("debug",option+1) == 0)
       (void) SetLogEventMask(argv[++i]);
     if (LocaleCompare("duration",option+1) == 0)
-      duration=InterpretLocaleValue(argv[++i],(char **) NULL);
+      duration=StringToDouble(argv[++i],(char **) NULL);
     if (LocaleCompare("regard-warnings",option+1) == 0)
       regard_warnings=MagickTrue;
   }
@@ -508,7 +508,7 @@ static Image *SparseColorOption(const Image *image,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
     /* Y coordinate */
     token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,token);
     if ( token[0] == '\0' ) break;
@@ -519,7 +519,7 @@ static Image *SparseColorOption(const Image *image,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
     /* color values for this control point */
 #if 0
     if ( (color_from_image ) {
@@ -556,7 +556,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
@@ -564,7 +564,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
@@ -572,7 +572,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
@@ -581,7 +581,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
@@ -590,7 +590,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
       }
@@ -824,7 +824,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
                 attenuate=1.0;
                 break;
               }
-            attenuate=InterpretLocaleValue(argv[i+1],(char **) NULL);
+            attenuate=StringToDouble(argv[i+1],(char **) NULL);
             break;
           }
         if (LocaleCompare("auto-gamma",option+1) == 0)
@@ -1309,7 +1309,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             if (*option == '+')
               threshold=40.0*QuantumRange/100.0;
             else
-              threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+              threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
             mogrify_image=DeskewImage(*image,threshold,exception);
             break;
           }
@@ -1394,7 +1394,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              arguments[x]=InterpretLocaleValue(token,(char **) NULL);
+              arguments[x]=StringToDouble(token,(char **) NULL);
             }
             args=DestroyString(args);
             mogrify_image=DistortImage(*image,method,number_arguments,arguments,
@@ -1507,7 +1507,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             (void) SyncImageSettings(mogrify_info,*image,exception);
             op=(MagickEvaluateOperator) ParseCommandOption(
               MagickEvaluateOptions,MagickFalse,argv[i+1]);
-            constant=InterpretLocaleInterval(argv[i+2],QuantumRange);
+            constant=StringToDoubleInterval(argv[i+2],QuantumRange);
             (void) EvaluateImage(*image,op,constant,exception);
             break;
           }
@@ -1702,7 +1702,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              parameters[x]=InterpretLocaleValue(token,(char **) NULL);
+              parameters[x]=StringToDouble(token,(char **) NULL);
             }
             arguments=DestroyString(arguments);
             (void) FunctionImage(*image,function,number_parameters,parameters,
@@ -1721,9 +1721,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image,exception);
             if (*option == '+')
-              (*image)->gamma=InterpretLocaleValue(argv[i+1],(char **) NULL);
+              (*image)->gamma=StringToDouble(argv[i+1],(char **) NULL);
             else
-              (void) GammaImage(*image,InterpretLocaleValue(argv[i+1],
+              (void) GammaImage(*image,StringToDouble(argv[i+1],
                 (char **) NULL),exception);
             break;
           }
@@ -1978,7 +1978,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("linewidth",option+1) == 0)
           {
-            draw_info->stroke_width=InterpretLocaleValue(argv[i+1],
+            draw_info->stroke_width=StringToDouble(argv[i+1],
               (char **) NULL);
             break;
           }
@@ -2618,7 +2618,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               Sepia-tone image.
             */
             (void) SyncImageSettings(mogrify_info,*image,exception);
-            threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+            threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
             mogrify_image=SepiaToneImage(*image,threshold,exception);
             break;
           }
@@ -2782,7 +2782,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               threshold;
 
             (void) SyncImageSettings(mogrify_info,*image,exception);
-            threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+            threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
             (void) SolarizeImage(*image,threshold,exception);
             break;
           }
@@ -2888,7 +2888,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("strokewidth",option+1) == 0)
           {
-            draw_info->stroke_width=InterpretLocaleValue(argv[i+1],
+            draw_info->stroke_width=StringToDouble(argv[i+1],
               (char **) NULL);
             break;
           }
@@ -2930,7 +2930,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             if (*option == '+')
               threshold=(double) QuantumRange/2;
             else
-              threshold=InterpretLocaleInterval(argv[i+1],QuantumRange);
+              threshold=StringToDoubleInterval(argv[i+1],QuantumRange);
             (void) BilevelImage(*image,threshold,exception);
             break;
           }
@@ -4929,7 +4929,7 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowMogrifyException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowMogrifyInvalidArgumentException(option,argv[i]);
@@ -6247,7 +6247,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
 
             limit=MagickResourceInfinity;
             if (LocaleCompare("unlimited",argv[i+1]) != 0)
-              limit=(MagickSizeType) InterpretLocaleInterval(argv[i+1],100.0);
+              limit=(MagickSizeType) StringToDoubleInterval(argv[i+1],100.0);
             (void) SetMagickResourceLimit(MemoryResource,limit);
             (void) SetMagickResourceLimit(MapResource,2*limit);
             break;
@@ -6525,8 +6525,8 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
                 (void) SetImageOption(image_info,option+1,"0");
                 break;
               }
-            image_info->fuzz=InterpretLocaleInterval(argv[i+1],(double) QuantumRange+
-              1.0);
+            image_info->fuzz=StringToDoubleInterval(argv[i+1],(double)
+              QuantumRange+1.0);
             (void) SetImageOption(image_info,option+1,argv[i+1]);
             break;
           }
@@ -6653,7 +6653,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
               MagickFalse,argv[i+1]);
             limit=MagickResourceInfinity;
             if (LocaleCompare("unlimited",argv[i+2]) != 0)
-              limit=(MagickSizeType) InterpretLocaleInterval(argv[i+2],100.0);
+              limit=(MagickSizeType) StringToDoubleInterval(argv[i+2],100.0);
             (void) SetMagickResourceLimit(type,limit);
             break;
           }
index bb0919d6e46740b8df88c7fdbaf1cd2decedc606..1995b1d5447ca3a2a17dbdf1f5b50b0b5bf3a130 100644 (file)
@@ -1137,7 +1137,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowMontageException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowMontageInvalidArgumentException(option,argv[i]);
@@ -1282,7 +1282,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               ThrowMontageException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowMontageInvalidArgumentException(option,argv[i]);
-            montage_info->pointsize=InterpretLocaleValue(argv[i],
+            montage_info->pointsize=StringToDouble(argv[i],
               (char **) NULL);
             break;
           }
index 1b9e7298868dfb4fa46b011f89d3c1821f0f6720..8881e165d1cf3ddab82cd834868abd8c4ce4d352 100644 (file)
@@ -265,7 +265,7 @@ static Image *SparseColorOption(const Image *image,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
     /* Y coordinate */
     token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,token);
     if ( token[0] == '\0' ) break;
@@ -276,7 +276,7 @@ static Image *SparseColorOption(const Image *image,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
     /* color values for this control point */
 #if 0
     if ( (color_from_image ) {
@@ -314,7 +314,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
@@ -322,7 +322,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
@@ -330,7 +330,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
@@ -339,7 +339,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
@@ -348,7 +348,7 @@ static Image *SparseColorOption(const Image *image,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=InterpretLocaleValue(token,(char **) NULL);
+          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
       }
@@ -557,7 +557,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare("unlimited",arg) != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(arg,100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(arg,100.0);
           (void) SetMagickResourceLimit(MemoryResource,limit);
           (void) SetMagickResourceLimit(MapResource,2*limit);
           break;
@@ -832,7 +832,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
           */
           if (IfSetOption)
             {
-              image_info->fuzz=InterpretLocaleInterval(arg,(double) QuantumRange+1.0);
+              image_info->fuzz=StringToDoubleInterval(arg,(double) QuantumRange+1.0);
               (void) SetImageOption(image_info,option,arg);
               break;
             }
@@ -901,7 +901,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
 
           value = IfSetOption ? arg : "0"; /* undefined? */
           (void) SetImageOption(image_info,option, value);
-          draw_info->interline_spacing=InterpretLocaleValue(value,
+          draw_info->interline_spacing=StringToDouble(value,
                (char **) NULL);
           break;
         }
@@ -922,7 +922,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
 
           value = IfSetOption ? arg : "0"; /* undefined? */
           (void) SetImageOption(image_info,option, value);
-          draw_info->interword_spacing=InterpretLocaleValue(value,
+          draw_info->interword_spacing=StringToDouble(value,
                (char **) NULL);
           break;
         }
@@ -937,7 +937,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
 
           value = IfSetOption ? arg : "0"; /* undefined? */
           (void) SetImageOption(image_info,option, value);
-          draw_info->kerning=InterpretLocaleValue(value,(char **) NULL);
+          draw_info->kerning=StringToDouble(value,(char **) NULL);
           break;
         }
       break;
@@ -965,7 +965,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             MagickFalse,arg);
           limit=MagickResourceInfinity;
           if (LocaleCompare("unlimited",argv[2]) != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(argv[2],100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(argv[2],100.0);
           (void) SetMagickResourceLimit(type,limit);
           break;
         }
@@ -1181,7 +1181,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             value=12.0;
 
           if (IfSetOption)
-            InterpretLocaleValue(arg,(char **) NULL);
+            StringToDouble(arg,(char **) NULL);
           image_info->pointsize=draw_info->pointsize=value;
           break;
         }
@@ -1334,7 +1334,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
           const char
             *value = IfSetOption ? arg : "1.0";
           (void) SetImageOption(image_info,option,value);
-          draw_info->stroke_width=InterpretLocaleValue(value,(char **) NULL);
+          draw_info->stroke_width=StringToDouble(value,(char **) NULL);
           break;
         }
       if (LocaleCompare("style",option) == 0)
@@ -2115,7 +2115,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
           if (*argv[0] == '+')
             threshold=40.0*QuantumRange/100.0;
           else
-            threshold=InterpretLocaleInterval(args[0],QuantumRange);
+            threshold=StringToDoubleInterval(args[0],QuantumRange);
           new_image=DeskewImage(*image,threshold,exception);
           break;
         }
@@ -2200,7 +2200,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            arguments[x]=InterpretLocaleValue(token,(char **) NULL);
+            arguments[x]=StringToDouble(token,(char **) NULL);
           }
           args=DestroyString(args);
           new_image=DistortImage(*image,method,number_arguments,arguments,
@@ -2276,7 +2276,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
           (void) SyncImageSettings(image_info,*image,exception);
           op=(MagickEvaluateOperator) ParseCommandOption(
             MagickEvaluateOptions,MagickFalse,args[0]);
-          constant=InterpretLocaleInterval(argv[2],QuantumRange);
+          constant=StringToDoubleInterval(argv[2],QuantumRange);
           (void) EvaluateImage(*image,op,constant,exception);
           break;
         }
@@ -2418,7 +2418,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            parameters[x]=InterpretLocaleValue(token,(char **) NULL);
+            parameters[x]=StringToDouble(token,(char **) NULL);
           }
           arguments=DestroyString(arguments);
           (void) FunctionImage(*image,function,number_parameters,parameters,
@@ -2434,9 +2434,9 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
         {
           (void) SyncImageSettings(image_info,*image,exception);
           if (*argv[0] == '+')
-            (*image)->gamma=InterpretLocaleValue(args[0],(char **) NULL);
+            (*image)->gamma=StringToDouble(args[0],(char **) NULL);
           else
-            (void) GammaImage(*image,InterpretLocaleValue(args[0],
+            (void) GammaImage(*image,StringToDouble(args[0],
               (char **) NULL),exception);
           break;
         }
@@ -2678,7 +2678,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
         }
       if (LocaleCompare("linewidth",option) == 0)
         {
-          draw_info->stroke_width=InterpretLocaleValue(args[0],
+          draw_info->stroke_width=StringToDouble(args[0],
             (char **) NULL);
           break;
         }
@@ -3218,7 +3218,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             threshold;
 
           (void) SyncImageSettings(image_info,*image,exception);
-          threshold=InterpretLocaleInterval(args[0],QuantumRange);
+          threshold=StringToDoubleInterval(args[0],QuantumRange);
           new_image=SepiaToneImage(*image,threshold,exception);
           break;
         }
@@ -3354,7 +3354,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
             threshold;
 
           (void) SyncImageSettings(image_info,*image,exception);
-          threshold=InterpretLocaleInterval(args[0],QuantumRange);
+          threshold=StringToDoubleInterval(args[0],QuantumRange);
           (void) SolarizeImage(*image,threshold,exception);
           break;
         }
@@ -3433,7 +3433,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand,
           if (*argv[0] == '+')
             threshold=(double) QuantumRange/2;
           else
-            threshold=InterpretLocaleInterval(args[0],QuantumRange);
+            threshold=StringToDoubleInterval(args[0],QuantumRange);
           (void) BilevelImage(*image,threshold,exception);
           break;
         }
index ac14535e3b00c057495a1fe0ca69f54b6bf61f8f..151e7e522326e65245398333bac7f866e429b0e8 100644 (file)
@@ -547,7 +547,7 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowStreamException(OptionError,"MissingArgument",option);
-            value=InterpretLocaleValue(argv[i],&p);
+            value=StringToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowStreamInvalidArgumentException(option,argv[i]);
index 8bc91dd279938f5f7d25bc03865dda0d78fd2cf3..068fb1d97b51a9315d039a5a525bd4b493e09566 100644 (file)
@@ -1026,7 +1026,7 @@ static struct PackageInfo *GetPackageInfo(pTHX_ void *reference,
 %
 */
 
-static double InterpretLocaleInterval(const char *string,const double interval)
+static double StringToDoubleInterval(const char *string,const double interval)
 {
   char
     *q;
@@ -1035,7 +1035,7 @@ static double InterpretLocaleInterval(const char *string,const double interval)
     scale,
     value;
 
-  value=InterpretLocaleValue(string,&q);
+  value=StringToDouble(string,&q);
   scale=1000.0;
   if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))
     scale=1024.0;
@@ -1137,7 +1137,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(AreaResource,limit);
           break;
         }
@@ -1175,7 +1175,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
       if (LocaleCompare(attribute,"bias") == 0)
         {
           for ( ; image; image=image->next)
-            image->bias=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+            image->bias=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
           break;
         }
       if (LocaleCompare(attribute,"blue-primary") == 0)
@@ -1213,9 +1213,9 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
       if (LocaleCompare(attribute,"cache-threshold") == 0)
         {
           (void) SetMagickResourceLimit(MemoryResource,(MagickSizeType)
-            InterpretLocaleInterval(SvPV(sval,na),100.0));
+            StringToDoubleInterval(SvPV(sval,na),100.0));
           (void) SetMagickResourceLimit(MapResource,(MagickSizeType)
-            (2*InterpretLocaleInterval(SvPV(sval,na),100.0)));
+            (2*StringToDoubleInterval(SvPV(sval,na),100.0)));
           break;
         }
       if (LocaleCompare(attribute,"clip-mask") == 0)
@@ -1340,7 +1340,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(DiskResource,limit);
           break;
         }
@@ -1505,9 +1505,9 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
       if (LocaleCompare(attribute,"fuzz") == 0)
         {
           if (info)
-            info->image_info->fuzz=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+            info->image_info->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
           for ( ; image; image=image->next)
-            image->fuzz=InterpretLocaleInterval(SvPV(sval,na),QuantumRange);
+            image->fuzz=StringToDoubleInterval(SvPV(sval,na),QuantumRange);
           break;
         }
       if (info)
@@ -1665,7 +1665,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(MapResource,limit);
           break;
         }
@@ -1712,7 +1712,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(MemoryResource,limit);
           break;
         }
@@ -2035,7 +2035,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(ThreadResource,limit);
           break;
         }
@@ -2060,7 +2060,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(SvPV(sval,na),"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(SvPV(sval,na),100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(SvPV(sval,na),100.0);
           (void) SetMagickResourceLimit(TimeResource,limit);
           break;
         }
@@ -3180,7 +3180,7 @@ Compare(ref,...)
         {
           if (LocaleCompare(attribute,"fuzz") == 0)
             {
-              image->fuzz=InterpretLocaleInterval(SvPV(ST(i),na),100.0);
+              image->fuzz=StringToDoubleInterval(SvPV(ST(i),na),100.0);
               break;
             }
           ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
@@ -7623,7 +7623,7 @@ Mogrify(ref,...)
             geometry.y=argument_list[4].integer_reference;
           if (attribute_flag[5] != 0)
             image->fuzz=
-              InterpretLocaleInterval(argument_list[5].string_reference,QuantumRange);
+              StringToDoubleInterval(argument_list[5].string_reference,QuantumRange);
           image=CropImage(image,&geometry,exception);
           break;
         }
@@ -8222,7 +8222,7 @@ Mogrify(ref,...)
               invert=MagickTrue;
             }
           if (attribute_flag[5] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
               QuantumRange);
           if (attribute_flag[6] != 0)
             invert=(MagickBooleanType) argument_list[6].integer_reference;
@@ -8258,7 +8258,7 @@ Mogrify(ref,...)
             {
               if (compose != DissolveCompositeOp)
                 (void) SetImageAlpha(composite_image,(Quantum)
-                  InterpretLocaleInterval(argument_list[6].string_reference,
+                  StringToDoubleInterval(argument_list[6].string_reference,
                   QuantumRange),exception);
               else
                 {
@@ -8286,7 +8286,7 @@ Mogrify(ref,...)
                   */
                   (void) CloneString(&image->geometry,
                     argument_list[6].string_reference);
-                  opacity=(Quantum) InterpretLocaleInterval(
+                  opacity=(Quantum) StringToDoubleInterval(
                     argument_list[6].string_reference,QuantumRange);
                   if (composite_image->matte != MagickTrue)
                     (void) SetImageAlpha(composite_image,OpaqueAlpha,exception);
@@ -8727,7 +8727,7 @@ Mogrify(ref,...)
                 (double) argument_list[4].real_reference);
               argument_list[0].string_reference=message;
             }
-          (void) GammaImage(image,InterpretLocaleValue(
+          (void) GammaImage(image,StringToDouble(
             argument_list[0].string_reference,(char **) NULL),exception);
           break;
         }
@@ -8789,10 +8789,10 @@ Mogrify(ref,...)
             QueryColorCompliance(argument_list[4].string_reference,
               AllCompliance,&target,exception);
           if (attribute_flag[3] != 0)
-            target.alpha=InterpretLocaleInterval(argument_list[3].string_reference,
+            target.alpha=StringToDoubleInterval(argument_list[3].string_reference,
               QuantumRange);
           if (attribute_flag[5] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
               QuantumRange);
           invert=MagickFalse;
           if (attribute_flag[6] != 0)
@@ -8887,7 +8887,7 @@ Mogrify(ref,...)
             (void) QueryColorCompliance(argument_list[1].string_reference,
               AllCompliance,&fill_color,exception);
           if (attribute_flag[2] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[2].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
               QuantumRange);
           if (attribute_flag[3] != 0)
             channel=(ChannelType) argument_list[3].integer_reference;
@@ -9006,7 +9006,7 @@ Mogrify(ref,...)
             flags=ParseGeometry(argument_list[0].string_reference,
               &geometry_info);
           if (attribute_flag[1] != 0)
-            geometry_info.rho=InterpretLocaleInterval(
+            geometry_info.rho=StringToDoubleInterval(
              argument_list[1].string_reference,QuantumRange);
           (void) SolarizeImage(image,geometry_info.rho,exception);
           break;
@@ -9059,10 +9059,10 @@ Mogrify(ref,...)
               AllCompliance,&target,exception);
           opacity=TransparentAlpha;
           if (attribute_flag[1] != 0)
-            opacity=InterpretLocaleInterval(argument_list[1].string_reference,
+            opacity=StringToDoubleInterval(argument_list[1].string_reference,
               QuantumRange);
           if (attribute_flag[2] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[2].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[2].string_reference,
               QuantumRange);
           if (attribute_flag[3] == 0)
             argument_list[3].integer_reference=0;
@@ -9082,7 +9082,7 @@ Mogrify(ref,...)
             argument_list[0].string_reference="50%";
           if (attribute_flag[1] != 0)
             channel=(ChannelType) argument_list[1].integer_reference;
-          threshold=InterpretLocaleInterval(argument_list[0].string_reference,
+          threshold=StringToDoubleInterval(argument_list[0].string_reference,
             QuantumRange);
           channel_mask=SetPixelChannelMask(image,channel);
           (void) BilevelImage(image,threshold,exception);
@@ -9111,7 +9111,7 @@ Mogrify(ref,...)
         case 59:  /* Trim */
         {
           if (attribute_flag[0] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[0].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[0].string_reference,
               QuantumRange);
           image=TrimImage(image,exception);
           break;
@@ -9247,7 +9247,7 @@ Mogrify(ref,...)
           if (attribute_flag[1] != 0)
             channel=(ChannelType) argument_list[1].integer_reference;
           if (attribute_flag[2] != 0)
-            image->bias=InterpretLocaleInterval(argument_list[2].string_reference,
+            image->bias=StringToDoubleInterval(argument_list[2].string_reference,
               QuantumRange);
           if (attribute_flag[3] != 0)
             {
@@ -9600,7 +9600,7 @@ Mogrify(ref,...)
               goto PerlException;
             }
           if (attribute_flag[1] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[1].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[1].string_reference,
               QuantumRange);
           (void) IsImagesEqual(image,argument_list[0].image_reference,
             exception);
@@ -9773,7 +9773,7 @@ Mogrify(ref,...)
           if (attribute_flag[4] != 0)
             geometry.y=argument_list[4].integer_reference;
           if (attribute_flag[5] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
               QuantumRange);
           if (attribute_flag[6] != 0)
             (void) QueryColorCompliance(argument_list[6].string_reference,
@@ -9898,7 +9898,7 @@ Mogrify(ref,...)
           if (attribute_flag[4] != 0)
             geometry.y=argument_list[4].integer_reference;
           if (attribute_flag[5] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
               QuantumRange);
           if (attribute_flag[6] != 0)
             (void) QueryColorCompliance(argument_list[6].string_reference,
@@ -10273,7 +10273,7 @@ Mogrify(ref,...)
             QueryColorCompliance(argument_list[4].string_reference,
               AllCompliance,&target,exception);
           if (attribute_flag[5] != 0)
-            image->fuzz=InterpretLocaleInterval(argument_list[5].string_reference,
+            image->fuzz=StringToDoubleInterval(argument_list[5].string_reference,
               QuantumRange);
           if (attribute_flag[6] != 0)
             channel=(ChannelType) argument_list[6].integer_reference;
@@ -10392,7 +10392,7 @@ Mogrify(ref,...)
             flags=ParseGeometry(argument_list[0].string_reference,
               &geometry_info);
           if (attribute_flag[1] != 0)
-            geometry_info.rho=InterpretLocaleInterval(
+            geometry_info.rho=StringToDoubleInterval(
               argument_list[1].string_reference,QuantumRange);
           image=DeskewImage(image,geometry_info.rho,exception);
           break;
index f7363df215fc21e2b202c7789a144b3f1bb6b11d..a0508e5bd231350a4f833199a8285d4406b8ea7e 100644 (file)
@@ -1078,12 +1078,12 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
   cin.origination.x_pitch=0.0f;
   value=GetCINProperty(image_info,image,"dpx:origination.x_pitch",exception);
   if (value != (const char *) NULL)
-    cin.origination.x_pitch=InterpretLocaleValue(value,(char **) NULL);
+    cin.origination.x_pitch=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.origination.x_pitch);
   cin.origination.y_pitch=0.0f;
   value=GetCINProperty(image_info,image,"dpx:origination.y_pitch",exception);
   if (value != (const char *) NULL)
-    cin.origination.y_pitch=InterpretLocaleValue(value,(char **) NULL);
+    cin.origination.y_pitch=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.origination.y_pitch);
   cin.origination.gamma=image->gamma;
   offset+=WriteBlobFloat(image,cin.origination.gamma);
@@ -1131,7 +1131,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
   cin.film.frame_rate=0.0f;
   value=GetCINProperty(image_info,image,"dpx:film.frame_rate",exception);
   if (value != (const char *) NULL)
-    cin.film.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+    cin.film.frame_rate=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.film.frame_rate);
   value=GetCINProperty(image_info,image,"dpx:film.frame_id",exception);
   if (value != (const char *) NULL)
index 2b72a197b8eee0f98b73a045a857c260f7d82e61..ad672c488d499218766005507ea0c6cf44606ee0 100644 (file)
@@ -1541,12 +1541,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
   dpx.orientation.x_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_center",exception);
   if (value != (const char *) NULL)
-    dpx.orientation.x_center=InterpretLocaleValue(value,(char **) NULL);
+    dpx.orientation.x_center=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.orientation.x_center);
   dpx.orientation.y_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_center",exception);
   if (value != (const char *) NULL)
-    dpx.orientation.y_center=InterpretLocaleValue(value,(char **) NULL);
+    dpx.orientation.y_center=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.orientation.y_center);
   dpx.orientation.x_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_size",exception);
@@ -1663,12 +1663,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
   dpx.film.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_rate",exception);
   if (value != (const char *) NULL)
-    dpx.film.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+    dpx.film.frame_rate=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.film.frame_rate);
   dpx.film.shutter_angle=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.shutter_angle",exception);
   if (value != (const char *) NULL)
-    dpx.film.shutter_angle=InterpretLocaleValue(value,(char **) NULL);
+    dpx.film.shutter_angle=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.film.shutter_angle);
   *dpx.film.frame_id='\0';
   value=GetDPXProperty(image_info,image,"dpx:film.frame_id",exception);
@@ -1717,56 +1717,56 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
   value=GetDPXProperty(image_info,image,
     "dpx:television.horizontal_sample_rate",exception);
   if (value != (const char *) NULL)
-    dpx.television.horizontal_sample_rate=InterpretLocaleValue(value,
+    dpx.television.horizontal_sample_rate=StringToDouble(value,
       (char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.horizontal_sample_rate);
   dpx.television.vertical_sample_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.vertical_sample_rate",
     exception);
   if (value != (const char *) NULL)
-    dpx.television.vertical_sample_rate=InterpretLocaleValue(value,
+    dpx.television.vertical_sample_rate=StringToDouble(value,
       (char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.vertical_sample_rate);
   dpx.television.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.frame_rate",exception);
   if (value != (const char *) NULL)
-    dpx.television.frame_rate=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.frame_rate=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.frame_rate);
   dpx.television.time_offset=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.time_offset",exception);
   if (value != (const char *) NULL)
-    dpx.television.time_offset=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.time_offset=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.time_offset);
   dpx.television.gamma=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.gamma",exception);
   if (value != (const char *) NULL)
-    dpx.television.gamma=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.gamma=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.gamma);
   dpx.television.black_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_level",exception);
   if (value != (const char *) NULL)
-    dpx.television.black_level=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.black_level=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.black_level);
   dpx.television.black_gain=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_gain",exception);
   if (value != (const char *) NULL)
-    dpx.television.black_gain=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.black_gain=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.black_gain);
   dpx.television.break_point=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.break_point",exception);
   if (value != (const char *) NULL)
-    dpx.television.break_point=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.break_point=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.break_point);
   dpx.television.white_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.white_level",exception);
   if (value != (const char *) NULL)
-    dpx.television.white_level=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.white_level=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.white_level);
   dpx.television.integration_times=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.integration_times",
     exception);
   if (value != (const char *) NULL)
-    dpx.television.integration_times=InterpretLocaleValue(value,(char **) NULL);
+    dpx.television.integration_times=StringToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.integration_times);
   offset+=WriteBlob(image,sizeof(dpx.television.reserve),(unsigned char *)
     dpx.television.reserve);
index dcea2e38073a368db46ca515d97e10f6db392e2c..b631f75757f20f937dbf53989954db599b45c95c 100644 (file)
@@ -359,13 +359,13 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
       if (LocaleCompare(keyword,"naxis3") == 0)
         fits_info.number_planes=StringToLong(p);
       if (LocaleCompare(keyword,"datamax") == 0)
-        fits_info.max_data=InterpretLocaleValue(p,(char **) NULL);
+        fits_info.max_data=StringToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"datamin") == 0)
-        fits_info.min_data=InterpretLocaleValue(p,(char **) NULL);
+        fits_info.min_data=StringToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"bzero") == 0)
-        fits_info.zero=InterpretLocaleValue(p,(char **) NULL);
+        fits_info.zero=StringToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"bscale") == 0)
-        fits_info.scale=InterpretLocaleValue(p,(char **) NULL);
+        fits_info.scale=StringToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"comment") == 0)
         {
           if (comment == (char *) NULL)
index 3bed84af457eff0b3e57930a9676899dbad8ed73..50b78f944895afcf22c6d3a900d44411da05fa2e 100644 (file)
@@ -303,7 +303,7 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
             {
               if (LocaleCompare(keyword,"gamma") == 0)
                 {
-                  image->gamma=InterpretLocaleValue(value,(char **) NULL);
+                  image->gamma=StringToDouble(value,(char **) NULL);
                   break;
                 }
               (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
index 751a6f1ec747ca7dea1c14f8ff52562607d63740..84ba43dd5cbbebb17a0e50eb0770bb1ed8ce87fe 100644 (file)
@@ -438,7 +438,7 @@ static MagickBooleanType WriteJBIGImage(const ImageInfo *image_info,
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);
-  version=InterpretLocaleValue(JBG_VERSION,(char **) NULL);
+  version=StringToDouble(JBG_VERSION,(char **) NULL);
   scene=0;
   do
   {
index 65549e51fb7398ccb44fc987c8ba50907af58ab2..18d630e55543ca9ae9dc75ba39671598520fb604 100644 (file)
@@ -1991,7 +1991,7 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
             Search for compression quality that does not exceed image extent.
           */
           jpeg_info->quality=0;
-          extent=(MagickSizeType) InterpretLocaleInterval(option,100.0);
+          extent=(MagickSizeType) StringToDoubleInterval(option,100.0);
           (void) DeleteImageOption(jpeg_info,"jpeg:extent");
           (void) AcquireUniqueFilename(jpeg_image->filename);
           maximum=101;
index d0f4ed2a07a97e61684425fe450a359200c27151..f3b28773c7de81db160dad1b34696f0138f59ecc 100644 (file)
@@ -735,7 +735,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=InterpretLocaleValue(options,(char **) NULL);
+                    image->gamma=StringToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"gravity") == 0)
@@ -1006,7 +1006,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"version") == 0)
                   {
-                    version=InterpretLocaleValue(options,(char **) NULL);
+                    version=StringToDouble(options,(char **) NULL);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options,exception);
index 628eb5fccb59b72a9c1e754220e66a793bc1ae49..c10861bda7f21961186c85a1567ca3a256fb19de 100644 (file)
@@ -444,7 +444,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"error") == 0)
                   {
-                    image->error.mean_error_per_pixel=InterpretLocaleValue(
+                    image->error.mean_error_per_pixel=StringToDouble(
                       options,(char **) NULL);
                     break;
                   }
@@ -456,7 +456,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=InterpretLocaleValue(options,(char **) NULL);
+                    image->gamma=StringToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"green-primary") == 0)
@@ -512,12 +512,12 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 if (LocaleCompare(keyword,"maximum-error") == 0)
                   {
                     image->error.normalized_maximum_error=
-                      InterpretLocaleValue(options,(char **) NULL);
+                      StringToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"mean-error") == 0)
                   {
-                    image->error.normalized_mean_error=InterpretLocaleValue(
+                    image->error.normalized_mean_error=StringToDouble(
                       options,(char **) NULL);
                     break;
                   }
index b9de76ee81c8c9b4bdf4ca71bd32dadadf78ea8e..1002fe9735a7da082b0cb78f9c26a2a0fcb745b6 100644 (file)
@@ -790,22 +790,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -908,7 +908,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
+                      draw_info->pointsize=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -921,7 +921,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -946,14 +946,14 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
@@ -1211,7 +1211,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -1467,7 +1467,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "bias") == 0)
               {
-                bias = InterpretLocaleValue(value,(char **) NULL);
+                bias = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1478,7 +1478,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = InterpretLocaleValue(value,(char **) NULL);
+                radius = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1680,7 +1680,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -1994,7 +1994,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
                       rotate_image=RotateImage(composite_image,
-                        InterpretLocaleValue(value,(char **) NULL),&exception);
+                        StringToDouble(value,(char **) NULL),&exception);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2412,22 +2412,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -2537,7 +2537,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
+                      draw_info->pointsize=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -2550,7 +2550,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2575,13 +2575,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -2762,7 +2762,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -2829,7 +2829,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3211,7 +3211,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blue") == 0)
                     {
-                      pixel.blue=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.blue=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3244,7 +3244,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"green") == 0)
                     {
-                      pixel.green=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.green=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3256,7 +3256,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"red") == 0)
                     {
-                      pixel.red=InterpretLocaleValue(value,(char **) NULL);
+                      pixel.red=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3430,7 +3430,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"amount") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3500,7 +3500,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"black") == 0)
               {
-                levelBlack = InterpretLocaleValue(value,(char **) NULL);
+                levelBlack = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3511,7 +3511,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"gamma") == 0)
               {
-                levelGamma = InterpretLocaleValue(value,(char **) NULL);
+                levelGamma = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3522,7 +3522,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"white") == 0)
               {
-                levelWhite = InterpretLocaleValue(value,(char **) NULL);
+                levelWhite = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3715,7 +3715,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3746,7 +3746,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"opacity") == 0)
                     {
-                      opacity=InterpretLocaleValue(value,(char **) NULL);
+                      opacity=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3845,7 +3845,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3936,13 +3936,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blackness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
                   if (LocaleCompare(keyword,"brightness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3967,7 +3967,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"hue") == 0)
                     {
-                      geometry_info.xi=InterpretLocaleValue(value,
+                      geometry_info.xi=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3980,7 +3980,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"lightness") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -3993,7 +3993,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"saturation") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4006,7 +4006,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"whiteness") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4202,7 +4202,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4282,7 +4282,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=InterpretLocaleValue(value,
+                      msl_info->image[n]->fuzz=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4591,22 +4591,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.rx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ry=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=InterpretLocaleValue(p,&p);
+                      draw_info->affine.sy=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=InterpretLocaleValue(p,&p);
+                      draw_info->affine.tx=StringToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=InterpretLocaleValue(p,&p);
+                      draw_info->affine.ty=StringToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -4711,7 +4711,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=InterpretLocaleValue(value,
+                      draw_info->pointsize=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -4724,7 +4724,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -4749,13 +4749,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=InterpretLocaleValue(value,(char **) NULL);
+                      angle=StringToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -5104,7 +5104,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5283,7 +5283,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"blur") == 0)
               {
-                msl_info->image[n]->blur=InterpretLocaleValue(value,
+                msl_info->image[n]->blur=StringToDouble(value,
                         (char **) NULL);
                 break;
               }
@@ -5313,7 +5313,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"x-resolution") == 0)
               {
-                x_resolution=InterpretLocaleValue(value,(char **) NULL);
+                x_resolution=StringToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5324,7 +5324,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"y-resolution") == 0)
               {
-                y_resolution=InterpretLocaleValue(value,(char **) NULL);
+                y_resolution=StringToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5445,7 +5445,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"support") == 0)
                     {
-                      blur=InterpretLocaleValue(value,(char **) NULL);
+                      blur=StringToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5668,7 +5668,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5731,7 +5731,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"degrees") == 0)
             {
-            degrees = InterpretLocaleValue(value,(char **) NULL);
+            degrees = StringToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5956,7 +5956,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"cluster-threshold") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -5993,7 +5993,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"smoothing-threshold") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6212,7 +6212,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"azimuth") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6225,7 +6225,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"elevation") == 0)
                     {
-                      geometry_info.sigma=InterpretLocaleValue(value,
+                      geometry_info.sigma=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6338,7 +6338,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.xi=InterpretLocaleValue(value,
+                      geometry_info.xi=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6404,7 +6404,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "bias") == 0)
               {
-                bias = InterpretLocaleValue(value,(char **) NULL);
+                bias = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6415,7 +6415,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = InterpretLocaleValue(value,(char **) NULL);
+                radius = StringToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6600,7 +6600,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6707,7 +6707,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"threshold") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -6770,7 +6770,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -7023,7 +7023,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=InterpretLocaleValue(value,
+                      geometry_info.rho=StringToDouble(value,
                         (char **) NULL);
                       break;
                     }
@@ -7180,7 +7180,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"threshold") == 0)
             {
-            threshold = InterpretLocaleValue(value,(char **) NULL);
+            threshold = StringToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -8000,7 +8000,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(value,"unlimited") != 0)
-            limit=(MagickSizeType) InterpretLocaleInterval(value,100.0);
+            limit=(MagickSizeType) StringToDoubleInterval(value,100.0);
           (void) SetMagickResourceLimit(AreaResource,limit);
           break;
         }
@@ -8030,7 +8030,7 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
         {
           if (image == (Image *) NULL)
             break;
-          image->bias=InterpretLocaleInterval(value,QuantumRange);
+          image->bias=StringToDoubleInterval(value,QuantumRange);
           break;
         }
       if (LocaleCompare(keyword,"blue-primary") == 0)
@@ -8134,8 +8134,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"pointsize") == 0)
         {
-          image_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
-          draw_info->pointsize=InterpretLocaleValue(value,(char **) NULL);
+          image_info->pointsize=StringToDouble(value,(char **) NULL);
+          draw_info->pointsize=StringToDouble(value,(char **) NULL);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
index 5b715547e89526df0d03c9fdaaaf17ca4e157d86..769c12203ee931996edb90c6b9ae7ab9364dc15d 100644 (file)
@@ -307,7 +307,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               scale[MaxTextExtent];
 
             (void) ReadBlobString(image,scale);
-            quantum_scale=InterpretLocaleValue(scale,(char **) NULL);
+            quantum_scale=StringToDouble(scale,(char **) NULL);
           }
         else
           {
index 2bba1453524089d8cd769c17c6df1b7511a5bb06..bf85500f7589e288c1441dd92d739b1a6977916d 100644 (file)
@@ -202,9 +202,9 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   separations_mask=ReadBlobMSBShort(image);
   count=ReadBlob(image,14,buffer);
   buffer[14]='\0';
-  height=InterpretLocaleValue((char *) buffer,(char **) NULL);
+  height=StringToDouble((char *) buffer,(char **) NULL);
   count=ReadBlob(image,14,buffer);
-  width=InterpretLocaleValue((char *) buffer,(char **) NULL);
+  width=StringToDouble((char *) buffer,(char **) NULL);
   count=ReadBlob(image,12,buffer);
   buffer[12]='\0';
   image->rows=StringToUnsignedLong((char *) buffer);
index 4378ec243f930d444e0fd3737d80890e59523611..89d01813273d56584c44590ed94ed81f411c73c5 100644 (file)
@@ -297,7 +297,7 @@ static double GetUserSpaceCoordinateValue(const SVGInfo *svg_info,int type,
   assert(string != (const char *) NULL);
   p=(const char *) string;
   GetMagickToken(p,&p,token);
-  value=InterpretLocaleValue(token,(char **) NULL);
+  value=StringToDouble(token,(char **) NULL);
   if (strchr(token,'%') != (char *) NULL)
     {
       double
@@ -1302,27 +1302,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=InterpretLocaleValue(value,(char **) NULL);
+                        affine.sx=StringToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=InterpretLocaleValue(token,(char **) NULL);
+                        affine.rx=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=InterpretLocaleValue(token,(char **) NULL);
+                        affine.ry=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=InterpretLocaleValue(token,(char **) NULL);
+                        affine.sy=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=InterpretLocaleValue(token,(char **) NULL);
+                        affine.tx=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=InterpretLocaleValue(token,(char **) NULL);
+                        affine.ty=StringToDouble(token,(char **) NULL);
                         break;
                       }
                     break;
@@ -1919,27 +1919,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=InterpretLocaleValue(value,(char **) NULL);
+                        affine.sx=StringToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=InterpretLocaleValue(token,(char **) NULL);
+                        affine.rx=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=InterpretLocaleValue(token,(char **) NULL);
+                        affine.ry=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=InterpretLocaleValue(token,(char **) NULL);
+                        affine.sy=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=InterpretLocaleValue(token,(char **) NULL);
+                        affine.tx=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=InterpretLocaleValue(token,(char **) NULL);
+                        affine.ty=StringToDouble(token,(char **) NULL);
                         break;
                       }
                     break;
@@ -1956,15 +1956,15 @@ static void SVGStartElement(void *context,const xmlChar *name,
 
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        angle=InterpretLocaleValue(value,(char **) NULL);
+                        angle=StringToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        x=InterpretLocaleValue(token,(char **) NULL);
+                        x=StringToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        y=InterpretLocaleValue(token,(char **) NULL);
+                        y=StringToDouble(token,(char **) NULL);
                         affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                         affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                         affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2066,22 +2066,22 @@ static void SVGStartElement(void *context,const xmlChar *name,
             {
               p=(const char *) value;
               GetMagickToken(p,&p,token);
-              svg_info->view_box.x=InterpretLocaleValue(token,(char **) NULL);
+              svg_info->view_box.x=StringToDouble(token,(char **) NULL);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.y=InterpretLocaleValue(token,(char **) NULL);
+              svg_info->view_box.y=StringToDouble(token,(char **) NULL);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.width=InterpretLocaleValue(token,
+              svg_info->view_box.width=StringToDouble(token,
                 (char **) NULL);
               if (svg_info->bounds.width == 0)
                 svg_info->bounds.width=svg_info->view_box.width;
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.height=InterpretLocaleValue(token,
+              svg_info->view_box.height=StringToDouble(token,
                 (char **) NULL);
               if (svg_info->bounds.height == 0)
                 svg_info->bounds.height=svg_info->view_box.height;
@@ -3561,34 +3561,34 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
         if (LocaleCompare("affine",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=InterpretLocaleValue(token,(char **) NULL);
+            affine.sx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.rx=InterpretLocaleValue(token,(char **) NULL);
+            affine.rx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ry=InterpretLocaleValue(token,(char **) NULL);
+            affine.ry=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=InterpretLocaleValue(token,(char **) NULL);
+            affine.sy=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.tx=InterpretLocaleValue(token,(char **) NULL);
+            affine.tx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=InterpretLocaleValue(token,(char **) NULL);
+            affine.ty=StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("angle",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.rx=InterpretLocaleValue(token,(char **) NULL);
-            affine.ry=InterpretLocaleValue(token,(char **) NULL);
+            affine.rx=StringToDouble(token,(char **) NULL);
+            affine.ry=StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("arc",keyword) == 0)
@@ -3903,24 +3903,24 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(type,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.segment.x1=InterpretLocaleValue(token,(char **) NULL);
-                svg_info.element.cx=InterpretLocaleValue(token,(char **) NULL);
+                svg_info.segment.x1=StringToDouble(token,(char **) NULL);
+                svg_info.element.cx=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y1=InterpretLocaleValue(token,(char **) NULL);
-                svg_info.element.cy=InterpretLocaleValue(token,(char **) NULL);
+                svg_info.segment.y1=StringToDouble(token,(char **) NULL);
+                svg_info.element.cy=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.x2=InterpretLocaleValue(token,(char **) NULL);
-                svg_info.element.major=InterpretLocaleValue(token,
+                svg_info.segment.x2=StringToDouble(token,(char **) NULL);
+                svg_info.element.major=StringToDouble(token,
                   (char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y2=InterpretLocaleValue(token,(char **) NULL);
-                svg_info.element.minor=InterpretLocaleValue(token,
+                svg_info.segment.y2=StringToDouble(token,(char **) NULL);
+                svg_info.element.minor=StringToDouble(token,
                   (char **) NULL);
                 (void) FormatLocaleString(message,MaxTextExtent,
                   "<%sGradient id=\"%s\" x1=\"%g\" y1=\"%g\" x2=\"%g\" "
@@ -3931,7 +3931,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
                     GetMagickToken(q,&q,token);
                     if (*token == ',')
                       GetMagickToken(q,&q,token);
-                    svg_info.element.angle=InterpretLocaleValue(token,
+                    svg_info.element.angle=StringToDouble(token,
                       (char **) NULL);
                     (void) FormatLocaleString(message,MaxTextExtent,
                       "<%sGradient id=\"%s\" cx=\"%g\" cy=\"%g\" r=\"%g\" "
@@ -3959,20 +3959,20 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(name,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.bounds.x=InterpretLocaleValue(token,(char **) NULL);
+                svg_info.bounds.x=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.y=InterpretLocaleValue(token,(char **) NULL);
+                svg_info.bounds.y=StringToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.width=InterpretLocaleValue(token,
+                svg_info.bounds.width=StringToDouble(token,
                   (char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.height=InterpretLocaleValue(token,
+                svg_info.bounds.height=StringToDouble(token,
                   (char **) NULL);
                 (void) FormatLocaleString(message,MaxTextExtent,
                   "<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
@@ -4017,11 +4017,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
         if (LocaleCompare("scale",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=InterpretLocaleValue(token,(char **) NULL);
+            affine.sx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=InterpretLocaleValue(token,(char **) NULL);
+            affine.sy=StringToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("skewX",keyword) == 0)
@@ -4172,11 +4172,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
         if (LocaleCompare("translate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.tx=InterpretLocaleValue(token,(char **) NULL);
+            affine.tx=StringToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=InterpretLocaleValue(token,(char **) NULL);
+            affine.ty=StringToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -4225,11 +4225,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
       if (IsPoint(q) == MagickFalse)
         break;
       GetMagickToken(q,&q,token);
-      point.x=InterpretLocaleValue(token,(char **) NULL);
+      point.x=StringToDouble(token,(char **) NULL);
       GetMagickToken(q,&q,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
-      point.y=InterpretLocaleValue(token,(char **) NULL);
+      point.y=StringToDouble(token,(char **) NULL);
       GetMagickToken(q,(const char **) NULL,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
index bd5c25cb0b937b2b9e154a25e01330bbe53805ae..4d3e96141e9cc0276c22fa9cca3522cd061a0ea4 100644 (file)
@@ -2458,7 +2458,7 @@ static void TIFFSetEXIFProperties(TIFF *tiff,Image *image,
         float
           rational;
 
-        rational=InterpretLocaleValue(value,(char **) NULL);
+        rational=StringToDouble(value,(char **) NULL);
         (void) TIFFSetField(tiff,exif_info[i].tag,rational);
         break;
       }