2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 %
13 % Identify an Image Format and Characteristics. %
20 % Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % http://www.imagemagick.org/script/license.php %
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. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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.
45 #include "MagickWand/studio.h"
46 #include "MagickWand/MagickWand.h"
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 static int IdentifyMain(int argc,char **argv)
76 MagickCoreGenesis(*argv,MagickTrue);
77 exception=AcquireExceptionInfo();
78 image_info=AcquireImageInfo();
79 metadata=(char *) NULL;
80 status=MagickCommandGenesis(image_info,IdentifyImageCommand,argc,argv,
82 if (metadata != (char *) NULL)
83 metadata=DestroyString(metadata);
84 image_info=DestroyImageInfo(image_info);
85 exception=DestroyExceptionInfo(exception);
90 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__)
91 int main(int argc,char **argv)
93 return(IdentifyMain(argc,argv));
96 int wmain(int argc,wchar_t *argv[])
107 utf8=NTArgvToUTF8(argc,argv);
108 status=IdentifyMain(argc,utf8);
109 for (i=0; i < argc; i++)
110 utf8[i]=DestroyString(utf8[i]);
111 utf8=(char **) RelinquishMagickMemory(utf8);