diff --git a/coders/cin.c b/coders/cin.c
index db65623..5594393 100644
--- a/coders/cin.c
+++ b/coders/cin.c
@@ -67,6 +67,7 @@
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
+#include "magick/string-private.h"
 #include "magick/module.h"
 
 /*
@@ -1023,12 +1024,12 @@
   cin.origination.x_offset=0UL;
   value=GetCINProperty(image_info,image,"cin:origination.x_offset");
   if (value != (const char *) NULL)
-    cin.origination.x_offset=atol(value);
+    cin.origination.x_offset=StringToLong(value);
   offset+=WriteBlobLong(image,(unsigned long) cin.origination.x_offset);
   cin.origination.y_offset=0UL;
   value=GetCINProperty(image_info,image,"cin:origination.y_offset");
   if (value != (const char *) NULL)
-    cin.origination.y_offset=atol(value);
+    cin.origination.y_offset=StringToLong(value);
   offset+=WriteBlobLong(image,(unsigned long) cin.origination.y_offset);
   value=GetCINProperty(image_info,image,"cin:origination.filename");
   if (value != (const char *) NULL)
@@ -1069,12 +1070,12 @@
   cin.origination.x_pitch=0.0f;
   value=GetCINProperty(image_info,image,"cin:origination.x_pitch");
   if (value != (const char *) NULL)
-    cin.origination.x_pitch=atof(value);
+    cin.origination.x_pitch=StringToDouble(value);
   offset+=WriteBlobFloat(image,cin.origination.x_pitch);
   cin.origination.y_pitch=0.0f;
   value=GetCINProperty(image_info,image,"cin:origination.y_pitch");
   if (value != (const char *) NULL)
-    cin.origination.y_pitch=atof(value);
+    cin.origination.y_pitch=StringToDouble(value);
   offset+=WriteBlobFloat(image,cin.origination.y_pitch);
   cin.origination.gamma=image->gamma;
   offset+=WriteBlobFloat(image,cin.origination.gamma);
@@ -1086,28 +1087,28 @@
   cin.film.id=0;
   value=GetCINProperty(image_info,image,"cin:film.id");
   if (value != (const char *) NULL)
-    cin.film.id=(char) atoi(value);
+    cin.film.id=(char) StringToLong(value);
   offset+=WriteBlobByte(image,(unsigned char) cin.film.id);
   cin.film.type=0;
   value=GetCINProperty(image_info,image,"cin:film.type");
   if (value != (const char *) NULL)
-    cin.film.type=(char) atoi(value);
+    cin.film.type=(char) StringToLong(value);
   offset+=WriteBlobByte(image,(unsigned char) cin.film.type);
   cin.film.offset=0;
   value=GetCINProperty(image_info,image,"cin:film.offset");
   if (value != (const char *) NULL)
-    cin.film.offset=(char) atoi(value);
+    cin.film.offset=(char) StringToLong(value);
   offset+=WriteBlobByte(image,(unsigned char) cin.film.offset);
   offset+=WriteBlobByte(image,(unsigned char) cin.film.reserve1);
   cin.film.prefix=0UL;
   value=GetCINProperty(image_info,image,"cin:film.prefix");
   if (value != (const char *) NULL)
-    cin.film.prefix=(unsigned long) atol(value);
+    cin.film.prefix=(unsigned long) StringToLong(value);
   offset+=WriteBlobLong(image,cin.film.prefix);
   cin.film.count=0UL;
   value=GetCINProperty(image_info,image,"cin:film.count");
   if (value != (const char *) NULL)
-    cin.film.count=(unsigned long) atol(value);
+    cin.film.count=(unsigned long) StringToLong(value);
   offset+=WriteBlobLong(image,cin.film.count);
   value=GetCINProperty(image_info,image,"cin:film.format");
   if (value != (const char *) NULL)
@@ -1117,12 +1118,12 @@
   cin.film.frame_position=0UL;
   value=GetCINProperty(image_info,image,"cin:film.frame_position");
   if (value != (const char *) NULL)
-    cin.film.frame_position=(unsigned long) atol(value);
+    cin.film.frame_position=(unsigned long) StringToLong(value);
   offset+=WriteBlobLong(image,cin.film.frame_position);
   cin.film.frame_rate=0.0f;
   value=GetCINProperty(image_info,image,"cin:film.frame_rate");
   if (value != (const char *) NULL)
-    cin.film.frame_rate=atof(value);
+    cin.film.frame_rate=StringToDouble(value);
   offset+=WriteBlobFloat(image,cin.film.frame_rate);
   value=GetCINProperty(image_info,image,"cin:film.frame_id");
   if (value != (const char *) NULL)
diff --git a/coders/dcm.c b/coders/dcm.c
index 9d96d97..392666c 100644
--- a/coders/dcm.c
+++ b/coders/dcm.c
@@ -63,6 +63,7 @@
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
+#include "magick/string-private.h"
 #include "magick/module.h"
 
 /*
@@ -3173,7 +3174,7 @@
             /*
               Number of frames.
             */
-            number_scenes=(unsigned long) atol((char *) data);
+            number_scenes=(unsigned long) StringToLong((char *) data);
             break;
           }
           case 0x0010:
@@ -3243,7 +3244,7 @@
             /*
               Visible pixel range: center.
             */
-            window_center=atol((char *) data);
+            window_center=StringToLong((char *) data);
             break;
           }
           case 0x1051:
@@ -3251,7 +3252,7 @@
             /*
               Visible pixel range: width.
             */
-            window_width=(unsigned long) atol((char *) data);
+            window_width=(unsigned long) StringToLong((char *) data);
             break;
           }
           case 0x1200:
diff --git a/coders/dpx.c b/coders/dpx.c
index bf88332..43b283a 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -52,6 +52,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/option.h"
@@ -60,8 +61,7 @@
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
   Typedef declaration.
@@ -1612,32 +1612,32 @@
   dpx.orientation.x_offset=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_offset");
   if (value != (const char *) NULL)
-    dpx.orientation.x_offset=(unsigned int) atoi(value);
+    dpx.orientation.x_offset=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.x_offset);
   dpx.orientation.y_offset=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_offset");
   if (value != (const char *) NULL)
