2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % M M OOO GGGG RRRR IIIII FFFFF Y Y %
7 % MM MM O O G R R I F Y Y %
8 % M M M O O G GG RRRRR I FFF Y %
9 % M M O O G G R R I F Y %
10 % M M OOO GGG R R IIIII F Y %
13 % Transmogrify an Image or Sequence of Images. %
20 % Copyright 1999-2014 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 % Mogrify transforms an image or a sequence of images. These transforms
37 % include image scaling, image rotation, color reduction, and others. The
38 % transmogrified image overwrites the original image.
46 #include "MagickWand/studio.h"
47 #include "MagickWand/MagickWand.h"
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 static int MogrifyMain(int argc,char **argv)
74 MagickCoreGenesis(*argv,MagickTrue);
75 exception=AcquireExceptionInfo();
76 image_info=AcquireImageInfo();
77 status=MagickCommandGenesis(image_info,MogrifyImageCommand,argc,argv,
78 (char **) NULL,exception);
79 image_info=DestroyImageInfo(image_info);
80 exception=DestroyExceptionInfo(exception);
82 return(status != MagickFalse ? 0 : 1);
85 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__)
86 int main(int argc,char **argv)
88 return(MogrifyMain(argc,argv));
91 int wmain(int argc,wchar_t *argv[])
102 utf8=NTArgvToUTF8(argc,argv);
103 status=MogrifyMain(argc,utf8);
104 for (i=0; i < argc; i++)
105 utf8[i]=DestroyString(utf8[i]);
106 utf8=(char **) RelinquishMagickMemory(utf8);
107 return(status != MagickFalse ? 0 : 1);