]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 18 Dec 2009 02:53:20 +0000 (02:53 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 18 Dec 2009 02:53:20 +0000 (02:53 +0000)
28 files changed:
coders/cin.c
coders/dcm.c
coders/dpx.c
coders/hald.c
coders/meta.c
coders/miff.c
coders/mpc.c
coders/msl.c
coders/pnm.c
configure.ac
magick/animate.c
magick/display.c
magick/draw.c
magick/image.c
magick/log.c
magick/property.c
magick/resource.c
magick/string-private.h
magick/threshold.c
magick/type.c
magick/xwindow.c
tests/validate.c
wand/animate.c
wand/display.c
wand/drawing-wand.c
wand/import.c
wand/mogrify.c
wand/montage.c

index 559439349c3093689edf40ceb7751528233d6198..26442fc3a9a7658bbaa851abc3da8879cf9a343a 100644 (file)
@@ -1103,12 +1103,12 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image)
   cin.film.prefix=0UL;
   value=GetCINProperty(image_info,image,"cin:film.prefix");
   if (value != (const char *) NULL)
-    cin.film.prefix=(unsigned long) StringToLong(value);
+    cin.film.prefix=StringToUnsignedLong(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) StringToLong(value);
+    cin.film.count=StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,cin.film.count);
   value=GetCINProperty(image_info,image,"cin:film.format");
   if (value != (const char *) NULL)
@@ -1118,7 +1118,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image)
   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) StringToLong(value);
+    cin.film.frame_position=StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,cin.film.frame_position);
   cin.film.frame_rate=0.0f;
   value=GetCINProperty(image_info,image,"cin:film.frame_rate");
index 392666c4c35e195b6adac07f8daed40bef6ca59b..95a608fdb2ecb55cd470c1264d0a684ccea59caf 100644 (file)
@@ -3174,7 +3174,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             /*
               Number of frames.
             */
-            number_scenes=(unsigned long) StringToLong((char *) data);
+            number_scenes=StringToUnsignedLong((char *) data);
             break;
           }
           case 0x0010:
@@ -3252,7 +3252,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             /*
               Visible pixel range: width.
             */
-            window_width=(unsigned long) StringToLong((char *) data);
+            window_width=StringToUnsignedLong((char *) data);
             break;
           }
           case 0x1200:
index 43b283a0390bac7b9d12e45a7b7c577ee1549e86..39a70145c012bc790ffaee6a7c180bde7858e8f0 100644 (file)
@@ -1612,12 +1612,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   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) StringToLong(value);
+    dpx.orientation.x_offset=(unsigned int) StringToUnsignedLong(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) StringToLong(value);
+    dpx.orientation.y_offset=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_offset);
   dpx.orientation.x_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_center");
@@ -1632,12 +1632,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   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) StringToLong(value);
+    dpx.orientation.x_size=(unsigned int) StringToUnsignedLong(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) StringToLong(value);
+    dpx.orientation.y_size=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_size);
   value=GetDPXProperty(image_info,image,"dpx:orientation.filename");
   if (value != (const char *) NULL)
@@ -1726,17 +1726,17 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   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) StringToLong(value);
+    dpx.film.frame_position=(unsigned int) StringToUnsignedLong(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) StringToLong(value);
+    dpx.film.sequence_extent=(unsigned int) StringToUnsignedLong(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) StringToLong(value);
+    dpx.film.held_count=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.film.held_count);
   dpx.film.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_rate");