-    dpx.orientation.y_offset=(unsigned int) atoi(value);
+    dpx.orientation.y_offset=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_offset);
   dpx.orientation.x_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_center");
   if (value != (const char *) NULL)
-    dpx.orientation.x_center=atof(value);
+    dpx.orientation.x_center=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.orientation.x_center);
   dpx.orientation.y_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_center");
   if (value != (const char *) NULL)
-    dpx.orientation.y_center=atof(value);
+    dpx.orientation.y_center=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.orientation.y_center);
   dpx.orientation.x_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_size");
   if (value != (const char *) NULL)
-    dpx.orientation.x_size=(unsigned int) atoi(value);
+    dpx.orientation.x_size=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.x_size);
   dpx.orientation.y_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_size");
   if (value != (const char *) NULL)
-    dpx.orientation.y_size=(unsigned int) atoi(value);
+    dpx.orientation.y_size=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_size);
   value=GetDPXProperty(image_info,image,"dpx:orientation.filename");
   if (value != (const char *) NULL)
@@ -1726,27 +1726,27 @@
   dpx.film.frame_position=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_position");
   if (value != (const char *) NULL)
-    dpx.film.frame_position=(unsigned int) atoi(value);
+    dpx.film.frame_position=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.film.frame_position);
   dpx.film.sequence_extent=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.sequence_extent");
   if (value != (const char *) NULL)
-    dpx.film.sequence_extent=(unsigned int) atoi(value);
+    dpx.film.sequence_extent=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.film.sequence_extent);
   dpx.film.held_count=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.held_count");
   if (value != (const char *) NULL)
-    dpx.film.held_count=(unsigned int) atoi(value);
+    dpx.film.held_count=(unsigned int) StringToLong(value);
   offset+=WriteBlobLong(image,dpx.film.held_count);
   dpx.film.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_rate");
   if (value != (const char *) NULL)
-    dpx.film.frame_rate=atof(value);
+    dpx.film.frame_rate=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.film.frame_rate);
   dpx.film.shutter_angle=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.shutter_angle");
   if (value != (const char *) NULL)
-    dpx.film.shutter_angle=atof(value);
+    dpx.film.shutter_angle=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.film.shutter_angle);
   *dpx.film.frame_id='\0';
   value=GetDPXProperty(image_info,image,"dpx:film.frame_id");
@@ -1774,72 +1774,72 @@
   offset+=WriteBlobLong(image,dpx.television.user_bits);
   value=GetDPXProperty(image_info,image,"dpx:television.interlace");
   if (value != (const char *) NULL)
-    dpx.television.interlace=(unsigned char) atoi(value);
+    dpx.television.interlace=(unsigned char) StringToLong(value);
   offset+=WriteBlobByte(image,dpx.television.interlace);
   value=GetDPXProperty(image_info,image,"dpx:television.field_number");
   if (value != (const char *) NULL)
-    dpx.television.field_number=(unsigned char) atoi(value);
+    dpx.television.field_number=(unsigned char) StringToLong(value);
   offset+=WriteBlobByte(image,dpx.television.field_number);
   dpx.television.video_signal=0;
   value=GetDPXProperty(image_info,image,"dpx:television.video_signal");
   if (value != (const char *) NULL)
-    dpx.television.video_signal=(unsigned char) atoi(value);
+    dpx.television.video_signal=(unsigned char) StringToLong(value);
   offset+=WriteBlobByte(image,dpx.television.video_signal);
   dpx.television.padding=0;
   value=GetDPXProperty(image_info,image,"dpx:television.padding");
   if (value != (const char *) NULL)
-    dpx.television.padding=(unsigned char) atoi(value);
+    dpx.television.padding=(unsigned char) StringToLong(value);
   offset+=WriteBlobByte(image,dpx.television.padding);
   dpx.television.horizontal_sample_rate=0.0f;
   value=GetDPXProperty(image_info,image,
     "dpx:television.horizontal_sample_rate");
   if (value != (const char *) NULL)
-    dpx.television.horizontal_sample_rate=atof(value);
+    dpx.television.horizontal_sample_rate=StringToDouble(value);
   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");
   if (value != (const char *) NULL)
-    dpx.television.vertical_sample_rate=atof(value);
+    dpx.television.vertical_sample_rate=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.vertical_sample_rate);
   dpx.television.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.frame_rate");
   if (value != (const char *) NULL)
-    dpx.television.frame_rate=atof(value);
+    dpx.television.frame_rate=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.frame_rate);
   dpx.television.time_offset=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.time_offset");
   if (value != (const char *) NULL)
-    dpx.television.time_offset=atof(value);
+    dpx.television.time_offset=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.time_offset);
   dpx.television.gamma=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.gamma");
   if (value != (const char *) NULL)
-    dpx.television.gamma=atof(value);
+    dpx.television.gamma=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.gamma);
   dpx.television.black_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_level");
   if (value != (const char *) NULL)
-    dpx.television.black_level=atof(value);
+    dpx.television.black_level=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.black_level);
   dpx.television.black_gain=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_gain");
   if (value != (const char *) NULL)
-    dpx.television.black_gain=atof(value);
+    dpx.television.black_gain=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.black_gain);
   dpx.television.break_point=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.break_point");
   if (value != (const char *) NULL)
-    dpx.television.break_point=atof(value);
+    dpx.television.break_point=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.break_point);
   dpx.television.white_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.white_level");
   if (value != (const char *) NULL)
-    dpx.television.white_level=atof(value);
+    dpx.television.white_level=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.white_level);
   dpx.television.integration_times=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.integration_times");
   if (value != (const char *) NULL)
-    dpx.television.integration_times=atof(value);
+    dpx.television.integration_times=StringToDouble(value);
   offset+=WriteBlobFloat(image,dpx.television.integration_times);
   offset+=WriteBlob(image,sizeof(dpx.television.reserve),(unsigned char *)
     dpx.television.reserve);
