| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#include <stdio.h> |
| 20 |
#include "MagickCore/studio.h" |
| 21 |
#include "MagickCore/exception.h" |
| 22 |
#include "MagickCore/exception-private.h" |
| 23 |
#include "MagickCore/image.h" |
| 24 |
#include "MagickWand/MagickWand.h" |
| 25 |
#include "MagickWand/magick-cli.h" |
| 26 |
|
| 27 |
int main(int argc, char **argv) |
| 28 |
{ |
| 29 |
MagickCoreGenesis(argv[0],MagickFalse); |
| 30 |
|
| 31 |
{ |
| 32 |
|
| 33 |
ImageInfo *image_info = AcquireImageInfo(); |
| 34 |
ExceptionInfo *exception = AcquireExceptionInfo(); |
| 35 |
|
| 36 |
int arg_count; |
| 37 |
char *args[] = { "magick", "-size", "100x100", "xc:red", |
| 38 |
"(", "rose:", "-rotate", "-90", ")", |
| 39 |
"+append", "show:", NULL }; |
| 40 |
|
| 41 |
for(arg_count = 0; args[arg_count] != (char *) NULL; arg_count++); |
| 42 |
|
| 43 |
(void) MagickImageCommand(image_info, arg_count, args, NULL, exception); |
| 44 |
|
| 45 |
if (exception->severity != UndefinedException) |
| 46 |
{ |
| 47 |
CatchException(exception); |
| 48 |
fprintf(stderr, "Major Error Detected\n"); |
| 49 |
} |
| 50 |
|
| 51 |
image_info=DestroyImageInfo(image_info); |
| 52 |
exception=DestroyExceptionInfo(exception); |
| 53 |
} |
| 54 |
MagickCoreTerminus(); |
| 55 |
} |