blob: 261f6c23cb3e6bfe69f25d559a6b2a8ab6a35f68 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3% %
4% %
5% %
6% CCCC OOO N N V V EEEEE RRRR TTTTT %
7% C O O NN N V V E R R T %
8% C O O N N N V V EEE RRRR T %
9% C O O N NN V V E R R T %
10% CCCC OOO N N V EEEEE R R T %
11% %
12% %
13% Convert an image from one format to another. %
14% %
15% Software Design %
16% John Cristy %
17% April 1992 %
18% %
19% %
cristy7e41fe82010-12-04 23:12:08 +000020% Copyright 1999-2011 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% Convert converts an input file using one image format to an output file
37% with a differing image format. By default, the image format is determined
38% by its magic number. To specify a particular image format, precede the
39% filename with an image format name and a colon (i.e. ps:image) or specify
40% the image type as the filename suffix (i.e. image.ps). Specify file as -
41% for standard input or output. If file has the extension .Z, the file is
42% decoded with uncompress.
43%
44%
45*/
46
47/*
48 Include declarations.
49*/
cristy3980b0d2009-10-25 14:37:13 +000050#include "wand/studio.h"
cristy3ed852e2009-09-05 21:47:34 +000051#include "wand/MagickWand.h"
cristy3ed852e2009-09-05 21:47:34 +000052
53/*
54%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55% %
56% %
57% %
58% M a i n %
59% %
60% %
61% %
62%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63%
64%
65*/
66int main(int argc,char **argv)
67{
cristy3ed852e2009-09-05 21:47:34 +000068 ExceptionInfo
69 *exception;
70
71 ImageInfo
72 *image_info;
73
74 MagickBooleanType
cristy3ed852e2009-09-05 21:47:34 +000075 status;
76
cristy3ed852e2009-09-05 21:47:34 +000077 MagickCoreGenesis(*argv,MagickTrue);
78 exception=AcquireExceptionInfo();
cristy3980b0d2009-10-25 14:37:13 +000079 image_info=AcquireImageInfo();
cristy3980b0d2009-10-25 14:37:13 +000080 status=MagickCommandGenesis(image_info,ConvertImageCommand,argc,argv,
cristy4e1dff62009-10-25 20:36:03 +000081 (char **) NULL,exception);
cristy3980b0d2009-10-25 14:37:13 +000082 image_info=DestroyImageInfo(image_info);
cristy3ed852e2009-09-05 21:47:34 +000083 exception=DestroyExceptionInfo(exception);
84 MagickCoreTerminus();
cristy3980b0d2009-10-25 14:37:13 +000085 return(status);
cristy3ed852e2009-09-05 21:47:34 +000086}