diff --git a/coders/fits.c b/coders/fits.c
index f0fcd7c..6f32bfa 100644
--- a/coders/fits.c
+++ b/coders/fits.c
@@ -54,6 +54,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/pixel-private.h"
@@ -62,7 +63,7 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/module.h"
 
 /*
@@ -349,23 +350,23 @@
       if (LocaleCompare(keyword,"simple") == 0)
         fits_info.simple=(*p == 'T') || (*p == 't') ? MagickTrue : MagickFalse;
       if (LocaleCompare(keyword,"bitpix") == 0)
-        fits_info.bits_per_pixel=atoi(p);
+        fits_info.bits_per_pixel=StringToLong(p);
       if (LocaleCompare(keyword,"naxis") == 0)
-        fits_info.number_axes=atoi(p);
+        fits_info.number_axes=StringToLong(p);
       if (LocaleCompare(keyword,"naxis1") == 0)
-        fits_info.columns=atoi(p);
+        fits_info.columns=StringToLong(p);
       if (LocaleCompare(keyword,"naxis2") == 0)
-        fits_info.rows=atoi(p);
+        fits_info.rows=StringToLong(p);
       if (LocaleCompare(keyword,"naxis3") == 0)
-        fits_info.number_planes=atoi(p);
+        fits_info.number_planes=StringToLong(p);
       if (LocaleCompare(keyword,"datamax") == 0)
-        fits_info.max_data=atof(p);
+        fits_info.max_data=StringToDouble(p);
       if (LocaleCompare(keyword,"datamin") == 0)
-        fits_info.min_data=atof(p);
+        fits_info.min_data=StringToDouble(p);
       if (LocaleCompare(keyword,"bzero") == 0)
-        fits_info.zero=atof(p);
+        fits_info.zero=StringToDouble(p);
       if (LocaleCompare(keyword,"bscale") == 0)
-        fits_info.scale=atof(p);
+        fits_info.scale=StringToDouble(p);
       if (LocaleCompare(keyword,"comment") == 0)
         {
           if (comment == (char *) NULL)
diff --git a/coders/hald.c b/coders/hald.c
index d61c06a..921f48f 100644
--- a/coders/hald.c
+++ b/coders/hald.c
@@ -51,12 +51,13 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -117,7 +118,7 @@
   image=AcquireImage(image_info);
   level=0;
   if (*image_info->filename != '\0')
-    level=(unsigned long) atol(image_info->filename);
+    level=(unsigned long) StringToLong(image_info->filename);
   if (level < 2)
     level=8;
   status=MagickTrue;
diff --git a/coders/jpeg.c b/coders/jpeg.c
index 1104253..54be7c5 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -61,6 +61,7 @@
 #include "magick/log.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/option.h"
@@ -71,7 +72,7 @@
 #include "magick/splay-tree.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/utility.h"
 #include <setjmp.h>
 #if defined(MAGICKCORE_JPEG_DELEGATE)
@@ -1864,7 +1865,7 @@
             Search for compression quality that does not exceed image extent.
           */
           jpeg_info->quality=0;
-          extent=(MagickSizeType) StringToDouble(option,100.0);
+          extent=(MagickSizeType) SiPrefixToDouble(option,100.0);
           (void) DeleteImageOption(jpeg_info,"jpeg:extent");
           (void) AcquireUniqueFilename(jpeg_image->filename);
           min=0;
diff --git a/coders/meta.c b/coders/meta.c
index f876742..5837442 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -49,12 +49,13 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/profile.h"
 #include "magick/splay-tree.h"
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/token.h"
 #include "magick/utility.h"
 
@@ -358,10 +359,10 @@
                 if (strcmp(newstr,"8BIM")==0)
                   dataset = 255;
                 else
-                  dataset = (unsigned char) atoi(newstr);
+                  dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum = (unsigned int) atoi(newstr);
+                recnum = (unsigned int) StringToLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
@@ -634,10 +635,10 @@
                 if (strcmp(newstr,"8BIM")==0)
                   dataset = 255;
                 else
-                  dataset = (unsigned char) atoi(newstr);
+                  dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum=(unsigned int) atoi(newstr);
+                recnum=(unsigned int) StringToLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
diff --git a/coders/miff.c b/coders/miff.c
index 523433e..c6ac0c9 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -58,6 +58,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/option.h"
@@ -68,7 +69,7 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #if defined(MAGICKCORE_ZLIB_DELEGATE)
 #include "zlib.h"
 #endif
@@ -623,7 +624,7 @@
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    colors=(unsigned long) atol(options);
+                    colors=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -652,7 +653,7 @@
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) atol(options);
+                    image->columns=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -663,12 +664,12 @@
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) atol(options);
+                    image->delay=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) atol(options);
+                    image->depth=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -709,7 +710,7 @@
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=atof(options);
+                    image->gamma=StringToDouble(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"gravity") == 0)
@@ -747,7 +748,7 @@
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) atol(options);
+                    image->iterations=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -835,7 +836,7 @@
                       profiles=NewLinkedList(0);
                     (void) AppendValueToLinkedList(profiles,
                       AcquireString(keyword+8));
-                    profile=AcquireStringInfo((size_t) atol(options));
+                    profile=AcquireStringInfo((size_t) StringToLong(options));
                     (void) SetImageProfile(image,keyword+8,profile);
                     profile=DestroyStringInfo(profile);
                     break;
