| 97 | | iterations=1; |
| 98 | | status=MagickFalse; |
| 99 | | regard_warnings=MagickFalse; |
| 100 | | for (i=1; i < (long) (argc-1); i++) |
| 101 | | { |
| 102 | | option=argv[i]; |
| 103 | | if ((strlen(option) == 1) || ((*option != '-') && (*option != '+'))) |
| 104 | | continue; |
| 105 | | if (LocaleCompare("bench",option+1) == 0) |
| 106 | | iterations=(unsigned long) atol(argv[++i]); |
| 107 | | if (LocaleCompare("debug",option+1) == 0) |
| 108 | | (void) SetLogEventMask(argv[++i]); |
| 109 | | if (LocaleCompare("regard-warnings",option+1) == 0) |
| 110 | | regard_warnings=MagickTrue; |
| 111 | | } |
| 112 | | timer=(TimerInfo *) NULL; |
| 113 | | if (iterations > 1) |
| 114 | | timer=AcquireTimerInfo(); |
| 115 | | for (i=0; i < (long) iterations; i++) |
| 116 | | { |
| 117 | | image_info=AcquireImageInfo(); |
| 118 | | status=CompositeImageCommand(image_info,argc,argv,(char **) NULL,exception); |
| 119 | | if (exception->severity != UndefinedException) |
| 120 | | { |
| 121 | | if ((exception->severity > ErrorException) || |
| 122 | | (regard_warnings != MagickFalse)) |
| 123 | | status=MagickTrue; |
| 124 | | CatchException(exception); |
| 125 | | } |
| 126 | | image_info=DestroyImageInfo(image_info); |
| 127 | | } |
| 128 | | if (iterations > 1) |
| 129 | | { |
| 130 | | elapsed_time=GetElapsedTime(timer); |
| 131 | | user_time=GetUserTime(timer); |
| 132 | | (void) fprintf(stderr,"Performance: %lui %gips %0.3fu %ld:%02ld.%03ld\n", |
| 133 | | iterations,1.0*iterations/elapsed_time,user_time,(long) |
| 134 | | (elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)), |
| 135 | | (long) (1000.0*(elapsed_time-floor(elapsed_time)))); |
| 136 | | timer=DestroyTimerInfo(timer); |
| 137 | | } |
| | 76 | image_info=AcquireImageInfo(); |
| | 77 | metadata=(char *) NULL; |
| | 78 | status=MagickCommandGenesis(image_info,CompositeImageCommand,argc,argv, |
| | 79 | &metadata,exception); |
| | 80 | if (metadata != (char *) NULL) |
| | 81 | metadata=DestroyString(metadata); |
| | 82 | image_info=DestroyImageInfo(image_info); |