13ed852eea50f9d4cd633efb8c2b054b8e33c253cristy/* 23ed852eea50f9d4cd633efb8c2b054b8e33c253cristy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 43ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 53ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 63ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% AAA N N IIIII M M AAA TTTTT EEEEE % 73ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% A A NN N I MM MM A A T E % 83ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% AAAAA N N N I M M M AAAAA T EEE % 93ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% A A N NN I M M A A T E % 103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% A A N N IIIII M M A A T EEEEE % 113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% Methods to Interactively Animate an Image Sequence % 143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% Software Design % 16de984cdc3631106b1cbbb8d3972b76a0fc27e8e8cristy% Cristy % 173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% July 1992 % 183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 207ce65e7125a4e1df1a274ce373c537a9df9c16cdCristy% Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization % 213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% dedicated to making software imaging solutions freely available. % 223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% You may not use this file except in compliance with the License. You may % 243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% obtain a copy of the License at % 253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% http://www.imagemagick.org/script/license.php % 273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% Unless required by applicable law or agreed to in writing, software % 293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% distributed under the License is distributed on an "AS IS" BASIS, % 303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % 313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% See the License for the specific language governing permissions and % 323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% limitations under the License. % 333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% Use the animate program to animate an image sequence on any X server. 373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy*/ 393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy/* 413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Include declarations. 423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy*/ 434c08aed51c5899665ade97263692328eea4af106cristy#include "MagickWand/studio.h" 444c08aed51c5899665ade97263692328eea4af106cristy#include "MagickWand/MagickWand.h" 454c08aed51c5899665ade97263692328eea4af106cristy#include "MagickWand/mogrify-private.h" 464c08aed51c5899665ade97263692328eea4af106cristy#include "MagickCore/animate-private.h" 474c08aed51c5899665ade97263692328eea4af106cristy#include "MagickCore/string-private.h" 483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy/* 503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy+ A n i m a t e I m a g e C o m m a n d % 553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% % 583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% AnimateImageCommand() displays a sequence of images on any workstation 613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% display running an X server. Animate first determines the hardware 623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% capabilities of the workstation. If the number of unique colors in an image 633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% is less than or equal to the number the workstation can support, the image 643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% is displayed in an X window. Otherwise the number of colors in the image is 653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% first reduced to match the color resolution of the workstation before it is 663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% displayed. 673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% This means that a continuous-tone 24 bits/pixel image can display on a 8 693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% bit pseudo-color device or monochrome device. In most instances the reduced 703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% color image closely resembles the original. Alternatively, a monochrome or 713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% pseudo-color image sequence can display on a continuous-tone 24 bits/pixels 723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% device. 733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% The format of the AnimateImageCommand method is: 753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% MagickBooleanType AnimateImageCommand(ImageInfo *image_info,int argc, 773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% char **argv,char **metadata,ExceptionInfo *exception) 783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% A description of each parameter follows: 803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% o image_info: the image info. 823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% o argc: the number of elements in the argument vector. 843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% o argv: A text array containing the command line arguments. 863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% o metadata: any metadata is returned here. 883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% o exception: return any errors or warnings in this structure. 903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy% 913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy*/ 923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 933ed852eea50f9d4cd633efb8c2b054b8e33c253cristystatic MagickBooleanType AnimateUsage(void) 943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const char 963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy **p; 973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy static const char 993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *buttons[]= 1003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "Press any button to map or unmap the Command widget", 1023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (char *) NULL 1033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }, 1043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *miscellaneous[]= 1053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-debug events display copious debugging information", 1073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-help print program options", 1083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-list type print a list of supported option arguments", 1093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-log format format of debugging information", 1103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-version print version information", 1113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (char *) NULL 1123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }, 1133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *operators[]= 1143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11517ada024a8d39285affcac96ff344f3142c41aadcristy "-channel mask set the image channel mask", 1163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-colors value preferred number of colors in the image", 1173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-crop geometry preferred size and location of the cropped image", 1183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-extract geometry extract area from image", 1193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-monochrome transform image to black and white", 1203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-repage geometry size and location of an image canvas (operator)", 1213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-resample geometry change the resolution of an image", 1223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-resize geometry resize the image", 1233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-rotate degrees apply Paeth rotation to the image", 1243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-strip strip image of all profiles and comments", 125e4cbe744d58ba0b08df933d7259a62250278f4accristy "-thumbnail geometry create a thumbnail of the image", 1263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-trim trim image edges", 1273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (char *) NULL 1283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }, 1293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *settings[]= 1303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-alpha option on, activate, off, deactivate, set, opaque, copy", 1323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " transparent, extract, background, or shape", 1333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-authenticate password", 1343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " decipher image with this password", 1353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-backdrop display image centered on a backdrop", 1363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-colormap type Shared or Private", 1373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-colorspace type alternate image colorspace", 1383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-decipher filename convert cipher pixels to plain pixels", 1393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-define format:option", 1403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " define one or more image format options", 1413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-delay value display the next image after pausing", 1423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-density geometry horizontal and vertical density of the image", 1433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-depth value image depth", 1443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-display server display image to this X server", 1453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-dispose method layer disposal method", 1463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-dither method apply error diffusion to image", 1473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-filter type use this filter when resizing an image", 1483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-format \"string\" output formatted image characteristics", 1493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-gamma value level of gamma correction", 1503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-geometry geometry preferred size and location of the Image window", 1513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-gravity type horizontal and vertical backdrop placement", 1523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-identify identify the format and characteristics of the image", 1533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-immutable displayed image cannot be modified", 1543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-interlace type type of image interlacing scheme", 1553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-interpolate method pixel color interpolation method", 1563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-limit type value pixel cache resource limit", 1573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-loop iterations loop images then exit", 158e9252c26b8f1dcf9d41023fb5918c2ce5e1f01c0cristy "-matte store matte channel if the image has one", 1593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-map type display image using this Standard Colormap", 1603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-monitor monitor progress", 1613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-pause seconds to pause before reanimating", 1623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-page geometry size and location of an image canvas (setting)", 1633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-quantize colorspace reduce colors in this colorspace", 1643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-quiet suppress all warning messages", 1653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-regard-warnings pay attention to warning messages", 1663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-remote command execute a command in an remote display process", 1673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-respect-parentheses settings remain in effect until parenthesis boundary", 1683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-sampling-factor geometry", 1693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " horizontal and vertical sampling factor", 170e9252c26b8f1dcf9d41023fb5918c2ce5e1f01c0cristy "-scenes range image scene range", 1713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-seed value seed a new sequence of pseudo-random numbers", 1723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-set attribute value set an image attribute", 1733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-size geometry width and height of image", 174e9252c26b8f1dcf9d41023fb5918c2ce5e1f01c0cristy "-support factor resize support: > 1.0 is blurry, < 1.0 is sharp", 1753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-transparent-color color", 1763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " transparent color", 1773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-treedepth value color tree depth", 1783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-verbose print detailed information about the image", 1793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-visual type display image using this visual type", 1803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-virtual-pixel method", 1813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy " virtual pixel access method", 1823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-window id display image to background of this window", 1833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (char *) NULL 1843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }, 1853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *sequence_operators[]= 1863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-coalesce merge a sequence of images", 1883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "-flatten flatten a sequence of images", 1893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (char *) NULL 1903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }; 1913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1924f7a61361f38ef4d3eaae0c74b9964a57aee813acristy ListMagickVersion(stdout); 1933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("Usage: %s [options ...] file [ [options ...] file ...]\n", 1943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy GetClientName()); 1953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("\nImage Settings:\n"); 1963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for (p=settings; *p != (char *) NULL; p++) 1973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf(" %s\n",*p); 1983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("\nImage Operators:\n"); 1993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for (p=operators; *p != (char *) NULL; p++) 2003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf(" %s\n",*p); 2013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("\nImage Sequence Operators:\n"); 2023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for (p=sequence_operators; *p != (char *) NULL; p++) 2033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf(" %s\n",*p); 2043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("\nMiscellaneous Options:\n"); 2053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for (p=miscellaneous; *p != (char *) NULL; p++) 2063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf(" %s\n",*p); 2073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 2083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "\nIn addition to those listed above, you can specify these standard X\n"); 2093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 2103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "resources as command line options: -background, -bordercolor,\n"); 2113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 212b797b2c96f796f4920c9ee807dc5f47e6f160418dirk "-alpha-color, -borderwidth, -font, -foreground, -iconGeometry,\n"); 213b797b2c96f796f4920c9ee807dc5f47e6f160418dirk (void) printf("-iconic, -name, -shared-memory, or -title.\n"); 2143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 215e5b39652d8d21bc3940d83b8d6088d4070a8a34aanthony "\nBy default, the image format of 'file' is determined by its magic\n"); 2163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 2173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "number. To specify a particular image format, precede the filename\n"); 2183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 2193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "with an image format name and a colon (i.e. ps:image) or specify the\n"); 2203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf( 2213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "image type as the filename suffix (i.e. image.ps). Specify 'file' as\n"); 2223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("'-' for standard input or output.\n"); 2233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf("\nButtons: \n"); 2243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy for (p=buttons; *p != (char *) NULL; p++) 2253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) printf(" %s\n",*p); 2263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(MagickFalse); 2273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 2283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2293ed852eea50f9d4cd633efb8c2b054b8e33c253cristyWandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info, 2303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy int argc,char **argv,char **wand_unused(metadata),ExceptionInfo *exception) 2313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 2323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#if defined(MAGICKCORE_X11_DELEGATE) 2333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#define DestroyAnimate() \ 2343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ \ 2353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XDestroyResourceInfo(&resource_info); \ 2363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (display != (Display *) NULL) \ 2373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { \ 2383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XCloseDisplay(display); \ 2393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy display=(Display *) NULL; \ 2403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } \ 2413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XDestroyResourceInfo(&resource_info); \ 2423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy DestroyImageStack(); \ 243bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy for (i=0; i < (ssize_t) argc; i++) \ 2443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]=DestroyString(argv[i]); \ 2453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv=(char **) RelinquishMagickMemory(argv); \ 2463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 2473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#define ThrowAnimateException(asperity,tag,option) \ 2483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ \ 249efe601ce9ea5ad34ad0e8ad6e61d9be9b148b2a3cristy (void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \ 2503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option); \ 2513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy DestroyAnimate(); \ 2523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(MagickFalse); \ 2533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 2543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#define ThrowAnimateInvalidArgumentException(option,argument) \ 2553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ \ 2563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) ThrowMagickException(exception,GetMagickModule(),OptionError, \ 257e5b39652d8d21bc3940d83b8d6088d4070a8a34aanthony "InvalidArgument","'%s': %s",option,argument); \ 2583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy DestroyAnimate(); \ 2593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(MagickFalse); \ 2603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 2613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy char 2633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *resource_value, 2643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *server_name; 2653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const char 2673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *option; 2683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Display 2703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *display; 2713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image 2733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *image; 2743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageStack 2763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image_stack[MaxImageStackDepth+1]; 2773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickBooleanType 2793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy fire, 280ebbcfea9ab0a5066ff5f0b5257c9598ca77579d3cristy pend, 281ebbcfea9ab0a5066ff5f0b5257c9598ca77579d3cristy respect_parenthesis; 2823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickStatusType 2843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status; 2853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy QuantizeInfo 2873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *quantize_info; 2883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 289bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy register ssize_t 2903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i; 2913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2925ed838e7a9da2b53119d0f61f728af04a093d4edcristy ssize_t 2935ed838e7a9da2b53119d0f61f728af04a093d4edcristy j, 2945ed838e7a9da2b53119d0f61f728af04a093d4edcristy k; 2955ed838e7a9da2b53119d0f61f728af04a093d4edcristy 2963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XResourceInfo 2973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info; 2983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XrmDatabase 3003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_database; 3013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Set defaults. 3043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 3053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy assert(image_info != (ImageInfo *) NULL); 306e1c94d9d25db6b0dd7a5028ffee31d1057855d73cristy assert(image_info->signature == MagickCoreSignature); 3073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (image_info->debug != MagickFalse) 3083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); 3093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy assert(exception != (ExceptionInfo *) NULL); 3103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (argc == 2) 3113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 3123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option=argv[1]; 3133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if ((LocaleCompare("version",option+1) == 0) || 3143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (LocaleCompare("-version",option+1) == 0)) 3153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 3164f7a61361f38ef4d3eaae0c74b9964a57aee813acristy ListMagickVersion(stdout); 317df0b2915c254e43ac809a58d5bba39e57d16012eCristy return(MagickTrue); 3183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 3193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 3203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status=MagickTrue; 3213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy SetNotifyHandlers; 3223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy display=(Display *) NULL; 3233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy j=1; 3243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy k=0; 3253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy NewImageStack(); 3263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option=(char *) NULL; 3273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy pend=MagickFalse; 328ebbcfea9ab0a5066ff5f0b5257c9598ca77579d3cristy respect_parenthesis=MagickFalse; 3293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_database=(XrmDatabase) NULL; 3303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) ResetMagickMemory(&resource_info,0,sizeof(XResourceInfo)); 3313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy server_name=(char *) NULL; 3323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status=MagickTrue; 3333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Check for server name specified on the command line. 3353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 3363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ReadCommandlLine(argc,&argv); 3373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status=ExpandFilenames(&argc,&argv); 3383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (status == MagickFalse) 3393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(ResourceLimitError,"MemoryAllocationFailed", 3403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image_info->filename); 341bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy for (i=1; i < (ssize_t) argc; i++) 3423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 3433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Check command line for server name. 3453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 3463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option=argv[i]; 3473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("display",option+1) == 0) 3483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 3493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy User specified server name. 3513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 3523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 353bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 3543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 3553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy server_name=argv[i]; 3563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 3573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if ((LocaleCompare("help",option+1) == 0) || 3583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (LocaleCompare("-help",option+1) == 0)) 3593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(AnimateUsage()); 3603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 3613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Get user defaults from X resource database. 3633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 3643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy display=XOpenDisplay(server_name); 3653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (display == (Display *) NULL) 3663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(XServerError,"UnableToOpenXServer", 3673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XDisplayName(server_name)); 3683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) XSetErrorHandler(XError); 3693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_database=XGetResourceDatabase(display,GetClientName()); 3703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy XGetResourceInfo(image_info,resource_database,GetClientName(), 3713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy &resource_info); 3723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info=resource_info.quantize_info; 3733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image_info->density=XGetResourceInstance(resource_database,GetClientName(), 3743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "density",(char *) NULL); 3753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (image_info->density == (char *) NULL) 3763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image_info->density=XGetScreenDensity(display); 3773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_value=XGetResourceInstance(resource_database,GetClientName(), 3783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "interlace","none"); 3793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image_info->interlace=(InterlaceType) 380042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy ParseCommandOption(MagickInterlaceOptions,MagickFalse,resource_value); 3813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_value=XGetResourceInstance(resource_database,GetClientName(), 3823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "verbose","False"); 3832e4501b56bdc589397786ecc59f8c2d206547a36anthony image_info->verbose=IsStringTrue(resource_value); 3843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_value=XGetResourceInstance(resource_database,GetClientName(), 3853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "dither","True"); 386cbda611068350bf4459f2dda1951f8823702e129cristy quantize_info->dither_method=IsStringTrue(resource_value) != MagickFalse ? 387cbda611068350bf4459f2dda1951f8823702e129cristy RiemersmaDitherMethod : NoDitherMethod; 3883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 3893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Parse command line. 3903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 391bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy for (i=1; i <= (ssize_t) argc; i++) 3923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 393bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i < (ssize_t) argc) 3943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option=argv[i]; 3953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 3963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (image != (Image *) NULL) 3973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 3983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 3993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (isatty(STDIN_FILENO) != MagickFalse) 4003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option="logo:"; 4013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 402b3ed35eee125544e8d1b5bce9a8a848c36ba93b8cristy option="-"; 4033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare(option,"(") == 0) 4043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FireImageStack(MagickFalse,MagickTrue,pend); 4063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (k == MaxImageStackDepth) 4073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"ParenthesisNestedTooDeeply", 4083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option); 4093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy PushImageStack(); 4103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy continue; 4113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare(option,")") == 0) 4133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FireImageStack(MagickFalse,MagickTrue,MagickTrue); 4153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (k == 0) 4163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnableToParseExpression",option); 4173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy PopImageStack(); 4183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy continue; 4193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 420042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy if (IsCommandOption(option) == MagickFalse) 4213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const char 4233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *filename; 4243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image 4263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *images; 4273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 4293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Read input image. 4303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 4313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FireImageStack(MagickFalse,MagickFalse,pend); 4323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy filename=option; 433cee9711bbc334b5677d5ec4ea1cc70340d35ee35cristy if ((LocaleCompare(filename,"--") == 0) && (i < (ssize_t) (argc-1))) 4343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy option=argv[++i]; 4363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy filename=option; 4373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (image_info->ping != MagickFalse) 4391b58f25a8c2616ecdf2898ab358e1ee63d1b522ecristy images=PingImages(image_info,filename,exception); 4403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 4411b58f25a8c2616ecdf2898ab358e1ee63d1b522ecristy images=ReadImages(image_info,filename,exception); 4423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status&=(images != (Image *) NULL) && 4433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (exception->severity < ErrorException); 4443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (images == (Image *) NULL) 4453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy continue; 4463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy AppendImageStack(images); 4473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy continue; 4483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy pend=image != (Image *) NULL ? MagickTrue : MagickFalse; 4503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy switch (*(option+1)) 4513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'a': 4533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("alpha",option+1) == 0) 4553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 456bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 4573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy type; 4583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 4603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 4613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 462bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 4633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 464288a3536ebe731f83c57b0856e64216b98e19362cristy type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,argv[i]); 4653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (type < 0) 466b15b06c9f7ba2bf0e0ebcd88d0175536a5392c93cristy ThrowAnimateException(OptionError,"UnrecognizedAlphaChannelOption", 4673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 4683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 4693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 470b797b2c96f796f4920c9ee807dc5f47e6f160418dirk if (LocaleCompare("alpha-color",option+1) == 0) 471b797b2c96f796f4920c9ee807dc5f47e6f160418dirk { 472b797b2c96f796f4920c9ee807dc5f47e6f160418dirk if (*option == '+') 473b797b2c96f796f4920c9ee807dc5f47e6f160418dirk break; 474b797b2c96f796f4920c9ee807dc5f47e6f160418dirk i++; 475b797b2c96f796f4920c9ee807dc5f47e6f160418dirk if (i == (ssize_t) argc) 476b797b2c96f796f4920c9ee807dc5f47e6f160418dirk ThrowAnimateException(OptionError,"MissingArgument",option); 477b797b2c96f796f4920c9ee807dc5f47e6f160418dirk resource_info.alpha_color=argv[i]; 478b797b2c96f796f4920c9ee807dc5f47e6f160418dirk break; 479b797b2c96f796f4920c9ee807dc5f47e6f160418dirk } 4803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("authenticate",option+1) == 0) 4813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 4833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 4843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 485bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 4863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 4873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 4883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 4903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'b': 4923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("backdrop",option+1) == 0) 4943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 4953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.backdrop=(*option == '-') ? MagickTrue : MagickFalse; 4963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 4973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 4983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("background",option+1) == 0) 4993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 503bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 5043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.background_color=argv[i]; 5063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("bordercolor",option+1) == 0) 5093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 513bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 5143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.border_color=argv[i]; 5163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("borderwidth",option+1) == 0) 5193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.border_width=0; 5213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 524bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if ((i == (ssize_t) argc) || (IsGeometry(argv[i]) == MagickFalse)) 5253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 526e27293e706ca05b6b121e9512a83b16f7ad887f2cristy resource_info.border_width=(unsigned int) 527e27293e706ca05b6b121e9512a83b16f7ad887f2cristy StringToUnsignedLong(argv[i]); 5283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 5313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'c': 5333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("cache",option+1) == 0) 5353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 539bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 5403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 5423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 5433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("channel",option+1) == 0) 5463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 547bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 5483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy channel; 5493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 553e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 5543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy channel=ParseChannelOption(argv[i]); 5563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (channel < 0) 5573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedChannelType", 5583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 5593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("clone",option+1) == 0) 5623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image 5643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *clone_images; 5653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy clone_images=image; 5673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (k != 0) 5683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy clone_images=image_stack[k-1].image; 5693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (clone_images == (Image *) NULL) 5708226e729aec80913941e8aa6b197e3efd03dfb43anthony ThrowAnimateException(ImageError,"UnableToCloneImage",option); 5713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FireImageStack(MagickFalse,MagickTrue,MagickTrue); 5723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy clone_images=CloneImages(clone_images,"-1",exception); 5743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 5753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 577e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 5783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsSceneGeometry(argv[i],MagickFalse) == MagickFalse) 5803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 5813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy clone_images=CloneImages(clone_images,argv[i],exception); 5823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (clone_images == (Image *) NULL) 5843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"NoSuchImage",option); 5853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy AppendImageStack(clone_images); 5863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 5883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("coalesce",option+1) == 0) 5893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("colormap",option+1) == 0) 5913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 5923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.colormap=PrivateColormap; 5933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 5943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 5953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 596bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 5973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 5983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.colormap=UndefinedColormap; 5993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("private",argv[i]) == 0) 6003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.colormap=PrivateColormap; 6013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("shared",argv[i]) == 0) 6023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.colormap=SharedColormap; 6033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (resource_info.colormap == UndefinedColormap) 6043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedColormapType", 6053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 6063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("colors",option+1) == 0) 6093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info->number_colors=0; 6113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 614bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 6153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 6163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 6173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 618e27293e706ca05b6b121e9512a83b16f7ad887f2cristy quantize_info->number_colors=StringToUnsignedLong(argv[i]); 6193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("colorspace",option+1) == 0) 6223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 623bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 6243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy colorspace; 6253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 629bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 6303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 631042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy colorspace=ParseCommandOption(MagickColorspaceOptions, 6323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickFalse,argv[i]); 6333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (colorspace < 0) 6343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedColorspace", 6353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 6363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6382287975e02162155f1500d91ccce6e0fde5de7c8cristy if (LocaleCompare("concurrent",option+1) == 0) 6392287975e02162155f1500d91ccce6e0fde5de7c8cristy break; 6403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("crop",option+1) == 0) 6413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 645bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 6463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 6473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 6483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 6493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 6523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'd': 6543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("debug",option+1) == 0) 6563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 657bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 6583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy event; 6593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 663bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 6643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 665042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy event=ParseCommandOption(MagickLogEventOptions,MagickFalse,argv[i]); 6663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (event < 0) 6673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedEventType", 6683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 6693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) SetLogEventMask(argv[i]); 6703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("decipher",option+1) == 0) 6733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 677e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 6783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 6793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("define",option+1) == 0) 6823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 684bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 6853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 6863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 6873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 6883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const char 6893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *define; 6903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy define=GetImageOption(image_info,argv[i]); 6923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (define == (const char *) NULL) 6933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"NoSuchOption",argv[i]); 6943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 6973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 6983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("delay",option+1) == 0) 6993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 703bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 7063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 7073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("density",option+1) == 0) 7103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 714bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 7173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 7183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("depth",option+1) == 0) 7213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 725bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 7283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 7293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("display",option+1) == 0) 7323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 736bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("dispose",option+1) == 0) 7413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 742bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 7433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy dispose; 7443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 748bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 750042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy dispose=ParseCommandOption(MagickDisposeOptions,MagickFalse,argv[i]); 7513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (dispose < 0) 7523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedDisposeMethod", 7533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 7543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("dither",option+1) == 0) 7573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 758bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 7593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy method; 7603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 761cbda611068350bf4459f2dda1951f8823702e129cristy quantize_info->dither_method=NoDitherMethod; 7623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 765bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 767042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy method=ParseCommandOption(MagickDitherOptions,MagickFalse,argv[i]); 7683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (method < 0) 7693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedDitherMethod", 7703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 7713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info->dither_method=(DitherMethod) method; 7723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7742287975e02162155f1500d91ccce6e0fde5de7c8cristy if (LocaleCompare("duration",option+1) == 0) 7752287975e02162155f1500d91ccce6e0fde5de7c8cristy { 7762287975e02162155f1500d91ccce6e0fde5de7c8cristy if (*option == '+') 7772287975e02162155f1500d91ccce6e0fde5de7c8cristy break; 7782287975e02162155f1500d91ccce6e0fde5de7c8cristy i++; 779e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 7802287975e02162155f1500d91ccce6e0fde5de7c8cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7812287975e02162155f1500d91ccce6e0fde5de7c8cristy if (IsGeometry(argv[i]) == MagickFalse) 7822287975e02162155f1500d91ccce6e0fde5de7c8cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 7832287975e02162155f1500d91ccce6e0fde5de7c8cristy break; 7842287975e02162155f1500d91ccce6e0fde5de7c8cristy } 7853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 7863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 7873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'e': 7883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("extract",option+1) == 0) 7903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 7913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 7923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 794bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 7953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 7963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 7973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 7983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 7993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 8013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'f': 8033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("filter",option+1) == 0) 8053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 806bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 8073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy filter; 8083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 812e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 8133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 814042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy filter=ParseCommandOption(MagickFilterOptions,MagickFalse,argv[i]); 8153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (filter < 0) 8163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedImageFilter", 8173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 8183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("flatten",option+1) == 0) 8213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("font",option+1) == 0) 8233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 827bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 8283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 8293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.font=XGetResourceClass(resource_database, 8303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy GetClientName(),"font",argv[i]); 8313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("foreground",option+1) == 0) 8343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 838bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 8393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 8403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.foreground_color=argv[i]; 8413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("format",option+1) == 0) 8443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 848e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 8493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 8503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 8533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'g': 8553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("gamma",option+1) == 0) 8573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 859bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 8603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 8613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 8623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 8633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("geometry",option+1) == 0) 8663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.image_geometry=(char *) NULL; 8683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 871bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 8723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 8733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 8743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 8753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.image_geometry=ConstantString(argv[i]); 8763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("gravity",option+1) == 0) 8793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 880bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 8813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy gravity; 8823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 8843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 886e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 8873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 888042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy gravity=ParseCommandOption(MagickGravityOptions,MagickFalse, 8893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 8903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (gravity < 0) 8913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedGravityType", 8923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 8933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 8943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 8963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 8973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'h': 8983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 8993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if ((LocaleCompare("help",option+1) == 0) || 9003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (LocaleCompare("-help",option+1) == 0)) 9013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 9033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'i': 9053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("iconGeometry",option+1) == 0) 9073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.icon_geometry=(char *) NULL; 9093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 9103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 912bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 9133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 9143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 9153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 9163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.icon_geometry=argv[i]; 9173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("iconic",option+1) == 0) 9203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.iconic=(*option == '-') ? MagickTrue : MagickFalse; 9223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("identify",option+1) == 0) 9253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("immutable",option+1) == 0) 9273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.immutable=(*option == '-') ? MagickTrue : MagickFalse; 9293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("interlace",option+1) == 0) 9323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 933bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 9343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy interlace; 9353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 9373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 939bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 9403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 941042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy interlace=ParseCommandOption(MagickInterlaceOptions,MagickFalse, 9423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (interlace < 0) 9443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedInterlaceType", 9453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("interpolate",option+1) == 0) 9493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 950bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 9513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy interpolate; 9523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 9543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 956bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 9573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 958042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy interpolate=ParseCommandOption(MagickInterpolateOptions,MagickFalse, 9593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (interpolate < 0) 9613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedInterpolateMethod", 9623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 9663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'l': 9683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("label",option+1) == 0) 9703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 9723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 974bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 9753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 9763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 9783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("limit",option+1) == 0) 9793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy char 9813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *p; 9823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double 9843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy value; 9853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 986bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 9873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource; 9883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 9903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 9913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 992bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 9933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 994042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy resource=ParseCommandOption(MagickResourceOptions,MagickFalse, 9953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (resource < 0) 9973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedResourceType", 9983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 9993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1000bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 10013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 1002dbdd0e35efc03c9bccda644f5407db38b7c17eeccristy value=StringToDouble(argv[i],&p); 1003da16f16767eb31921af855f17bda465fffc4e000cristy (void) value; 10043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0)) 10053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 10063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("list",option+1) == 0) 10093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1010bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 10113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy list; 10123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1016bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 10173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 1018042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy list=ParseCommandOption(MagickListOptions,MagickFalse,argv[i]); 10193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (list < 0) 10203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedListType",argv[i]); 1021aeb2cbc4eb61cc6a04744db1dc52f5319c466e29cristy status=MogrifyImageInfo(image_info,(int) (i-j+1),(const char **) 10223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv+j,exception); 10233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy DestroyAnimate(); 102432ce2391bb7051ac53c7c3c25d3ad8f41836824dcristy return(status == 0 ? MagickTrue : MagickFalse); 10253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("log",option+1) == 0) 10273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1031bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if ((i == (ssize_t) argc) || 10323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (strchr(argv[i],'%') == (char *) NULL)) 10333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 10343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("loop",option+1) == 0) 10373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1041e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 10423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 10433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 10443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 10453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 10483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'm': 10503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("map",option+1) == 0) 10523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.map_type=(char *) NULL; 10543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 1056151b66dffc9e3c2e8c4f8cdaca37ff987ca0f497cristy (void) CopyMagickString(argv[i]+1,"san",MagickPathExtent); 10573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1058bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 10593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 10603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.map_type=argv[i]; 10613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("matte",option+1) == 0) 10643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("monitor",option+1) == 0) 10663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("monochrome",option+1) == 0) 10683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info->number_colors=2; 10723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info->colorspace=GRAYColorspace; 10733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 10763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'n': 10783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("name",option+1) == 0) 10803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.name=(char *) NULL; 10823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 10833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1085bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 10863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 10873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.name=ConstantString(argv[i]); 10883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("noop",option+1) == 0) 10913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 10923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 10933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 10943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'p': 10953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("pause",option+1) == 0) 10973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.pause=0; 10993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1102bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 11053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 1106e27293e706ca05b6b121e9512a83b16f7ad887f2cristy resource_info.pause=(unsigned int) StringToUnsignedLong(argv[i]); 11073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("page",option+1) == 0) 11103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1114bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("profile",option+1) == 0) 11193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1121bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 11263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'q': 11283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("quantize",option+1) == 0) 11303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1131bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 11323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy colorspace; 11333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1137e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 11383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 1139042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy colorspace=ParseCommandOption(MagickColorspaceOptions, 11403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickFalse,argv[i]); 11413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (colorspace < 0) 11423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedColorspace", 11433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 11443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("quiet",option+1) == 0) 11473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 11493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'r': 11513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("regard-warnings",option+1) == 0) 11533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("remote",option+1) == 0) 11553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1157bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (XRemoteCommand(display,resource_info.window_id,argv[i]) != 0) 11603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(MagickFalse); 11613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i--; 11623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("repage",option+1) == 0) 11653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1169bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 11723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 11733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("resample",option+1) == 0) 11763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1180e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 11813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 11833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 11843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("resize",option+1) == 0) 11873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 11893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1191bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 11923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 11933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 11943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 11953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 11963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 11973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleNCompare("respect-parentheses",option+1,17) == 0) 11983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 11993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy respect_parenthesis=(*option == '-') ? MagickTrue : MagickFalse; 12003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("rotate",option+1) == 0) 12033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1205bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 12083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 12093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 12123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 's': 12143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("sampling-factor",option+1) == 0) 12163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1220bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 12233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 12243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("seed",option+1) == 0) 12273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1231e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 12323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 12343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 12353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("scenes",option+1) == 0) /* deprecated */ 12383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1242bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsSceneGeometry(argv[i],MagickFalse) == MagickFalse) 12453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 12463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("set",option+1) == 0) 12493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1251bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1256bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("shared-memory",option+1) == 0) 12613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.use_shared_memory=(*option == '-') ? MagickTrue : 12633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickFalse; 12643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("size",option+1) == 0) 12673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1271bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 12743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 12753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("strip",option+1) == 0) 12783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("support",option+1) == 0) 12803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; /* deprecated */ 12823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 12853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 12863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 't': 12873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("text-font",option+1) == 0) 12893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 12903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.text_font=(char *) NULL; 12913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 12923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1294bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 12953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 12963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.text_font=XGetResourceClass(resource_database, 12973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy GetClientName(),"font",argv[i]); 12983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 12993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("thumbnail",option+1) == 0) 13013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1305bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 13083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 13093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("title",option+1) == 0) 13123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.title=(char *) NULL; 13143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1317bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.title=argv[i]; 13203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("transparent-color",option+1) == 0) 13233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1327e81f552f8ca2fc16632bd9830db3f93af07d514ccristy if (i == (ssize_t) argc) 13283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("treedepth",option+1) == 0) 13323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy quantize_info->tree_depth=0; 13343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1337bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (IsGeometry(argv[i]) == MagickFalse) 13403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateInvalidArgumentException(option,argv[i]); 1341e27293e706ca05b6b121e9512a83b16f7ad887f2cristy quantize_info->tree_depth=StringToUnsignedLong(argv[i]); 13423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("trim",option+1) == 0) 13453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 13473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'v': 13493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("verbose",option+1) == 0) 13513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if ((LocaleCompare("version",option+1) == 0) || 13533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (LocaleCompare("-version",option+1) == 0)) 13543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13554f7a61361f38ef4d3eaae0c74b9964a57aee813acristy ListMagickVersion(stdout); 13563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("virtual-pixel",option+1) == 0) 13593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1360bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy ssize_t 13613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy method; 13623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1366bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 1368042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy method=ParseCommandOption(MagickVirtualPixelOptions,MagickFalse, 13693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy argv[i]); 13703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (method < 0) 13713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError, 13723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy "UnrecognizedVirtualPixelMethod",argv[i]); 13733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("visual",option+1) == 0) 13763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.visual_type=(char *) NULL; 13783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1381bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.visual_type=argv[i]; 13843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 13873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 13883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case 'w': 13893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (LocaleCompare("window",option+1) == 0) 13913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 13923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.window_id=(char *) NULL; 13933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (*option == '+') 13943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 13953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy i++; 1396bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy if (i == (ssize_t) argc) 13973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingArgument",option); 13983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy resource_info.window_id=argv[i]; 13993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 14003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 14013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 14023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 14033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy case '?': 14043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy break; 14053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy default: 14063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnrecognizedOption",option); 14073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 1408042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy fire=(GetCommandOptionFlags(MagickCommandOptions,MagickFalse,option) & 1409042ee78fa9004bf1ac6a95f09d9d1faca631dda1cristy FireOptionFlag) == 0 ? MagickFalse : MagickTrue; 14103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (fire != MagickFalse) 14113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FireImageStack(MagickFalse,MagickTrue,MagickTrue); 14123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 1413259a33e6566fef81a8dfb17265df64db6fdd5b1acristy i--; 14143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (k != 0) 14153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"UnbalancedParenthesis",argv[i]); 14163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (image == (Image *) NULL) 14173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ThrowAnimateException(OptionError,"MissingAnImageFilename",argv[argc-1]) 14183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FinalizeImageSettings(image_info,image,MagickTrue); 141994f2007ae3b0c364b710bc5396ede341db4a4b97cristy if (image == (Image *) NULL) 142094f2007ae3b0c364b710bc5396ede341db4a4b97cristy ThrowAnimateException(OptionError,"MissingAnImageFilename",argv[argc-1]) 14213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (resource_info.window_id != (char *) NULL) 14223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 1423051718b74ad68f8584cdac01d0192974ec777f1bcristy XAnimateBackgroundImage(display,&resource_info,image,exception); 14243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy status&=MagickTrue; 14253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 14263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy else 14273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 14283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image 14293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy *animate_image; 14303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 14313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* 14323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Animate image to X server. 14333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy */ 1434051718b74ad68f8584cdac01d0192974ec777f1bcristy animate_image=XAnimateImages(display,&resource_info,argv,argc,image, 1435051718b74ad68f8584cdac01d0192974ec777f1bcristy exception); 14363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy while (animate_image != (Image *) NULL) 14373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 14383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image=animate_image; 1439051718b74ad68f8584cdac01d0192974ec777f1bcristy animate_image=XAnimateImages(display,&resource_info,argv,argc,image, 1440051718b74ad68f8584cdac01d0192974ec777f1bcristy exception); 14413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy if (animate_image != image) 14423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy image=DestroyImageList(image); 14433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 14443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } 14453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy DestroyAnimate(); 14463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(status != 0 ? MagickTrue : MagickFalse); 14473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#else 14483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) argc; 14493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) argv; 14503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy (void) ThrowMagickException(exception,GetMagickModule(),MissingDelegateError, 1451e5b39652d8d21bc3940d83b8d6088d4070a8a34aanthony "DelegateLibrarySupportNotBuiltIn","'%s' (X11)",image_info->filename); 14523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return(AnimateUsage()); 14533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif 14543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 1455