@@ -848,7 +849,7 @@
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) atol(options);
+                    image->quality=(unsigned long) StringToLong(options);
                     break;
                   }
                 if ((LocaleCompare(keyword,"quantum-format") == 0) ||
@@ -903,7 +904,7 @@
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) atol(options);
+                    image->rows=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -914,7 +915,7 @@
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) atol(options);
+                    image->scene=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -925,7 +926,7 @@
               {
                 if (LocaleCompare(keyword,"ticks-per-second") == 0)
                   {
-                    image->ticks_per_second=atol(options);
+                    image->ticks_per_second=StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"tile-offset") == 0)
@@ -976,7 +977,7 @@
               {
                 if (LocaleCompare(keyword,"version") == 0)
                   {
-                    version=atof(options);
+                    version=StringToDouble(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
diff --git a/coders/mpc.c b/coders/mpc.c
index a6766b2..ece2d72 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -58,6 +58,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/option.h"
@@ -67,7 +68,7 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/utility.h"
 
 /*
@@ -366,7 +367,7 @@
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    image->colors=(unsigned long) atol(options);
+                    image->colors=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -395,7 +396,7 @@
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) atol(options);
+                    image->columns=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -406,12 +407,12 @@
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) atol(options);
+                    image->delay=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) atol(options);
+                    image->depth=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -446,7 +447,7 @@
                   }
                 if (LocaleCompare(keyword,"error") == 0)
                   {
-                    image->error.mean_error_per_pixel=atof(options);
+                    image->error.mean_error_per_pixel=StringToDouble(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -457,7 +458,7 @@
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=atof(options);
+                    image->gamma=StringToDouble(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"green-primary") == 0)
@@ -483,7 +484,7 @@
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) atol(options);
+                    image->iterations=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -512,12 +513,12 @@
                   }
                 if (LocaleCompare(keyword,"maximum-error") == 0)
                   {
-                    image->error.normalized_maximum_error=atof(options);
+                    image->error.normalized_maximum_error=StringToDouble(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"mean-error") == 0)
                   {
-                    image->error.normalized_mean_error=atof(options);
+                    image->error.normalized_mean_error=StringToDouble(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"montage") == 0)
@@ -578,7 +579,7 @@
                       profiles=NewLinkedList(0);
                     (void) AppendValueToLinkedList(profiles,
                       AcquireString(keyword+8));
-                    profile=AcquireStringInfo((size_t) atol(options));
+                    profile=AcquireStringInfo((size_t) StringToLong(options));
                     (void) SetImageProfile(image,keyword+8,profile);
                     profile=DestroyStringInfo(profile);
                     break;
@@ -591,12 +592,12 @@
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) atol(options);
+                    image->quality=(unsigned long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"quantum-depth") == 0)
                   {
-                    quantum_depth=(unsigned long) atol(options);
+                    quantum_depth=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -636,7 +637,7 @@
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) atol(options);
+                    image->rows=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -647,7 +648,7 @@
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) atol(options);
+                    image->scene=(unsigned long) StringToLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -658,7 +659,7 @@
               {
                 if (LocaleCompare(keyword,"ticks-per-second") == 0)
                   {
-                    image->ticks_per_second=(long) atol(options);
+                    image->ticks_per_second=(long) StringToLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"tile-offset") == 0)
diff --git a/coders/msl.c b/coders/msl.c
index d2346db..038867e 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -68,6 +68,7 @@
 #include "magick/log.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/option.h"
 #include "magick/paint.h"
 #include "magick/profile.h"
@@ -82,7 +83,7 @@
 #include "magick/signature.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/transform.h"
 #include "magick/threshold.h"
 #include "magick/utility.h"
@@ -898,7 +899,7 @@
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=atof(value);
+                      draw_info->pointsize=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -910,7 +911,7 @@
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -935,14 +936,14 @@
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.ry=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.rx=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
@@ -965,7 +966,7 @@
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
                     {
-                      draw_info->stroke_width=atol(value);
+                      draw_info->stroke_width=StringToLong(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"style") == 0)
@@ -1021,7 +1022,7 @@
                 {
                   if (LocaleCompare(keyword,"weight") == 0)
                     {
-                      draw_info->weight=atol(value);
+                      draw_info->weight=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1033,7 +1034,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1045,7 +1046,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1196,7 +1197,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1208,7 +1209,7 @@
                 {
                   if (LocaleCompare(keyword,"sigma") == 0)
                     {
-                      geometry_info.sigma=atol(value);
+                      geometry_info.sigma=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1306,7 +1307,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=atol(value);
+                      geometry.height=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1318,7 +1319,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1446,7 +1447,7 @@
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = atof( value );
+                radius = StringToDouble( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1457,7 +1458,7 @@
             {
               if (LocaleCompare(keyword,"sigma") == 0)
               {
-                sigma = atol( value );
+                sigma = StringToLong( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1532,7 +1533,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=atol(value);
+                      geometry.height=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1544,7 +1545,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1556,7 +1557,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1568,7 +1569,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1645,7 +1646,7 @@
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=atof(value);
+                      msl_info->image[n]->fuzz=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1674,7 +1675,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       (void) GetOneVirtualMagickPixel(msl_info->image[n],
                         geometry.x,geometry.y,&target,&exception);
                       break;
@@ -1688,7 +1689,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       (void) GetOneVirtualMagickPixel(msl_info->image[n],
                         geometry.x,geometry.y,&target,&exception);
                       break;
@@ -1914,7 +1915,7 @@
                       CacheView
                         *composite_view;
 
-                      opacity=QuantumRange-atol(value);
+                      opacity=QuantumRange-StringToLong(value);
                       if (compose != DissolveCompositeOp)
                         {
                           (void) SetImageOpacity(composite_image,(Quantum)
@@ -1951,7 +1952,7 @@
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      rotate_image=RotateImage(composite_image,atof(value),
+                      rotate_image=RotateImage(composite_image,StringToDouble(value),
                         &exception);
                       break;
                     }
@@ -2005,7 +2006,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       (void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
                         geometry.y,&target,&exception);
                       break;
@@ -2019,7 +2020,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       (void) GetOneVirtualPixel(msl_info->image[n],geometry.x,
                         geometry.y,&target,&exception);
                       break;
@@ -2156,7 +2157,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=atol(value);
+                      geometry.height=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2168,7 +2169,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2180,7 +2181,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2192,7 +2193,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2244,7 +2245,7 @@
                 {
                   if (LocaleCompare(keyword,"display") == 0)
                     {
-                      display=atol(value);
+                      display=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2488,7 +2489,7 @@
                     }
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=atof(value);
+                      draw_info->pointsize=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2500,7 +2501,7 @@
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2525,13 +2526,13 @@
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -2553,7 +2554,7 @@
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
                     {
-                      draw_info->stroke_width=atol(value);
+                      draw_info->stroke_width=StringToLong(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"style") == 0)
@@ -2609,7 +2610,7 @@
                 {
                   if (LocaleCompare(keyword,"weight") == 0)
                     {
-                      draw_info->weight=atol(value);
+                      draw_info->weight=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2621,7 +2622,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2633,7 +2634,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2710,7 +2711,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2775,7 +2776,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2787,7 +2788,7 @@
                 {
                   if (LocaleCompare(keyword,"sigma") == 0)
                     {
-                      geometry_info.sigma=atol(value);
+                      geometry_info.sigma=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3045,7 +3046,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      frame_info.height=atol(value);
+                      frame_info.height=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3057,7 +3058,7 @@
                 {
                   if (LocaleCompare(keyword,"inner") == 0)
                     {
-                      frame_info.inner_bevel=atol(value);
+                      frame_info.inner_bevel=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3069,7 +3070,7 @@
                 {
                   if (LocaleCompare(keyword,"outer") == 0)
                     {
-                      frame_info.outer_bevel=atol(value);
+                      frame_info.outer_bevel=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3081,7 +3082,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      frame_info.width=atol(value);
+                      frame_info.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3149,7 +3150,7 @@
                 {
                   if (LocaleCompare(keyword,"blue") == 0)
                     {
-                      pixel.blue=atof(value);
+                      pixel.blue=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3182,7 +3183,7 @@
                     }
                   if (LocaleCompare(keyword,"green") == 0)
                     {
-                      pixel.green=atof(value);
+                      pixel.green=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3194,7 +3195,7 @@
                 {
                   if (LocaleCompare(keyword,"red") == 0)
                     {
-                      pixel.red=atof(value);
+                      pixel.red=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3388,7 +3389,7 @@
                 {
                   if (LocaleCompare(keyword,"amount") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3457,7 +3458,7 @@
             {
               if (LocaleCompare(keyword,"black") == 0)
               {
-                levelBlack = atof( value );
+                levelBlack = StringToDouble( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3468,7 +3469,7 @@
             {
               if (LocaleCompare(keyword,"gamma") == 0)
               {
-                levelGamma = atof( value );
+                levelGamma = StringToDouble( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3479,7 +3480,7 @@
             {
               if (LocaleCompare(keyword,"white") == 0)
               {
-                levelWhite = atof( value );
+                levelWhite = StringToDouble( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3671,7 +3672,7 @@
                 {
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=atof(value);
+                      msl_info->image[n]->fuzz=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3700,7 +3701,7 @@
                 {
                   if (LocaleCompare(keyword,"opacity") == 0)
                     {
-                      opacity=atof(value);
+                      opacity=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3712,7 +3713,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       (void) GetOneVirtualMagickPixel(msl_info->image[n],
                         geometry.x,geometry.y,&target,&exception);
                       break;
@@ -3726,7 +3727,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       (void) GetOneVirtualMagickPixel(msl_info->image[n],
                         geometry.x,geometry.y,&target,&exception);
                       break;
@@ -3794,7 +3795,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3881,12 +3882,12 @@
                 {
                   if (LocaleCompare(keyword,"blackness") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"brightness") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3910,7 +3911,7 @@
                 {
                   if (LocaleCompare(keyword,"hue") == 0)
                     {
-                      geometry_info.xi=atof(value);
+                      geometry_info.xi=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3922,7 +3923,7 @@
                 {
                   if (LocaleCompare(keyword,"lightness") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3934,7 +3935,7 @@
                 {
                   if (LocaleCompare(keyword,"saturation") == 0)
                     {
-                      geometry_info.sigma=atof(value);
+                      geometry_info.sigma=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3946,7 +3947,7 @@
                 {
                   if (LocaleCompare(keyword,"whiteness") == 0)
                     {
-                      geometry_info.sigma=atof(value);
+                      geometry_info.sigma=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4133,7 +4134,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4208,7 +4209,7 @@
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=atof(value);
+                      msl_info->image[n]->fuzz=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4399,7 +4400,7 @@
                 {
                   if (LocaleCompare(keyword,"colors") == 0)
                     {
-                      quantize_info.number_colors=atol(value);
+                      quantize_info.number_colors=StringToLong(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"colorspace") == 0)
@@ -4455,7 +4456,7 @@
                 {
                   if (LocaleCompare(keyword,"treedepth") == 0)
                     {
-                      quantize_info.tree_depth=atol(value);
+                      quantize_info.tree_depth=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4630,7 +4631,7 @@
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=atof(value);
+                      draw_info->pointsize=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4642,7 +4643,7 @@
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -4667,13 +4668,13 @@
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=atof(value);
+                      angle=StringToDouble(value);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -4695,7 +4696,7 @@
                     }
                   if (LocaleCompare(keyword,"strokewidth") == 0)
                     {
-                      draw_info->stroke_width=atol(value);
+                      draw_info->stroke_width=StringToLong(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"style") == 0)
@@ -4751,7 +4752,7 @@
                 {
                   if (LocaleCompare(keyword,"weight") == 0)
                     {
-                      draw_info->weight=atol(value);
+                      draw_info->weight=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4763,7 +4764,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4775,7 +4776,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4888,7 +4889,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=atol(value);
+                      geometry.height=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4917,7 +4918,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5017,7 +5018,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5114,7 +5115,7 @@
           {
           if (LocaleCompare(keyword,"height") == 0)
             {
-            height = atol( value );
+            height = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5125,7 +5126,7 @@
           {
           if (LocaleCompare(keyword,"width") == 0)
             {
-            width = atol( value );
+            width = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5136,7 +5137,7 @@
           {
           if (LocaleCompare(keyword,"x") == 0)
             {
-            x = atol( value );
+            x = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5147,7 +5148,7 @@
           {
           if (LocaleCompare(keyword,"y") == 0)
             {
-            y = atol( value );
+            y = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5194,7 +5195,7 @@
           {
             if (LocaleCompare(keyword,"blur") == 0)
               {
-                msl_info->image[n]->blur=atof(value);
+                msl_info->image[n]->blur=StringToDouble(value);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5223,7 +5224,7 @@
           {
             if (LocaleCompare(keyword,"x-resolution") == 0)
               {
-                x_resolution=atof(value);
+                x_resolution=StringToDouble(value);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5234,7 +5235,7 @@
           {
             if (LocaleCompare(keyword,"y-resolution") == 0)
               {
-                y_resolution=atof(value);
+                y_resolution=StringToDouble(value);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5342,7 +5343,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) atol(value);
+                      geometry.height=(unsigned long) StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5354,7 +5355,7 @@
                 {
                   if (LocaleCompare(keyword,"support") == 0)
                     {
-                      blur=atof(value);
+                      blur=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5366,7 +5367,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5433,7 +5434,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry.x=atol(value);
+                      geometry.x=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5445,7 +5446,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry.y=atol(value);
+                      geometry.y=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5506,7 +5507,7 @@
           {
           if (LocaleCompare(keyword,"x") == 0)
             {
-            x = atol( value );
+            x = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5517,7 +5518,7 @@
           {
           if (LocaleCompare(keyword,"y") == 0)
             {
-            y = atol( value );
+            y = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5575,7 +5576,7 @@
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5637,7 +5638,7 @@
           {
           if (LocaleCompare(keyword,"degrees") == 0)
             {
-            degrees = atof( value );
+            degrees = StringToDouble( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5713,7 +5714,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) atol(value);
+                      geometry.height=(unsigned long) StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5725,7 +5726,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5789,7 +5790,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) atol(value);
+                      geometry.height=(unsigned long) StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5801,7 +5802,7 @@
                 {
                   if (LocaleCompare(keyword,"width") == 0)
                     {
-                      geometry.width=atol(value);
+                      geometry.width=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5859,7 +5860,7 @@
                 {
                   if (LocaleCompare(keyword,"cluster-threshold") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   if (LocaleCompare(keyword,"colorspace") == 0)
@@ -5895,7 +5896,7 @@
                 {
                   if (LocaleCompare(keyword,"smoothing-threshold") == 0)
                     {
-                      geometry_info.sigma=atof(value);
+                      geometry_info.sigma=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6011,10 +6012,10 @@
                   if (value[len-1] == '%') {
                     char  tmp[100];
                     (void) CopyMagickString(tmp,value,len);
-                    opac = atol( tmp );
+                    opac = StringToLong( tmp );
                     opac = (int)(QuantumRange * ((float)opac/100));
                   } else
-                    opac = atol( value );
+                    opac = StringToLong( value );
                   (void) SetImageOpacity( msl_info->image[n], (Quantum) opac );
                   break;
               }
@@ -6096,7 +6097,7 @@
                 {
                   if (LocaleCompare(keyword,"azimuth") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6108,7 +6109,7 @@
                 {
                   if (LocaleCompare(keyword,"elevation") == 0)
                     {
-                      geometry_info.sigma=atof(value);
+                      geometry_info.sigma=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6197,7 +6198,7 @@
                 {
                   if (LocaleCompare(keyword,"opacity") == 0)
                     {
-                      geometry_info.rho=atol(value);
+                      geometry_info.rho=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6209,7 +6210,7 @@
                 {
                   if (LocaleCompare(keyword,"sigma") == 0)
                     {
-                      geometry_info.sigma=atol(value);
+                      geometry_info.sigma=StringToLong(value);
                       break;
                     }
                   break;
@@ -6219,7 +6220,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.xi=atof(value);
+                      geometry_info.xi=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6231,7 +6232,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry_info.psi=atol(value);
+                      geometry_info.psi=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6283,7 +6284,7 @@
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = atof( value );
+                radius = StringToDouble( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6294,7 +6295,7 @@
             {
               if (LocaleCompare(keyword,"sigma") == 0)
               {
-                sigma = atol( value );
+                sigma = StringToLong( value );
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6361,7 +6362,7 @@
           {
           if (LocaleCompare(keyword,"height") == 0)
             {
-            height = atol( value );
+            height = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6372,7 +6373,7 @@
           {
           if (LocaleCompare(keyword,"width") == 0)
             {
-            width = atol( value );
+            width = StringToLong( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6466,7 +6467,7 @@
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6478,7 +6479,7 @@
                 {
                   if (LocaleCompare(keyword,"y") == 0)
                     {
-                      geometry_info.sigma=atol(value);
+                      geometry_info.sigma=StringToLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6570,7 +6571,7 @@
                 {
                   if (LocaleCompare(keyword,"threshold") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6630,7 +6631,7 @@
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6877,7 +6878,7 @@
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=atof(value);
+                      geometry_info.rho=StringToDouble(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -7030,7 +7031,7 @@
           {
           if (LocaleCompare(keyword,"threshold") == 0)
             {
-            threshold = atof( value );
+            threshold = StringToDouble( value );
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7838,7 +7839,7 @@
 
           limit=MagickResourceInfinity;
           if (LocaleCompare(value,"unlimited") != 0)
-            limit=(MagickSizeType) StringToDouble(value,100.0);
+            limit=(MagickSizeType) SiPrefixToDouble(value,100.0);
           (void) SetMagickResourceLimit(AreaResource,limit);
           break;
         }
@@ -7868,7 +7869,7 @@
         {
           if (image == (Image *) NULL)
             break;
-          image->bias=StringToDouble(value,QuantumRange);
+          image->bias=SiPrefixToDouble(value,QuantumRange);
           break;
         }
       if (LocaleCompare(keyword,"blue-primary") == 0)
@@ -7971,8 +7972,8 @@
     {
       if (LocaleCompare(keyword,"pointsize") == 0)
         {
-          image_info->pointsize=atof(value);
-          draw_info->pointsize=atof(value);
+          image_info->pointsize=StringToDouble(value);
+          draw_info->pointsize=StringToDouble(value);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7983,10 +7984,10 @@
     {
       if (LocaleCompare(keyword,"quality") == 0)
         {
-          image_info->quality=atol(value);
+          image_info->quality=StringToLong(value);
           if (image == (Image *) NULL)
             break;
-          image->quality=atol(value);
+          image->quality=StringToLong(value);
           break;
         }
       break;
diff --git a/coders/png.c b/coders/png.c
index 69ed1d9..f537b3c 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -76,6 +76,7 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
+#include "magick/string-private.h"
 #include "magick/transform.h"
 #include "magick/utility.h"
 #if defined(MAGICKCORE_PNG_DELEGATE)
@@ -1540,7 +1541,7 @@
   /* look for length */
   while (*sp == '\0' || *sp == ' ' || *sp == '\n')
      sp++;
-  length=(png_uint_32) atol(sp);
+  length=(png_uint_32) StringToLong(sp);
   while (*sp != ' ' && *sp != '\n')
      sp++;
   /* allocate space */
diff --git a/coders/pnm.c b/coders/pnm.c
index 0181a6d..ca4dd42 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -53,6 +53,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/pixel-private.h"
@@ -61,7 +62,7 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
   Forward declarations.
@@ -312,7 +313,7 @@
               scale[MaxTextExtent];
 
             (void) ReadBlobString(image,scale);
-            quantum_scale=atof(scale);
+            quantum_scale=StringToDouble(scale);
           }
         else
           {
@@ -365,11 +366,11 @@
             Assign a value to the specified keyword.
           */
           if (LocaleCompare(keyword,"depth") == 0)
-            packet_size=(unsigned long) atol(value);
+            packet_size=(unsigned long) StringToLong(value);
           if (LocaleCompare(keyword,"height") == 0)
-            image->rows=(unsigned long) atol(value);
+            image->rows=(unsigned long) StringToLong(value);
           if (LocaleCompare(keyword,"maxval") == 0)
-            max_value=(unsigned long) atol(value);
+            max_value=(unsigned long) StringToLong(value);
           if (LocaleCompare(keyword,"TUPLTYPE") == 0)
             {
               if (LocaleCompare(value,"BLACKANDWHITE") == 0)
@@ -404,7 +405,7 @@
                 }
             }
           if (LocaleCompare(keyword,"width") == 0)
-            image->columns=(unsigned long) atol(value);
+            image->columns=(unsigned long) StringToLong(value);
         }
       }
     if ((image->columns == 0) || (image->rows == 0))
