]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/animate.c
(no commit message)
[imagemagick] / MagickWand / animate.c
index b84281f051dd6135c419d21b4655c775e9aa9e02..8e455131596c75618ac58cb7a5b73758ef7c3b70 100644 (file)
@@ -17,7 +17,7 @@
 %                                July 1992                                    %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2013 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.  You may  %
@@ -157,6 +157,7 @@ static MagickBooleanType AnimateUsage(void)
       "-interpolate method  pixel color interpolation method",
       "-limit type value    pixel cache resource limit",
       "-loop iterations     loop images then exit",
+      "-matte               store matte channel if the image has one",
       "-map type            display image using this Standard Colormap",
       "-monitor             monitor progress",
       "-pause               seconds to pause before reanimating",
@@ -168,9 +169,11 @@ static MagickBooleanType AnimateUsage(void)
       "-respect-parentheses settings remain in effect until parenthesis boundary",
       "-sampling-factor geometry",
       "                     horizontal and vertical sampling factor",
+      "-scenes range        image scene range",
       "-seed value          seed a new sequence of pseudo-random numbers",
       "-set attribute value set an image attribute",
       "-size geometry       width and height of image",
+      "-support factor      resize support: > 1.0 is blurry, < 1.0 is sharp",
       "-transparent-color color",
       "                     transparent color",
       "-treedepth value     color tree depth",
@@ -188,9 +191,7 @@ static MagickBooleanType AnimateUsage(void)
       (char *) NULL
     };
 
-  (void) printf("Version: %s\n",GetMagickVersion((size_t *) NULL));
-  (void) printf("Copyright: %s\n",GetMagickCopyright());
-  (void) printf("Features: %s\n\n",GetMagickFeatures());
+  ListMagickVersion(stdout);
   (void) printf("Usage: %s [options ...] file [ [options ...] file ...]\n",
     GetClientName());
   (void) printf("\nImage Settings:\n");
@@ -213,7 +214,7 @@ static MagickBooleanType AnimateUsage(void)
     "-borderwidth, -font, -foreground, -iconGeometry, -iconic, -name,\n");
   (void) printf("-mattecolor, -shared-memory, or -title.\n");
   (void) printf(
-    "\nBy default, the image format of `file' is determined by its magic\n");
+    "\nBy default, the image format of 'file' is determined by its magic\n");
   (void) printf(
     "number.  To specify a particular image format, precede the filename\n");
   (void) printf(
@@ -255,7 +256,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
 #define ThrowAnimateInvalidArgumentException(option,argument) \
 { \
   (void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
-    "InvalidArgument","`%s': %s",option,argument); \
+    "InvalidArgument","'%s': %s",option,argument); \
   DestroyAnimate(); \
   return(MagickFalse); \
 }
@@ -314,12 +315,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) FormatLocaleFile(stdout,"Version: %s\n",
-            GetMagickVersion((size_t *) NULL));
-          (void) FormatLocaleFile(stdout,"Copyright: %s\n",
-            GetMagickCopyright());
-          (void) FormatLocaleFile(stdout,"Features: %s\n\n",
-            GetMagickFeatures());
+          ListMagickVersion(stdout);
           return(MagickFalse);
         }
     }
@@ -386,10 +382,11 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
     ParseCommandOption(MagickInterlaceOptions,MagickFalse,resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "verbose","False");
-  image_info->verbose=IsMagickTrue(resource_value);
+  image_info->verbose=IsStringTrue(resource_value);
   resource_value=XGetResourceInstance(resource_database,GetClientName(),
     "dither","True");
-  quantize_info->dither=IsMagickTrue(resource_value);
+  quantize_info->dither_method=IsStringTrue(resource_value) != MagickFalse ?
+    RiemersmaDitherMethod : NoDitherMethod;
   /*
     Parse command line.
   */
@@ -478,9 +475,9 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowAnimateException(OptionError,"MissingArgument",option);
-            type=ParseCommandOption(MagickAlphaOptions,MagickFalse,argv[i]);
+            type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,argv[i]);
             if (type < 0)
-              ThrowAnimateException(OptionError,"UnrecognizedAlphaChannelType",
+              ThrowAnimateException(OptionError,"UnrecognizedAlphaChannelOption",
                 argv[i]);
             break;
           }
@@ -574,7 +571,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             if (k != 0)
               clone_images=image_stack[k-1].image;
             if (clone_images == (Image *) NULL)
-              ThrowAnimateException(ImageError,"ImageSequenceRequired",option);
+              ThrowAnimateException(ImageError,"UnableToCloneImage",option);
             FireImageStack(MagickFalse,MagickTrue,MagickTrue);
             if (*option == '+')
               clone_images=CloneImages(clone_images,"-1",exception);
@@ -765,7 +762,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             ssize_t
               method;
 
-            quantize_info->dither=MagickFalse;
+            quantize_info->dither_method=NoDitherMethod;
             if (*option == '+')
               break;
             i++;
@@ -775,7 +772,6 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             if (method < 0)
               ThrowAnimateException(OptionError,"UnrecognizedDitherMethod",
                 argv[i]);
-            quantize_info->dither=MagickTrue;
             quantize_info->dither_method=(DitherMethod) method;
             break;
           }
@@ -1370,12 +1366,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) FormatLocaleFile(stdout,"Version: %s\n",
-              GetMagickVersion((size_t *) NULL));
-            (void) FormatLocaleFile(stdout,"Copyright: %s\n",
-              GetMagickCopyright());
-            (void) FormatLocaleFile(stdout,"Features: %s\n\n",
-              GetMagickFeatures());
+            ListMagickVersion(stdout);
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
@@ -1472,7 +1463,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
   (void) argc;
   (void) argv;
   (void) ThrowMagickException(exception,GetMagickModule(),MissingDelegateError,
-    "DelegateLibrarySupportNotBuiltIn","`%s' (X11)",image_info->filename);
+    "DelegateLibrarySupportNotBuiltIn","'%s' (X11)",image_info->filename);
   return(AnimateUsage());
 #endif
 }