index 921f48f8d43a1400dca227e295219904661b856e..edecbb48c1071414ced605fd1daf68fc00c5d797 100644 (file)
@@ -118,7 +118,7 @@ static Image *ReadHALDImage(const ImageInfo *image_info,
   image=AcquireImage(image_info);
   level=0;
   if (*image_info->filename != '\0')
-    level=(unsigned long) StringToLong(image_info->filename);
+    level=StringToUnsignedLong(image_info->filename);
   if (level < 2)
     level=8;
   status=MagickTrue;
index 5837442fe45b0fc836eac718c25852bcd2a95b4e..70496364bb7112dbea7d42a5ee46ebe67ff55a3a 100644 (file)
@@ -362,7 +362,7 @@ static long parse8BIM(Image *ifile, Image *ofile)
                   dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum = (unsigned int) StringToLong(newstr);
+                recnum = (unsigned int) StringToUnsignedLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
@@ -638,7 +638,7 @@ static long parse8BIMW(Image *ifile, Image *ofile)
                   dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum=(unsigned int) StringToLong(newstr);
+                recnum=(unsigned int) StringToUnsignedLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
index c6ac0c917f9f8460e7ab6cc23d317be213a9c94d..10f6dd4b4fc2020ee110fee2505d52703d2490b9 100644 (file)
@@ -624,7 +624,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    colors=(unsigned long) StringToLong(options);
+                    colors=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -653,7 +653,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) StringToLong(options);
+                    image->columns=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -664,12 +664,12 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) StringToLong(options);
+                    image->delay=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) StringToLong(options);
+                    image->depth=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -748,7 +748,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) StringToLong(options);
+                    image->iterations=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -849,7 +849,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) StringToLong(options);
+                    image->quality=StringToUnsignedLong(options);
                     break;
                   }
                 if ((LocaleCompare(keyword,"quantum-format") == 0) ||
@@ -904,7 +904,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) StringToLong(options);
+                    image->rows=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -915,7 +915,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) StringToLong(options);
+                    image->scene=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
index ece2d72d4dba92b659ff818797e995728fae8e3f..2d78caeab601e17e7905c6b5b28021c52b5d4e48 100644 (file)
@@ -367,7 +367,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    image->colors=(unsigned long) StringToLong(options);
+                    image->colors=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -396,7 +396,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) StringToLong(options);
+                    image->columns=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -407,12 +407,12 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) StringToLong(options);
+                    image->delay=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) StringToLong(options);
+                    image->depth=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -484,7 +484,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) StringToLong(options);
+                    image->iterations=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -592,12 +592,12 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) StringToLong(options);
+                    image->quality=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"quantum-depth") == 0)
                   {
-                    quantum_depth=(unsigned long) StringToLong(options);
+                    quantum_depth=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -637,7 +637,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) StringToLong(options);
+                    image->rows=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -648,7 +648,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) StringToLong(options);
+                    image->scene=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
index 038867e87338efcc16ad59a286dc464b1454d4b1..58bf57593bce0a4b39a3575a6654679d82e1aad9 100644 (file)
@@ -5343,7 +5343,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5714,7 +5714,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5790,7 +5790,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
index ca4dd42294ca5bbeb11837bede715788cc4eef74..44881fb3bcdbd0929f5ed880a5e683faafe99a8f 100644 (file)
@@ -366,11 +366,11 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             Assign a value to the specified keyword.
           */
           if (LocaleCompare(keyword,"depth") == 0)
-            packet_size=(unsigned long) StringToLong(value);
+            packet_size=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"height") == 0)
-            image->rows=(unsigned long) StringToLong(value);
+            image->rows=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"maxval") == 0)
-            max_value=(unsigned long) StringToLong(value);
+            max_value=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"TUPLTYPE") == 0)
             {
               if (LocaleCompare(value,"BLACKANDWHITE") == 0)
@@ -405,7 +405,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 }
             }
           if (LocaleCompare(keyword,"width") == 0)
-            image->columns=(unsigned long) StringToLong(value);
+            image->columns=StringToUnsignedLong(value);
         }
       }
     if ((image->columns == 0) || (image->rows == 0))
index 74e69589b5d85ece8ebd0e60c1be46f86dc20b04..631db07befb29bb72e412f8ac50ea054b9ccf80e 100755 (executable)
@@ -988,7 +988,7 @@ AC_TYPE_SIGNAL
 AC_FUNC_STRTOD
 AC_FUNC_VPRINTF
 
-AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
 
 #
 # Check for clock_gettime().
index 1b12255b7996061e13811cf45e713bdf76ddc5db..becb5d3e96698f92d99731f9d1084a21160c7623 100644 (file)
@@ -2950,7 +2950,7 @@ static MagickBooleanType XSaveImage(Display *display,
         quality);
       if (*quality == '\0')
         return(MagickTrue);