diff --git a/coders/sct.c b/coders/sct.c
index 46ed061..2e615cf 100644
--- a/coders/sct.c
+++ b/coders/sct.c
@@ -50,12 +50,13 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -204,14 +205,14 @@
   separations_mask=ReadBlobMSBShort(image);
   count=ReadBlob(image,14,buffer);
   buffer[14]='\0';
-  height=atof((char *) buffer);
+  height=StringToDouble((char *) buffer);
   count=ReadBlob(image,14,buffer);
-  width=atof((char *) buffer);
+  width=StringToDouble((char *) buffer);
   count=ReadBlob(image,12,buffer);
   buffer[12]='\0';
-  image->rows=1UL*atol((char *) buffer);
+  image->rows=1UL*StringToLong((char *) buffer);
   count=ReadBlob(image,12,buffer);
-  image->columns=1UL*atol((char *) buffer);
+  image->columns=1UL*StringToLong((char *) buffer);
   count=ReadBlob(image,200,buffer);
   count=ReadBlob(image,768,buffer);
   if (separations_mask == 0x0f)
diff --git a/coders/svg.c b/coders/svg.c
index eb9224f..686669d 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -59,6 +59,7 @@
 #include "magick/log.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/quantum-private.h"
@@ -67,7 +68,7 @@
 #include "magick/resource_.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 #include "magick/token.h"
 #include "magick/utility.h"
 #if defined(MAGICKCORE_XML_DELEGATE)
