blob: a5082b3cebe0b458e2a51b88d348a366a546a42a [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3% %
4% %
5% %
6% AAA N N IIIII M M AAA TTTTT EEEEE %
7% A A NN N I MM MM A A T E %
8% AAAAA N N N I M M M AAAAA T EEE %
9% A A N NN I M M A A T E %
10% A A N N IIIII M M A A T EEEEE %
11% %
12% %
13% Interactively Animate an Image Sequence. %
14% %
15% Software Design %
16% John Cristy %
17% July 1992 %
18% %
19% %
cristy16af1cb2009-12-11 21:38:29 +000020% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
cristy3ed852e2009-09-05 21:47:34 +000021% dedicated to making software imaging solutions freely available. %
22% %
23% You may not use this file except in compliance with the License. You may %
24% obtain a copy of the License at %
25% %
26% http://www.imagemagick.org/script/license.php %
27% %
28% Unless required by applicable law or agreed to in writing, software %
29% distributed under the License is distributed on an "AS IS" BASIS, %
30% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31% See the License for the specific language governing permissions and %
32% limitations under the License. %
33% %
34%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35%
36% Animate displays a sequence of images in the MIFF format on any
37% workstation display running an X server. Animate first determines the
38% hardware capabilities of the workstation. If the number of unique
39% colors in an image is less than or equal to the number the workstation
40% can support, the image is displayed in an X window. Otherwise the
41% number of colors in the image is first reduced to match the color
42% resolution of the workstation before it is displayed.
43%
44% This means that a continuous-tone 24 bits-per-pixel image can display on a
45% 8 bit pseudo-color device or monochrome device. In most instances the
46% reduced color image closely resembles the original. Alternatively, a
47% monochrome or pseudo-color image can display on a continuous-tone 24
48% bits-per-pixel device.
49%
50%
51*/
52
cristy3980b0d2009-10-25 14:37:13 +000053#include "wand/studio.h"
cristy3ed852e2009-09-05 21:47:34 +000054#include "wand/MagickWand.h"
cristy3ed852e2009-09-05 21:47:34 +000055
56/*
57%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58% %
59% %
60% %
cristy3980b0d2009-10-25 14:37:13 +000061% M a i n %
cristy3ed852e2009-09-05 21:47:34 +000062% %
63% %
64% %
65%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66%
67%
68*/
69
cristy0157aea2010-04-24 21:12:18 +000070#if defined(MAGICKCORE_WINDOWS_SUPPORT)
cristy3ed852e2009-09-05 21:47:34 +000071int WINAPI WinMain(HINSTANCE instance,HINSTANCE last,LPSTR command,int state)
72{
73 char
74 **argv;
75
76 int
77 argc,
78 main(int,char **);
79
cristy7dd85bb2010-04-25 01:23:53 +000080 (void) instance;
81 (void) last;
82 (void) state;
cristy3ed852e2009-09-05 21:47:34 +000083 argv=StringToArgv(command,&argc);
84 return(main(argc,argv));
85}
86#endif
87
88int main(int argc,char **argv)
89{
cristy3ed852e2009-09-05 21:47:34 +000090 ExceptionInfo
91 *exception;
92
93 ImageInfo
94 *image_info;
95
96 MagickBooleanType
cristy3ed852e2009-09-05 21:47:34 +000097 status;
98
cristy3ed852e2009-09-05 21:47:34 +000099 MagickCoreGenesis(*argv,MagickTrue);
100 exception=AcquireExceptionInfo();
cristy3980b0d2009-10-25 14:37:13 +0000101 image_info=AcquireImageInfo();
cristy3980b0d2009-10-25 14:37:13 +0000102 status=MagickCommandGenesis(image_info,AnimateImageCommand,argc,argv,
cristy4e1dff62009-10-25 20:36:03 +0000103 (char **) NULL,exception);
cristy3980b0d2009-10-25 14:37:13 +0000104 image_info=DestroyImageInfo(image_info);
cristy3ed852e2009-09-05 21:47:34 +0000105 exception=DestroyExceptionInfo(exception);
106 MagickCoreTerminus();
cristy3980b0d2009-10-25 14:37:13 +0000107 return(status);
cristy3ed852e2009-09-05 21:47:34 +0000108}