cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % CCCC OOO M M PPPP OOO SSSSS IIIII TTTTT EEEEE % |
| 7 | % C O O MM MM P P O O SS I T E % |
| 8 | % C O O M.M M PPPP O O SSS I T EEE % |
| 9 | % C O O M M P O O SS I T E % |
| 10 | % CCCC OOO M M P OOO SSSSS IIIII T EEEEE % |
| 11 | % % |
| 12 | % % |
| 13 | % Digitally composite two images. % |
| 14 | % % |
| 15 | % Software Design % |
cristy | de984cd | 2013-12-01 14:49:27 +0000 | [diff] [blame] | 16 | % Cristy % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 17 | % January 1993 % |
| 18 | % % |
| 19 | % % |
cristy | b56bb24 | 2014-11-25 17:12:48 +0000 | [diff] [blame] | 20 | % Copyright 1999-2015 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 | % Program Composite composites images to create new images. |
| 37 | % |
| 38 | % |
| 39 | */ |
| 40 | |
| 41 | /* |
| 42 | Include declarations. |
| 43 | */ |
cristy | ee67810 | 2011-07-01 23:32:11 +0000 | [diff] [blame] | 44 | #include "MagickWand/studio.h" |
| 45 | #include "MagickWand/MagickWand.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 46 | |
| 47 | /* |
| 48 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 49 | % % |
| 50 | % % |
| 51 | % % |
| 52 | % M a i n % |
| 53 | % % |
| 54 | % % |
| 55 | % % |
| 56 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 57 | % |
| 58 | % |
| 59 | */ |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 60 | |
cristy | 9c88feb | 2011-09-21 13:06:09 +0000 | [diff] [blame] | 61 | static int CompositeMain(int argc,char **argv) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 62 | { |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 63 | ExceptionInfo |
| 64 | *exception; |
| 65 | |
| 66 | ImageInfo |
| 67 | *image_info; |
| 68 | |
| 69 | MagickBooleanType |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 70 | status; |
| 71 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 72 | MagickCoreGenesis(*argv,MagickTrue); |
| 73 | exception=AcquireExceptionInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 74 | image_info=AcquireImageInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 75 | status=MagickCommandGenesis(image_info,CompositeImageCommand,argc,argv, |
cristy | 4e1dff6 | 2009-10-25 20:36:03 +0000 | [diff] [blame] | 76 | (char **) NULL,exception); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 77 | image_info=DestroyImageInfo(image_info); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 78 | exception=DestroyExceptionInfo(exception); |
| 79 | MagickCoreTerminus(); |
cristy | 3589219 | 2014-05-26 12:04:36 +0000 | [diff] [blame] | 80 | return(status != MagickFalse ? 0 : 1); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 81 | } |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 82 | |
cristy | 07a3cca | 2012-12-10 13:09:10 +0000 | [diff] [blame] | 83 | #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 84 | int main(int argc,char **argv) |
| 85 | { |
| 86 | return(CompositeMain(argc,argv)); |
| 87 | } |
| 88 | #else |
| 89 | int wmain(int argc,wchar_t *argv[]) |
| 90 | { |
| 91 | char |
| 92 | **utf8; |
| 93 | |
| 94 | int |
| 95 | status; |
| 96 | |
| 97 | register int |
| 98 | i; |
| 99 | |
| 100 | utf8=NTArgvToUTF8(argc,argv); |
| 101 | status=CompositeMain(argc,utf8); |
| 102 | for (i=0; i < argc; i++) |
| 103 | utf8[i]=DestroyString(utf8[i]); |
| 104 | utf8=(char **) RelinquishMagickMemory(utf8); |
dirk | 3c746fb | 2014-06-05 18:21:08 +0000 | [diff] [blame] | 105 | return(status); |
cristy | 66f9c3c | 2011-08-13 17:12:28 +0000 | [diff] [blame] | 106 | } |
| 107 | #endif |