]> granicus.if.org Git - imagemagick/blobdiff - wand/animate.c
(no commit message)
[imagemagick] / wand / animate.c
index eb60086c67c7f9cb60ec39d6cf01f4b72c6d264b..24b284d28d42f02ce23c1c6be14f2a09e9446a4b 100644 (file)
@@ -44,6 +44,7 @@
 #include "wand/MagickWand.h"
 #include "wand/mogrify-private.h"
 #include "magick/animate-private.h"
+#include "magick/string-private.h"
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -523,7 +524,7 @@ 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) atoi(argv[i]);
+            resource_info.border_width=(unsigned int) StringToLong(argv[i]);
             break;
           }
         ThrowAnimateException(OptionError,"UnrecognizedOption",option);
@@ -614,7 +615,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) atol(argv[i]);
+            quantize_info->number_colors=(unsigned long) StringToLong(argv[i]);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
@@ -1112,7 +1113,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) atoi(argv[i]);
+            resource_info.pause=(unsigned int) StringToLong(argv[i]);
             break;
           }
         if (LocaleCompare("page",option+1) == 0)
@@ -1347,7 +1348,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) atol(argv[i]);
+            quantize_info->tree_depth=(unsigned long) StringToLong(argv[i]);
             break;
           }
         if (LocaleCompare("trim",option+1) == 0)