2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % CCCC OOO N N V V EEEEE RRRR TTTTT %
7 % C O O NN N V V E R R T %
8 % C O O N N N V V EEE RRRR T %
9 % C O O N NN V V E R R T %
10 % CCCC OOO N N V EEEEE R R T %
13 % Convert an image from one format to another. %
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 % Convert converts an input file using one image format to an output file
37 % with a differing image format. By default, the image format is determined
38 % by its magic number. To specify a particular image format, precede the
39 % filename with an image format name and a colon (i.e. ps:image) or specify
40 % the image type as the filename suffix (i.e. image.ps). Specify file as -
41 % for standard input or output. If file has the extension .Z, the file is
42 % decoded with uncompress.
50 #include "MagickWand/studio.h"
51 #include "MagickWand/MagickWand.h"
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67 static int ConvertMain(int argc,char **argv)
78 MagickCoreGenesis(*argv,MagickTrue);
79 exception=AcquireExceptionInfo();
80 image_info=AcquireImageInfo();
81 status=MagickCommandGenesis(image_info,ConvertImageCommand,argc,argv,
82 (char **) NULL,exception);
83 image_info=DestroyImageInfo(image_info);
84 exception=DestroyExceptionInfo(exception);
89 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__)
90 int main(int argc,char **argv)
92 return(ConvertMain(argc,argv));
95 int wmain(int argc,wchar_t *argv[])
106 utf8=NTArgvToUTF8(argc,argv);
107 status=ConvertMain(argc,utf8);
108 for (i=0; i < argc; i++)
109 utf8[i]=DestroyString(utf8[i]);
110 utf8=(char **) RelinquishMagickMemory(utf8);