-      image->quality=(unsigned long) StringToLong(quality);
+      image->quality=StringToUnsignedLong(quality);
       image_info->interlace=status != MagickFalse ?  NoInterlace :
         PlaneInterlace;
     }
index 5e1239e4579eccaf0c32b3d8fa31626abb02ed6e..9a48019bbc1831c97ff8d1b8188029a9db55dde7 100644 (file)
@@ -5712,14 +5712,14 @@ static MagickBooleanType XDrawEditImage(Display *display,
                 break;
               if (entry != 5)
                 {
-                  line_width=(unsigned int) StringToLong(WidthsMenu[entry]);
+                  line_width=(unsigned int) StringToUnsignedLong(WidthsMenu[entry]);
                   break;
                 }
               (void) XDialogWidget(display,windows,"Ok","Enter line width:",
                 width);
               if (*width == '\0')
                 break;
-              line_width=(unsigned int) StringToLong(width);
+              line_width=(unsigned int) StringToUnsignedLong(width);
               break;
             }
             case DrawUndoCommand:
@@ -7935,7 +7935,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       */
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
-      quantize_info.number_colors=(unsigned long) StringToLong(colors);
+      quantize_info.number_colors=StringToUnsignedLong(colors);
       quantize_info.dither=status != 0 ? MagickTrue : MagickFalse;
       (void) QuantizeImage(&quantize_info,*image);
       XSetCursorState(display,windows,MagickFalse);
@@ -9077,7 +9077,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         "Pause how many 1/100ths of a second between images:",delay);
       if (*delay == '\0')
         break;
-      resource_info->delay=(unsigned long) StringToLong(delay);
+      resource_info->delay=StringToUnsignedLong(delay);
       XClientMessage(display,windows->image.id,windows->im_protocols,
         windows->im_next_image,CurrentTime);
       break;
@@ -12397,7 +12397,7 @@ static MagickBooleanType XSaveImage(Display *display,
         quality);
       if (*quality == '\0')
         return(MagickTrue);
