cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % IIIII M M PPPP OOO RRRR TTTTT % |
| 7 | % I MM MM P P O O R R T % |
| 8 | % I M M M PPPP O O RRRR T % |
| 9 | % I M M P O O R R T % |
| 10 | % IIIII M M P OOO R R T % |
| 11 | % % |
| 12 | % % |
| 13 | % Import image to a machine independent format. % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % July 1992 % |
| 18 | % % |
| 19 | % % |
cristy | 16af1cb | 2009-12-11 21:38:29 +0000 | [diff] [blame] | 20 | % Copyright 1999-2010 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 | % Import is an X Window System window dumping utility. Import allows X |
| 37 | % users to store window images in a specially formatted dump file. This |
| 38 | % file can then be read by the Display utility for redisplay, printing, |
| 39 | % editing, formatting, archiving, image processing, etc. The target |
| 40 | % window can be specified by id or name or be selected by clicking the |
| 41 | % mouse in the desired window. The keyboard bell is rung once at the |
| 42 | % beginning of the dump and twice when the dump is completed. |
| 43 | % |
| 44 | % |
| 45 | */ |
| 46 | |
| 47 | /* |
| 48 | Include declarations. |
| 49 | */ |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 50 | #include "wand/studio.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 51 | #include "wand/MagickWand.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 52 | |
| 53 | /* |
| 54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 55 | % % |
| 56 | % % |
| 57 | % % |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 58 | % M a i n % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 59 | % % |
| 60 | % % |
| 61 | % % |
| 62 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 63 | % |
| 64 | % |
| 65 | */ |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 66 | |
cristy | 0157aea | 2010-04-24 21:12:18 +0000 | [diff] [blame] | 67 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 68 | int WINAPI WinMain(HINSTANCE instance,HINSTANCE last,LPSTR command,int state) |
| 69 | { |
| 70 | char |
| 71 | **argv; |
| 72 | |
| 73 | int |
| 74 | argc, |
| 75 | main(int,char **); |
| 76 | |
cristy | 7dd85bb | 2010-04-25 01:23:53 +0000 | [diff] [blame^] | 77 | (void) instance; |
| 78 | (void) last; |
| 79 | (void) state; |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 80 | argv=StringToArgv(command,&argc); |
| 81 | return(main(argc,argv)); |
| 82 | } |
| 83 | #endif |
| 84 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 85 | int main(int argc,char **argv) |
| 86 | { |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | ExceptionInfo |
| 88 | *exception; |
| 89 | |
| 90 | ImageInfo |
| 91 | *image_info; |
| 92 | |
| 93 | MagickBooleanType |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 94 | status; |
| 95 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 96 | MagickCoreGenesis(*argv,MagickTrue); |
| 97 | exception=AcquireExceptionInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 98 | image_info=AcquireImageInfo(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 99 | status=MagickCommandGenesis(image_info,ImportImageCommand,argc,argv, |
cristy | e99d1c0 | 2009-11-03 02:17:57 +0000 | [diff] [blame] | 100 | (char **) NULL,exception); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 101 | image_info=DestroyImageInfo(image_info); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 102 | exception=DestroyExceptionInfo(exception); |
| 103 | MagickCoreTerminus(); |
cristy | 3980b0d | 2009-10-25 14:37:13 +0000 | [diff] [blame] | 104 | return(status); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 105 | } |