blob: e5de36cd847b8f0fbad7eea094185176e1a48aeb [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3% %
4% %
5% %
6% IIIII DDDD EEEEE N N TTTTT IIIII FFFFF Y Y %
7% I D D E NN N T I F Y Y %
8% I D D EEE N N N T I FFF Y %
9% I D D E N NN T I F Y %
10% IIIII DDDD EEEEE N N T IIIII F Y %
11% %
12% %
13% Identify an Image Format and Characteristics. %
14% %
15% Software Design %
16% John Cristy %
17% September 1994 %
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% Identify describes the format and characteristics of one or more image
37% files. It will also report if an image is incomplete or corrupt.
38%
39%
40*/
41
42/*
43 Include declarations.
44*/
cristy3980b0d2009-10-25 14:37:13 +000045#include "wand/studio.h"
cristy3ed852e2009-09-05 21:47:34 +000046#include "wand/MagickWand.h"
cristy3ed852e2009-09-05 21:47:34 +000047
48/*
49%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50% %
51% %
52% %
53% M a i n %
54% %
55% %
56% %
57%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58%
59%
60*/
61int main(int argc,char **argv)
62{
63 char
cristy3980b0d2009-10-25 14:37:13 +000064 *metadata;
cristy3ed852e2009-09-05 21:47:34 +000065
66 ExceptionInfo
67 *exception;
68
69 ImageInfo
70 *image_info;
71
72 MagickBooleanType
cristy3ed852e2009-09-05 21:47:34 +000073 status;
74
cristy3ed852e2009-09-05 21:47:34 +000075 MagickCoreGenesis(*argv,MagickTrue);
76 exception=AcquireExceptionInfo();
cristy3980b0d2009-10-25 14:37:13 +000077 image_info=AcquireImageInfo();
78 metadata=(char *) NULL;
79 status=MagickCommandGenesis(image_info,IdentifyImageCommand,argc,argv,
80 &metadata,exception);
81 if (metadata != (char *) NULL)
82 metadata=DestroyString(metadata);
83 image_info=DestroyImageInfo(image_info);
cristy3ed852e2009-09-05 21:47:34 +000084 exception=DestroyExceptionInfo(exception);
85 MagickCoreTerminus();
cristy3980b0d2009-10-25 14:37:13 +000086 return(status);
cristy3ed852e2009-09-05 21:47:34 +000087}