-      image->quality=(unsigned long) StringToLong(quality);
+      image->quality=StringToUnsignedLong(quality);
       image_info->interlace=status != 0 ? NoInterlace : PlaneInterlace;
     }
   if ((LocaleCompare(image_info->magick,"EPS") == 0) ||
index fb92e9780ac4e177d899fe7c78990adbcf121c99..e86f166a4411f3800db3447427178bba0a7d8ebb 100644 (file)
@@ -2091,7 +2091,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("font-weight",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->weight=(unsigned long) StringToLong(token);
+            graphic_context[n]->weight=StringToUnsignedLong(token);
             if (LocaleCompare(token,"all") == 0)
               graphic_context[n]->weight=0;
             if (LocaleCompare(token,"bold") == 0)
@@ -2633,7 +2633,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("stroke-miterlimit",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->miterlimit=(unsigned long) StringToLong(token);
+            graphic_context[n]->miterlimit=StringToUnsignedLong(token);
             break;
           }
         if (LocaleCompare("stroke-opacity",keyword) == 0)
index 015863624957751c9035e12740547cd605bae0ee..1ec481036668866e0322b2ca15cf4cf1715239b3 100644 (file)
@@ -3096,7 +3096,7 @@ MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info,
             last;
 
           (void) CloneString(&image_info->scenes,subimage);
-          image_info->scene=(unsigned long) StringToLong(image_info->scenes);
+          image_info->scene=StringToUnsignedLong(image_info->scenes);
           image_info->number_scenes=image_info->scene;
           p=image_info->scenes;
           for (q=(char *) image_info->scenes; *q != '\0'; p++)
@@ -3976,7 +3976,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
     (void) QueryColorDatabase(option,&image->border_color,&image->exception);
   option=GetImageOption(image_info,"colors");
   if (option != (const char *) NULL)
-    image->colors=(unsigned long) StringToLong(option);
+    image->colors=StringToUnsignedLong(option);
   option=GetImageOption(image_info,"compose");
   if (option != (const char *) NULL)
     image->compose=(CompositeOperator) ParseMagickOption(MagickComposeOptions,
@@ -4029,7 +4029,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
     }
   option=GetImageOption(image_info,"depth");
   if (option != (const char *) NULL)
-    image->depth=(unsigned long) StringToLong(option);
+    image->depth=StringToUnsignedLong(option);
   option=GetImageOption(image_info,"dispose");
   if (option != (const char *) NULL)
     image->dispose=(DisposeType) ParseMagickOption(MagickDisposeOptions,
@@ -4074,7 +4074,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
       MagickInterpolateOptions,MagickFalse,option);
   option=GetImageOption(image_info,"loop");
   if (option != (const char *) NULL)
-    image->iterations=(unsigned long) StringToLong(option);
+    image->iterations=StringToUnsignedLong(option);
   option=GetImageOption(image_info,"mattecolor");
   if (option != (const char *) NULL)
     (void) QueryColorDatabase(option,&image->matte_color,&image->exception);
@@ -4084,7 +4084,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
       MagickOrientationOptions,MagickFalse,option);
   option=GetImageOption(image_info,"quality");
   if (option != (const char *) NULL)
-    image->quality=(unsigned long) StringToLong(option);
+    image->quality=StringToUnsignedLong(option);
   option=GetImageOption(image_info,"page");
   if (option != (const char *) NULL)
     {
@@ -4108,7 +4108,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
     image->quality=image_info->quality;
   option=GetImageOption(image_info,"scene");
   if (option != (const char *) NULL)
-    image->scene=(unsigned long) StringToLong(option);
+    image->scene=StringToUnsignedLong(option);
   option=GetImageOption(image_info,"taint");
   if (option != (const char *) NULL)
     image->taint=(MagickBooleanType) ParseMagickOption(MagickBooleanOptions,
index 347bb87e9ec1325d65fb5f66b87ca0af187c852e..2555551b417f4aade7ccff55a024aa3a6680afa1 100644 (file)
@@ -1448,7 +1448,7 @@ static MagickBooleanType LoadLogList(const char *xml,const char *filename,
                 log_info->generations=(~0UL);
                 break;
               }
-            log_info->generations=(unsigned long) StringToLong(token);
+            log_info->generations=StringToUnsignedLong(token);
             break;
           }
         break;
@@ -1463,7 +1463,7 @@ static MagickBooleanType LoadLogList(const char *xml,const char *filename,
                 log_info->limit=(~0UL);
                 break;
               }
-            log_info->limit=(unsigned long) StringToLong(token);
+            log_info->limit=StringToUnsignedLong(token);
             break;
           }
         break;
index 3929e9cb09ec86a33d860c434a974a548488c43b..3fa802b556bd64a9279298bf4ca23eed4f71e235 100644 (file)
@@ -3343,7 +3343,7 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
         }
       if (LocaleCompare(property,"depth") == 0)
         {
-          image->depth=(unsigned long) StringToLong(value);
+          image->depth=StringToUnsignedLong(value);
           break;
         }
       if (LocaleCompare(property,"dispose") == 0)
