2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % M M AAA GGGG IIIII CCCC K K %
7 % MM MM A A G I C K K %
8 % M M M AAAAA G GGG I C KKK %
9 % M M A A G G I C K K %
10 % M M A A GGGG IIIII CCCC K K %
12 % Perform "Magick" on Images via the Command Line Interface %
19 % Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
20 % dedicated to making software imaging solutions freely available. %
22 % You may not use this file except in compliance with the License. You may %
23 % obtain a copy of the License at %
25 % http://www.imagemagick.org/script/license.php %
27 % Unless required by applicable law or agreed to in writing, software %
28 % distributed under the License is distributed on an "AS IS" BASIS, %
29 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
30 % See the License for the specific language governing permissions and %
31 % limitations under the License. %
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 % Read CLI arguments, script files, and pipelines, to provide options that
36 % manipulate images from many different formats.
43 #include "MagickWand/studio.h"
44 #include "MagickWand/MagickWand.h"
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 static int MagickMain(int argc,char **argv)
71 MagickCoreGenesis(*argv,MagickTrue);
72 exception=AcquireExceptionInfo();
73 image_info=AcquireImageInfo();
74 status=MagickCommandGenesis(image_info,MagickImageCommand,argc,argv,
75 (char **) NULL,exception);
76 image_info=DestroyImageInfo(image_info);
77 exception=DestroyExceptionInfo(exception);
82 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__)
83 int main(int argc,char **argv)
85 return(MagickMain(argc,argv));
88 int wmain(int argc,wchar_t *argv[])
99 utf8=NTArgvToUTF8(argc,argv);
100 status=MagickMain(argc,utf8);
101 for (i=0; i < argc; i++)
102 utf8[i]=DestroyString(utf8[i]);
103 utf8=(char **) RelinquishMagickMemory(utf8);