cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % M M OOO N N TTTTT AAA GGGG EEEEE % |
| 7 | % MM MM O O NN N T A A G E % |
| 8 | % M M M O O N N N T AAAAA G GG EEE % |
| 9 | % M M O O N NN T A A G G E % |
| 10 | % M M OOO N N T A A GGGG EEEEE % |
| 11 | % % |
| 12 | % % |
| 13 | % Montage Magick Image File Format Image via X11. % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % July 1992 % |
| 18 | % % |
| 19 | % % |
cristy | 7e41fe8 | 2010-12-04 23:12:08 +0000 | [diff] [blame] | 20 | % Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 21 | % dedicated to making software imaging solutions freely available. % |
| 22 | % % |
| 23 | % You may not use this file except in compliance with the License. You may % |
| 24 | % obtain a copy of the License at % |
| 25 | % % |
| 26 | % http://www.imagemagick.org/script/license.php % |
| 27 | % % |
| 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. % |
| 33 | % % |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | % |
| 36 | % Montage creates a composite by combining several separate images. The |
| 37 | % images are tiled on the composite image with the name of the image |
| 38 | % optionally appearing just below the individual tile. |
| 39 | % |
| 40 | % |
| 41 | */ |
| 42 | |
| 43 | /* |
| 44 | Include declarations. |
| 45 | */ |
cristy | ee67810 | 2011-07-01 23:32:11 +0000 | [diff] [blame] | 46 | #include "MagickWand/studio.h" |
| 47 | #include "MagickWand/MagickWand.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 48 | |
| 49 | /* |
| 50 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 51 | % % |
| 52 | % % |
| 53 | % % |
| 54 | % M a i n % |
| 55 | % % |
| 56 | % % |
| 57 | % % |
| 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 59 | % |
| 60 | % |
| 61 | */ |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 62 | |
cristy | 9c88feb | 2011-09-21 13:06:09 +0000 | [diff] [blame] | 63 | static int MontageMain(int argc,char **argv) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 64 | { |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 65 | ExceptionInfo |
| 66 | *exception; |
| 67 | |
| 68 | ImageInfo |
| 69 | *image_info; |
| 70 | |
| 71 | MagickBooleanType |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 72 | status; |
| 73 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 74 | MagickCoreGenesis(*argv,MagickTrue); |
| 75 | exception=AcquireExceptionInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 76 | image_info=AcquireImageInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 77 | status=MagickCommandGenesis(image_info,MontageImageCommand,argc,argv, |
cristy | 4e1dff6 | 2009-10-25 20:36:03 +0000 | [diff] [blame] | 78 | (char **) NULL,exception); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 79 | image_info=DestroyImageInfo(image_info); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 80 | exception=DestroyExceptionInfo(exception); |
| 81 | MagickCoreTerminus(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 82 | return(status); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 83 | } |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 84 | |
| 85 | #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) |
| 86 | int main(int argc,char **argv) |
| 87 | { |
| 88 | return(MontageMain(argc,argv)); |
| 89 | } |
| 90 | #else |
| 91 | int wmain(int argc,wchar_t *argv[]) |
| 92 | { |
| 93 | char |
| 94 | **utf8; |
| 95 | |
| 96 | int |
| 97 | status; |
| 98 | |
| 99 | register int |
| 100 | i; |
| 101 | |
| 102 | utf8=NTArgvToUTF8(argc,argv); |
| 103 | status=MontageMain(argc,utf8); |
| 104 | for (i=0; i < argc; i++) |
| 105 | utf8[i]=DestroyString(utf8[i]); |
| 106 | utf8=(char **) RelinquishMagickMemory(utf8); |
| 107 | return(status); |
| 108 | } |
| 109 | #endif |