@@ -3415,7 +3415,7 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
     {
       if (LocaleCompare(property,"loop") == 0)
         {
-          image->iterations=(unsigned long) StringToLong(value);
+          image->iterations=StringToUnsignedLong(value);
           break;
         }
       status=AddValueToSplayTree((SplayTreeInfo *) image->properties,
index ca4f7315529d79f794ee04586c68d4e0d790b10b..42ed462ca31f4cc94629f53882e3163a66b6fee9 100644 (file)
@@ -993,7 +993,7 @@ MagickExport MagickBooleanType ResourceComponentGenesis(void)
     limit=GetPolicyValue("thread");
   if (limit != (char *) NULL)
     {
-      SetOpenMPMaximumThreads((unsigned long) StringToLong(limit));
+      SetOpenMPMaximumThreads(StringToUnsignedLong(limit));
       (void) SetMagickResourceLimit(ThreadResource,StringToSizeType(limit,
         100.0));
       limit=DestroyString(limit);
index c7a3f022c31696aa6c68c5660889c36370f949e6..07ce8ad4d183582d8f70110e7e7504c9498792a9 100644 (file)
@@ -1,12 +1,12 @@
 /*
   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
-  
+
   You may not use this file except in compliance with the License.
   obtain a copy of the License at
-  
+
     http://www.imagemagick.org/script/license.php
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,6 +61,11 @@ static inline long StringToLong(const char *value)
   return(strtol(value,(char **) NULL,10));
 }
 
+static inline unsigned long StringToUnsignedLong(const char *value)
+{
+  return(strtoul(value,(char **) NULL,10));
+}
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif
index 98d89be2e30722e202cc13bef7508550d2d99c87..cae65f190cd7cb3aedde3d9a8fa08ef0a1d443d2 100644 (file)
@@ -948,7 +948,7 @@ MagickExport ThresholdMap *GetThresholdMapFile(const char *xml,
     map = DestroyThresholdMap(map);
     return(map);
   }
-  map->width = (unsigned long) StringToLong(attr);
+  map->width = StringToUnsignedLong(attr);
   if ( map->width == 0 ) {
     (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
      "XmlInvalidAttribute", "<levels width>, map \"%s\"", map_id);
@@ -965,7 +965,7 @@ MagickExport ThresholdMap *GetThresholdMapFile(const char *xml,
     map = DestroyThresholdMap(map);
     return(map);
   }
-  map->height = (unsigned long) StringToLong(attr);
+  map->height = StringToUnsignedLong(attr);
   if ( map->height == 0 ) {
     (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
       "XmlInvalidAttribute", "<levels height>, map \"%s\"", map_id);
index 8940a5f1ff6694b348a0a4326c13212f98c6b9bc..6786f755f01d08ebf6681e24f319db87362e64c6 100644 (file)
@@ -1103,7 +1103,7 @@ static MagickBooleanType LoadTypeList(const char *xml,const char *filename,
       {
         if (LocaleCompare((char *) keyword,"face") == 0)
           {
-            type_info->face=(unsigned long) StringToLong(token);
+            type_info->face=StringToUnsignedLong(token);
             break;
           }
         if (LocaleCompare((char *) keyword,"family") == 0)
@@ -1225,7 +1225,7 @@ static MagickBooleanType LoadTypeList(const char *xml,const char *filename,
       {
         if (LocaleCompare((char *) keyword,"weight") == 0)
           {
-            type_info->weight=(unsigned long) StringToLong(token);
+            type_info->weight=StringToUnsignedLong(token);
             if (LocaleCompare(token,"bold") == 0)
               type_info->weight=700;
             if (LocaleCompare(token,"normal") == 0)
index 9d56d79bcdb7b9d4894b89b097f4e6560026161f..c795d725071c1781a31d9f3e28e0b1b9a952b84b 100644 (file)
@@ -3465,7 +3465,7 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
     "borderColor",BorderColor);
   resource_value=XGetResourceClass(database,client_name,"borderWidth",
     (char *) "2");
-  resource_info->border_width=(unsigned int) StringToLong(resource_value);
+  resource_info->border_width=(unsigned int) StringToUnsignedLong(resource_value);
   resource_value=XGetResourceClass(database,client_name,"colormap",
     (char *) "shared");
   resource_info->colormap=UndefinedColormap;
@@ -3486,7 +3486,7 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
     (char *) "False");
   resource_info->confirm_edit=IsMagickTrue(resource_value);
   resource_value=XGetResourceClass(database,client_name,"delay",(char *) "1");
-  resource_info->delay=(unsigned int) StringToLong(resource_value);
+  resource_info->delay=(unsigned int) StringToUnsignedLong(resource_value);
   resource_info->display_gamma=XGetResourceClass(database,client_name,
     "displayGamma",(char *) "2.2");
   resource_value=XGetResourceClass(database,client_name,"displayWarnings",
@@ -3541,7 +3541,7 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
   resource_info->immutable=IsMagickTrue(resource_value);
   resource_value=XGetResourceClass(database,client_name,"magnify",
     (char *) "3");
-  resource_info->magnify=(unsigned int) StringToLong(resource_value);
+  resource_info->magnify=(unsigned int) StringToUnsignedLong(resource_value);
   resource_info->map_type=XGetResourceClass(database,client_name,"map",
     (char *) NULL);
   resource_info->matte_color=XGetResourceInstance(database,client_name,
@@ -3571,7 +3571,7 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
   resource_info->pen_colors[10]=XGetResourceClass(database,client_name,"pen0",
     (char *) "gray");
   resource_value=XGetResourceClass(database,client_name,"pause",(char *) "0");
-  resource_info->pause=(unsigned int) StringToLong(resource_value);
+  resource_info->pause=(unsigned int) StringToUnsignedLong(resource_value);
   resource_value=XGetResourceClass(database,client_name,"quantum",(char *) "1");
   resource_info->quantum=StringToLong(resource_value);
   resource_info->text_font=XGetResourceClass(database,client_name,(char *)
@@ -3582,7 +3582,7 @@ MagickExport void XGetResourceInfo(const ImageInfo *image_info,
     (char *) NULL);
   resource_value=XGetResourceClass(database,client_name,"undoCache",
     (char *) "16");
-  resource_info->undo_cache=(unsigned int) StringToLong(resource_value);
+  resource_info->undo_cache=(unsigned int) StringToUnsignedLong(resource_value);
   resource_value=XGetResourceClass(database,client_name,"update",
     (char *) "False");
   resource_info->update=IsMagickTrue(resource_value);
index 985f48caee9a2927b01924e59d747950e0d6e44d..c165506e1070da1f548d46759506cd56ac94896d 100644 (file)
@@ -1293,7 +1293,7 @@ int main(int argc,char **argv)
       {
         if (LocaleCompare("bench",option+1) == 0)
           {
-            iterations=(unsigned long) StringToLong(argv[++i]);
+            iterations=StringToUnsignedLong(argv[++i]);
             break;
           }
         ThrowValidateException(OptionError,"UnrecognizedOption",option)
index 24b284d28d42f02ce23c1c6be14f2a09e9446a4b..d42bca6148c4f05a727fcd10c8c80bac60379166 100644 (file)
@@ -524,7 +524,8 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             i++;
             if ((i == (long) argc) || (IsGeometry(argv[i]) == MagickFalse))
               ThrowAnimateException(OptionError,"MissingArgument",option);
-            resource_info.border_width=(unsigned int) StringToLong(argv[i]);
+            resource_info.border_width=(unsigned int)
+              StringToUnsignedLong(argv[i]);
             break;
           }
         ThrowAnimateException(OptionError,"UnrecognizedOption",option);
@@ -615,7 +616,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
               ThrowAnimateException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowAnimateInvalidArgumentException(option,argv[i]);
-            quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+            quantize_info->number_colors=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
@@ -1113,7 +1114,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
               ThrowAnimateException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowAnimateInvalidArgumentException(option,argv[i]);
-            resource_info.pause=(unsigned int) StringToLong(argv[i]);
+            resource_info.pause=(unsigned int) StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("page",option+1) == 0)
@@ -1348,7 +1349,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
               ThrowAnimateException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowAnimateInvalidArgumentException(option,argv[i]);
-            quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+            quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("trim",option+1) == 0)
index eb90d2fb3536715592ec6135af61b738aad0c2c1..2b7008fa9c35fd9ab84120655eb13150fdc5eaa3 100644 (file)
@@ -438,7 +438,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
     "pageGeometry",(char *) NULL);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "quality","75");
-  image_info->quality=(unsigned long) StringToLong(resource_value);
+  image_info->quality=StringToUnsignedLong(resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "verbose","False");
   image_info->verbose=IsMagickTrue(resource_value);
@@ -743,7 +743,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            resource_info.border_width=(unsigned int) StringToLong(argv[i]);
+            resource_info.border_width=(unsigned int) StringToUnsignedLong(argv[i]);
             break;
           }
         ThrowDisplayException(OptionError,"UnrecognizedOption",option);
@@ -816,7 +816,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+            quantize_info->number_colors=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
@@ -1343,7 +1343,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            iterations=(unsigned long) StringToLong(argv[i]);
+            iterations=StringToUnsignedLong(argv[i]);
             break;
           }
         ThrowDisplayException(OptionError,"UnrecognizedOption",option);
@@ -1360,7 +1360,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            resource_info.magnify=(unsigned int) StringToLong(argv[i]);
+            resource_info.magnify=(unsigned int) StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("map",option+1) == 0)
@@ -1740,7 +1740,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+            quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("trim",option+1) == 0)
@@ -1759,7 +1759,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
               ThrowDisplayException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowDisplayInvalidArgumentException(option,argv[i]);
-            resource_info.update=(unsigned int) StringToLong(argv[i]);
+            resource_info.update=(unsigned int) StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("use-pixmap",option+1) == 0)
index e827432d10e1d245b2f9554f279bbec21817c699..d025f459006f17338abb601aeb260a75e4561da1 100644 (file)
@@ -6173,7 +6173,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->weight=(unsigned long) StringToLong(value);
+        CurrentContext->weight=StringToUnsignedLong(value);
     }
   child=GetXMLTreeChild(xml_info,"gravity");
   if (child != (XMLTreeInfo *) NULL)
@@ -6284,7 +6284,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->miterlimit=(unsigned long) StringToLong(value);
+        CurrentContext->miterlimit=StringToUnsignedLong(value);
     }
   child=GetXMLTreeChild(xml_info,"stroke-opacity");
   if (child != (XMLTreeInfo *) NULL)
index bbf223fa3c0ce18474d3b16760cbdba573c86b39..c4434e11825c8bcd1c7a993e589e43ca993b995f 100644 (file)
@@ -371,7 +371,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
   ximage_info.borders=IsMagickTrue(resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "delay","0");
-  resource_info.delay=(unsigned int) StringToLong(resource_value);
+  resource_info.delay=(unsigned int) StringToUnsignedLong(resource_value);
   image_info->density=XGetResourceInstance(resource_database,GetClientName(),
     "density",(char *) NULL);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
@@ -398,10 +398,10 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
     "pageGeometry",(char *) NULL);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "pause","0");
-  resource_info.pause=(unsigned int) StringToLong(resource_value);
+  resource_info.pause=(unsigned int) StringToUnsignedLong(resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "quality","85");
-  image_info->quality=(unsigned long) StringToLong(resource_value);
+  image_info->quality=StringToUnsignedLong(resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "screen","False");
   ximage_info.screen=IsMagickTrue(resource_value);
@@ -552,7 +552,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
               ThrowImportException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowImportInvalidArgumentException(option,argv[i]);
-            quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
+            quantize_info->number_colors=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
@@ -1016,7 +1016,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
               ThrowImportException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowImportInvalidArgumentException(option,argv[i]);
-            resource_info.pause=(unsigned int) StringToLong(argv[i]);
+            resource_info.pause=(unsigned int) StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("ping",option+1) == 0)
@@ -1226,7 +1226,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
               ThrowImportException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowImportInvalidArgumentException(option,argv[i]);
-            quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
+            quantize_info->tree_depth=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("trim",option+1) == 0)
index 2b4420c80d20ac0b903912948aeca9c35c44d188..02c997893ac2542fcab35a8dba48836b984be43f 100644 (file)
@@ -136,7 +136,7 @@ WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
     if ((strlen(option) == 1) || ((*option != '-') && (*option != '+')))
       continue;
     if (LocaleCompare("bench",option+1) == 0)
-      iterations=(unsigned long) StringToLong(argv[++i]);
+      iterations=StringToUnsignedLong(argv[++i]);
     if (LocaleCompare("concurrent",option+1) == 0)
       concurrent=MagickTrue;
     if (LocaleCompare("debug",option+1) == 0)
@@ -1127,7 +1127,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               Reduce the number of colors in the image.
             */
             (void) SyncImageSettings(image_info,*image);
-            quantize_info->number_colors=(unsigned long) StringToLong(argv[i+1]);
+            quantize_info->number_colors=StringToUnsignedLong(argv[i+1]);
             if (quantize_info->number_colors == 0)
               break;
             if (((*image)->storage_class == DirectClass) ||
@@ -1309,7 +1309,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
                 (void) SetImageDepth(*image,MAGICKCORE_QUANTUM_DEPTH);
                 break;
               }
-            (void) SetImageDepth(*image,(unsigned long) StringToLong(argv[i+1]));
+            (void) SetImageDepth(*image,StringToUnsignedLong(argv[i+1]));
             break;
           }
         if (LocaleCompare("deskew",option+1) == 0)
@@ -2359,7 +2359,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               Posterize image.
             */
             (void) SyncImageSettings(image_info,*image);
-            (void) PosterizeImage(*image,(unsigned long) StringToLong(argv[i+1]),
+            (void) PosterizeImage(*image,StringToUnsignedLong(argv[i+1]),
               quantize_info->dither);
             InheritException(exception,&(*image)->exception);
             break;
@@ -3319,7 +3319,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("treedepth",option+1) == 0)
           {
-            quantize_info->tree_depth=(unsigned long) StringToLong(argv[i+1]);
+            quantize_info->tree_depth=StringToUnsignedLong(argv[i+1]);
             break;
           }
         if (LocaleCompare("trim",option+1) == 0)
@@ -3479,7 +3479,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("weight",option+1) == 0)
           {
-            draw_info->weight=(unsigned long) StringToLong(argv[i+1]);
+            draw_info->weight=StringToUnsignedLong(argv[i+1]);
             if (LocaleCompare(argv[i+1],"all") == 0)
               draw_info->weight=0;
             if (LocaleCompare(argv[i+1],"bold") == 0)
@@ -6389,7 +6389,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
           }
         if (LocaleCompare("colors",option+1) == 0)
           {
-            image_info->colors=(unsigned long) StringToLong(argv[i+1]);
+            image_info->colors=StringToUnsignedLong(argv[i+1]);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
@@ -6516,7 +6516,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
                 image_info->depth=MAGICKCORE_QUANTUM_DEPTH;
                 break;
               }
-            image_info->depth=(unsigned long) StringToLong(argv[i+1]);
+            image_info->depth=StringToUnsignedLong(argv[i+1]);
             break;
           }
         if (LocaleCompare("display",option+1) == 0)