@@ -301,7 +302,7 @@
   assert(string != (const char *) NULL);
   p=(const char *) string;
   GetMagickToken(p,&p,token);
-  value=atof(token);
+  value=StringToDouble(token);
   if (strchr(token,'%') != (char *) NULL)
     {
       double
@@ -1286,27 +1287,27 @@
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=atof(value);
+                        affine.sx=StringToDouble(value);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=atof(token);
+                        affine.rx=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=atof(token);
+                        affine.ry=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=atof(token);
+                        affine.sy=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=atof(token);
+                        affine.tx=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=atof(token);
+                        affine.ty=StringToDouble(token);
                         break;
                       }
                     break;
@@ -1861,27 +1862,27 @@
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=atof(value);
+                        affine.sx=StringToDouble(value);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=atof(token);
+                        affine.rx=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=atof(token);
+                        affine.ry=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=atof(token);
+                        affine.sy=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=atof(token);
+                        affine.tx=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=atof(token);
+                        affine.ty=StringToDouble(token);
                         break;
                       }
                     break;
@@ -1898,15 +1899,15 @@
 
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        angle=atof(value);
+                        angle=StringToDouble(value);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        x=atof(token);
+                        x=StringToDouble(token);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        y=atof(token);
+                        y=StringToDouble(token);
                         affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                         affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                         affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2008,21 +2009,21 @@
             {
               p=(const char *) value;
               GetMagickToken(p,&p,token);
-              svg_info->view_box.x=atof(token);
+              svg_info->view_box.x=StringToDouble(token);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.y=atof(token);
+              svg_info->view_box.y=StringToDouble(token);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.width=atof(token);
+              svg_info->view_box.width=StringToDouble(token);
               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=atof(token);
+              svg_info->view_box.height=StringToDouble(token);
               if (svg_info->bounds.height == 0)
                 svg_info->bounds.height=svg_info->view_box.height;
               break;
@@ -3480,34 +3481,34 @@
         if (LocaleCompare("affine",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=atof(token);
+            affine.sx=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.rx=atof(token);
+            affine.rx=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ry=atof(token);
+            affine.ry=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=atof(token);
+            affine.sy=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.tx=atof(token);
+            affine.tx=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=atof(token);
+            affine.ty=StringToDouble(token);
             break;
           }
         if (LocaleCompare("angle",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.rx=atof(token);
-            affine.ry=atof(token);
+            affine.rx=StringToDouble(token);
+            affine.ry=StringToDouble(token);
             break;
           }
         if (LocaleCompare("arc",keyword) == 0)
@@ -3822,23 +3823,23 @@
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(type,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.segment.x1=atof(token);
-                svg_info.element.cx=atof(token);
+                svg_info.segment.x1=StringToDouble(token);
+                svg_info.element.cx=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y1=atof(token);
-                svg_info.element.cy=atof(token);
+                svg_info.segment.y1=StringToDouble(token);
+                svg_info.element.cy=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.x2=atof(token);
-                svg_info.element.major=atof(token);
+                svg_info.segment.x2=StringToDouble(token);
+                svg_info.element.major=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y2=atof(token);
-                svg_info.element.minor=atof(token);
+                svg_info.segment.y2=StringToDouble(token);
+                svg_info.element.minor=StringToDouble(token);
                 (void) FormatMagickString(message,MaxTextExtent,
                   "<%sGradient id=\"%s\" x1=\"%g\" y1=\"%g\" x2=\"%g\" "
                   "y2=\"%g\">\n",type,name,svg_info.segment.x1,
@@ -3848,7 +3849,7 @@
                     GetMagickToken(q,&q,token);
                     if (*token == ',')
                       GetMagickToken(q,&q,token);
-                    svg_info.element.angle=atof(token);
+                    svg_info.element.angle=StringToDouble(token);
                     (void) FormatMagickString(message,MaxTextExtent,
                       "<%sGradient id=\"%s\" cx=\"%g\" cy=\"%g\" r=\"%g\" "
                       "fx=\"%g\" fy=\"%g\">\n",type,name,svg_info.element.cx,
@@ -3874,19 +3875,19 @@
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(name,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.bounds.x=atof(token);
+                svg_info.bounds.x=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.y=atof(token);
+                svg_info.bounds.y=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.width=atof(token);
+                svg_info.bounds.width=StringToDouble(token);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.height=atof(token);
+                svg_info.bounds.height=StringToDouble(token);
                 (void) FormatMagickString(message,MaxTextExtent,
                   "<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
                   "height=\"%g\">\n",name,svg_info.bounds.x,svg_info.bounds.y,
@@ -3929,11 +3930,11 @@
         if (LocaleCompare("scale",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=atof(token);
+            affine.sx=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=atof(token);
+            affine.sy=StringToDouble(token);
             break;
           }
         if (LocaleCompare("skewX",keyword) == 0)
@@ -4084,11 +4085,11 @@
         if (LocaleCompare("translate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.tx=atof(token);
+            affine.tx=StringToDouble(token);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=atof(token);
+            affine.ty=StringToDouble(token);
             break;
           }
         status=MagickFalse;
@@ -4137,11 +4138,11 @@
       if (IsPoint(q) == MagickFalse)
         break;
       GetMagickToken(q,&q,token);
-      point.x=atof(token);
+      point.x=StringToDouble(token);
       GetMagickToken(q,&q,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
-      point.y=atof(token);
+      point.y=StringToDouble(token);
       GetMagickToken(q,(const char **) NULL,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
diff --git a/coders/thumbnail.c b/coders/thumbnail.c
index 7f42a7f..e19a026 100644
--- a/coders/thumbnail.c
+++ b/coders/thumbnail.c
@@ -47,6 +47,7 @@
 #include "magick/exception-private.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/profile.h"
@@ -54,7 +55,7 @@
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
   Forward declarations.
@@ -183,11 +184,11 @@
   property=GetImageProperty(image,"exif:JPEGInterchangeFormat");
   if (property == (const char *) NULL)
     ThrowWriterException(CoderError,"ImageDoesNotHaveAThumbnail");
-  offset=(ssize_t) atoi(property);
+  offset=(ssize_t) StringToLong(property);
   property=GetImageProperty(image,"exif:JPEGInterchangeFormatLength");
   if (property == (const char *) NULL)
     ThrowWriterException(CoderError,"ImageDoesNotHaveAThumbnail");
-  length=(size_t) atoi(property);
+  length=(size_t) StringToLong(property);
   (void) ResetMagickMemory(magick,0,sizeof(magick));
   for (i=0; i < (long) length; i++)
   {
diff --git a/coders/tiff.c b/coders/tiff.c
index cab09db..783db7d 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -73,9 +73,9 @@
 #include "magick/static.h"
 #include "magick/statistic.h"
 #include "magick/string_.h"
+#include "magick/string-private.h"
 #include "magick/thread_.h"
 #include "magick/utility.h"
-#include "magick/module.h"
 #if defined(MAGICKCORE_TIFF_DELEGATE)
 # if defined(MAGICKCORE_HAVE_TIFFCONF_H)
 #  include "tiffconf.h"
@@ -2323,7 +2323,7 @@
         uint16
           shorty;
 
-        shorty=(uint16) atoi(value);
+        shorty=(uint16) StringToLong(value);
         (void) TIFFSetField(tiff,exif_info[i].tag,shorty);
         break;
       }
@@ -2332,7 +2332,7 @@
         uint16
           longy;
 
-        longy=(uint16) atol(value);
+        longy=(uint16) StringToLong(value);
         (void) TIFFSetField(tiff,exif_info[i].tag,longy);
         break;
       }
@@ -2342,7 +2342,7 @@
         float
           rational;
 
-        rational=atof(value);
+        rational=StringToDouble(value);
         (void) TIFFSetField(tiff,exif_info[i].tag,rational);
         break;
       }
diff --git a/coders/vicar.c b/coders/vicar.c
index 30e17d7..60db5f1 100644
--- a/coders/vicar.c
+++ b/coders/vicar.c
@@ -52,13 +52,14 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/module.h"
 #include "magick/monitor.h"
 #include "magick/monitor-private.h"
 #include "magick/quantum-private.h"
 #include "magick/quantum-private.h"
 #include "magick/static.h"
 #include "magick/string_.h"
-#include "magick/module.h"
+#include "magick/string-private.h"
 
 /*
   Forward declarations.
@@ -253,17 +254,17 @@
           Assign a value to the specified keyword.
         */
         if (LocaleCompare(keyword,"Label_RECORDS") == 0)
-          length=(ssize_t) atol(value);
+          length=(ssize_t) StringToLong(value);
         if (LocaleCompare(keyword,"LBLSIZE") == 0)
-          length=(ssize_t) atol(value);
+          length=(ssize_t) StringToLong(value);
         if (LocaleCompare(keyword,"RECORD_BYTES") == 0)
-          image->columns=1UL*atol(value);
+          image->columns=1UL*StringToLong(value);
         if (LocaleCompare(keyword,"NS") == 0)
-          image->columns=1UL*atol(value);
+          image->columns=1UL*StringToLong(value);
         if (LocaleCompare(keyword,"LINES") == 0)
-          image->rows=1UL*atol(value);
+          image->rows=1UL*StringToLong(value);
         if (LocaleCompare(keyword,"NL") == 0)
-          image->rows=1UL*atol(value);
+          image->rows=1UL*StringToLong(value);
       }
     while (isspace((int) ((unsigned char) c)) != 0)
     {