2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % CCCC OOO N N JJJJJ U U RRRR EEEEE %
7 % C O O NN N J U U R R E %
8 % C O O N N N J U U RRRR EEE %
9 % C O O N NN J J U U R R E %
10 % CCCC OOO N N JJJ UUU R R EEEEE %
13 % Interpret Magick Scripting Language. %
20 % Copyright 1999-2012 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 % Conjure interprets and executes scripts in the Magick Scripting Language
37 % (MSL). The Magick scripting language (MSL) will primarily benefit those
38 % that want to accomplish custom image processing tasks but do not wish
39 % to program, or those that do not have access to a Perl interpreter or a
40 % compiler. The interpreter is called conjure and here is an example script:
42 % <?xml version="1.0" encoding="UTF-8"?>
43 % <image size="400x400" >
44 % <read filename="image.gif" />
45 % <get width="base-width" height="base-height" />
46 % <resize geometry="%[dimensions]" />
47 % <get width="width" height="height" />
48 % <print output="Image sized from %[base-width]x%[base-height]
49 % to %[width]x%[height].\n" />
50 % <write filename="image.png" />
63 #include "MagickWand/studio.h"
64 #include "MagickWand/MagickWand.h"
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80 static int ConjureMain(int argc,char **argv)
91 MagickCoreGenesis(*argv,MagickTrue);
92 exception=AcquireExceptionInfo();
93 image_info=AcquireImageInfo();
94 status=MagickCommandGenesis(image_info,ConjureImageCommand,argc,argv,
95 (char **) NULL,exception);
96 image_info=DestroyImageInfo(image_info);
97 exception=DestroyExceptionInfo(exception);
102 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__)
103 int main(int argc,char **argv)
105 return(ConjureMain(argc,argv));
108 int wmain(int argc,wchar_t *argv[])
119 utf8=NTArgvToUTF8(argc,argv);
120 status=ConjureMain(argc,utf8);
121 for (i=0; i < argc; i++)
122 utf8[i]=DestroyString(utf8[i]);
123 utf8=(char **) RelinquishMagickMemory(utf8);