@@ -7035,7 +7035,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
                 (void) SetImageOption(image_info,option+1,"0");
                 break;
               }
-            image_info->quality=(unsigned long) StringToLong(argv[i+1]);
+            image_info->quality=StringToUnsignedLong(argv[i+1]);
             (void) SetImageOption(image_info,option+1,argv[i+1]);
             break;
           }
@@ -7102,7 +7102,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
                 (void) SetImageOption(image_info,option+1,"0");
                 break;
               }
-            image_info->scene=(unsigned long) StringToLong(argv[i+1]);
+            image_info->scene=StringToUnsignedLong(argv[i+1]);
             (void) SetImageOption(image_info,option+1,argv[i+1]);
             break;
           }
@@ -7117,7 +7117,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
                 SeedPseudoRandomGenerator(seed);
                 break;
               }
-            seed=(unsigned long) StringToLong(argv[i+1]);
+            seed=StringToUnsignedLong(argv[i+1]);
             SeedPseudoRandomGenerator(seed);
             break;
           }
@@ -7955,7 +7955,7 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
               *morph_image;
 
             (void) SyncImagesSettings(image_info,*images);
-            morph_image=MorphImages(*images,(unsigned long) StringToLong(argv[i+1]),
+            morph_image=MorphImages(*images,StringToUnsignedLong(argv[i+1]),
               exception);
             if (morph_image == (Image *) NULL)
               {
index fa2c4a72d68881c24b7593a18cf1332fa2a55306..e20a03c3e881d6bab7d5dc3287d61107ceecc311 100644 (file)
@@ -539,7 +539,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               ThrowMontageException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowMontageInvalidArgumentException(option,argv[i]);
-            montage_info->border_width=(unsigned long) StringToLong(argv[i]);
+            montage_info->border_width=StringToUnsignedLong(argv[i]);
             break;
           }
         if (LocaleCompare("bordercolor",option+1) == 0)
@@ -563,7 +563,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               ThrowMontageException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowMontageInvalidArgumentException(option,argv[i]);
-            montage_info->border_width=(unsigned long) StringToLong(argv[i]);
+            montage_info->border_width=StringToUnsignedLong(argv[i]);
             break;
           }
         ThrowMontageException(OptionError,"UnrecognizedOption",option)