From 72feaa664126c198b9ccd072b6ef181338a76c6c Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 17 Jan 2012 06:46:23 +0000 Subject: [PATCH] --- MagickCore/image.c | 35 +- MagickCore/image.h | 32 +- MagickCore/magick-config.h | 72 ++-- MagickCore/option.c | 330 ++++++++--------- MagickCore/option.h | 2 +- MagickCore/property.c | 1 + MagickCore/quantize.h | 2 +- MagickCore/splay-tree.c | 3 +- MagickCore/string.c | 6 + MagickCore/version.h | 2 +- MagickWand/ChangeLog | 2 +- MagickWand/operation.c | 720 +++++++++++++++---------------------- MagickWand/operation.h | 10 +- 13 files changed, 544 insertions(+), 673 deletions(-) diff --git a/MagickCore/image.c b/MagickCore/image.c index d2cacbdad..102f66a32 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -926,29 +926,19 @@ MagickExport ImageInfo *CloneImageInfo(const ImageInfo *image_info) clone_info->scene=image_info->scene; clone_info->number_scenes=image_info->number_scenes; clone_info->depth=image_info->depth; - if (image_info->size != (char *) NULL) - (void) CloneString(&clone_info->size,image_info->size); - if (image_info->extract != (char *) NULL) - (void) CloneString(&clone_info->extract,image_info->extract); - if (image_info->scenes != (char *) NULL) - (void) CloneString(&clone_info->scenes,image_info->scenes); - if (image_info->page != (char *) NULL) - (void) CloneString(&clone_info->page,image_info->page); + (void) CloneString(&clone_info->size,image_info->size); + (void) CloneString(&clone_info->extract,image_info->extract); + (void) CloneString(&clone_info->scenes,image_info->scenes); + (void) CloneString(&clone_info->page,image_info->page); clone_info->interlace=image_info->interlace; clone_info->endian=image_info->endian; clone_info->units=image_info->units; clone_info->quality=image_info->quality; - if (image_info->sampling_factor != (char *) NULL) - (void) CloneString(&clone_info->sampling_factor, - image_info->sampling_factor); - if (image_info->server_name != (char *) NULL) - (void) CloneString(&clone_info->server_name,image_info->server_name); - if (image_info->font != (char *) NULL) - (void) CloneString(&clone_info->font,image_info->font); - if (image_info->texture != (char *) NULL) - (void) CloneString(&clone_info->texture,image_info->texture); - if (image_info->density != (char *) NULL) - (void) CloneString(&clone_info->density,image_info->density); + (void) CloneString(&clone_info->sampling_factor,image_info->sampling_factor); + (void) CloneString(&clone_info->server_name,image_info->server_name); + (void) CloneString(&clone_info->font,image_info->font); + (void) CloneString(&clone_info->texture,image_info->texture); + (void) CloneString(&clone_info->density,image_info->density); clone_info->pointsize=image_info->pointsize; clone_info->fuzz=image_info->fuzz; clone_info->background_color=image_info->background_color; @@ -964,8 +954,7 @@ MagickExport ImageInfo *CloneImageInfo(const ImageInfo *image_info) clone_info->group=image_info->group; clone_info->ping=image_info->ping; clone_info->verbose=image_info->verbose; - if (image_info->view != (char *) NULL) - (void) CloneString(&clone_info->view,image_info->view); + (void) CloneString(&clone_info->view,image_info->view); clone_info->progress_monitor=image_info->progress_monitor; clone_info->client_data=image_info->client_data; clone_info->cache=image_info->cache; @@ -4039,7 +4028,7 @@ MagickExport MagickBooleanType SyncImage(Image *image,ExceptionInfo *exception) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% SyncImageSettings() sync the image info options to the image. +% SyncImageSettings() sync the image_info options into per-image attributes. % % The format of the SyncImageSettings method is: % @@ -4129,10 +4118,12 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, if (option != (const char *) NULL) (void) QueryColorCompliance(option,AllCompliance,&image->border_color, exception); + /* FUTURE: do not sync compose to per-image compose setting here */ option=GetImageOption(image_info,"compose"); if (option != (const char *) NULL) image->compose=(CompositeOperator) ParseCommandOption(MagickComposeOptions, MagickFalse,option); + /* -- */ option=GetImageOption(image_info,"compress"); if (option != (const char *) NULL) image->compression=(CompressionType) ParseCommandOption( diff --git a/MagickCore/image.h b/MagickCore/image.h index 2326778eb..f8e04ba4a 100644 --- a/MagickCore/image.h +++ b/MagickCore/image.h @@ -351,19 +351,19 @@ struct _ImageInfo MagickBooleanType temporary, - adjoin, + adjoin, /* save images to seperate scene files */ affirm, antialias; char - *size, - *extract, + *size, /* image generation size */ + *extract, /* crop/resize string on image read */ *page, - *scenes; + *scenes; /* scene numbers that is to be read in */ size_t - scene, - number_scenes, + scene, /* starting value for image save numbering */ + number_scenes, /* total number of images in list - for escapes */ depth; InterlaceType @@ -381,18 +381,21 @@ struct _ImageInfo char *sampling_factor, /* JPEG write sampling factor */ *server_name, /* X windows server name - display/animate */ - *font, /* draw_info */ + *font, /* DUP for draw_info */ *texture, /* montage/display background tile */ - *density; /* for image and draw_info */ + *density; /* DUP for image and draw_info */ double pointsize, fuzz; /* current color fuzz attribute */ PixelInfo - background_color, - border_color, - matte_color; + background_color, /* user set background color */ + border_color, /* user set border color */ + matte_color, /* matte (frame) color */ + transparent_color; /* color for transparent index in color tables */ + /* NB: fill color is only needed in draw_info! */ + /* the same for undercolor (for font drawing) */ MagickBooleanType dither, /* dither enable-disable */ @@ -401,6 +404,9 @@ struct _ImageInfo ColorspaceType colorspace; + CompositeOperator + compose; + ImageType type; @@ -416,7 +422,6 @@ struct _ImageInfo char *view; - /* authenticate -- moved to ImageOptions() */ ChannelType channel; @@ -427,9 +432,6 @@ struct _ImageInfo VirtualPixelMethod virtual_pixel_method; - PixelInfo - transparent_color; - void *profile; diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index 3db76f669..408ebd3a7 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -9,7 +9,9 @@ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define if you have AUTOTRACE library */ -/* #undef AUTOTRACE_DELEGATE */ +#ifndef MAGICKCORE_AUTOTRACE_DELEGATE +#define MAGICKCORE_AUTOTRACE_DELEGATE 1 +#endif /* Define if coders and filters are to be built as modules. */ /* #undef BUILD_MODULES */ @@ -103,12 +105,12 @@ #endif /* Define if you have Ghostscript library or framework */ -/* #undef GS_DELEGATE */ +#ifndef MAGICKCORE_GS_DELEGATE +#define MAGICKCORE_GS_DELEGATE 1 +#endif /* Define if you have GVC library */ -#ifndef MAGICKCORE_GVC_DELEGATE -#define MAGICKCORE_GVC_DELEGATE 1 -#endif +/* #undef GVC_DELEGATE */ /* Define to 1 if you have the `acosh' function. */ #ifndef MAGICKCORE_HAVE_ACOSH @@ -179,9 +181,7 @@ #endif /* define if bool is a built-in type */ -#ifndef MAGICKCORE_HAVE_BOOL -#define MAGICKCORE_HAVE_BOOL /**/ -#endif +/* #undef HAVE_BOOL */ /* Define to 1 if you have the `cabs' function. */ #ifndef MAGICKCORE_HAVE_CABS @@ -442,15 +442,15 @@ #endif /* Define if you have the header file. */ -#ifndef MAGICKCORE_HAVE_LCMS2_H -#define MAGICKCORE_HAVE_LCMS2_H 1 -#endif +/* #undef HAVE_LCMS2_H */ /* Define if you have the header file. */ /* #undef HAVE_LCMS2_LCMS2_H */ /* Define if you have the header file. */ -/* #undef HAVE_LCMS_H */ +#ifndef MAGICKCORE_HAVE_LCMS_H +#define MAGICKCORE_HAVE_LCMS_H 1 +#endif /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -564,14 +564,10 @@ #endif /* define if the compiler implements namespaces */ -#ifndef MAGICKCORE_HAVE_NAMESPACES -#define MAGICKCORE_HAVE_NAMESPACES /**/ -#endif +/* #undef HAVE_NAMESPACES */ /* Define if g++ supports namespace std. */ -#ifndef MAGICKCORE_HAVE_NAMESPACE_STD -#define MAGICKCORE_HAVE_NAMESPACE_STD /**/ -#endif +/* #undef HAVE_NAMESPACE_STD */ /* Define to 1 if you have the `nanosleep' function. */ #ifndef MAGICKCORE_HAVE_NANOSLEEP @@ -782,9 +778,7 @@ #endif /* define if the compiler supports ISO C++ standard library */ -#ifndef MAGICKCORE_HAVE_STD_LIBS -#define MAGICKCORE_HAVE_STD_LIBS /**/ -#endif +/* #undef HAVE_STD_LIBS */ /* Define to 1 if you have the `strcasecmp' function. */ #ifndef MAGICKCORE_HAVE_STRCASECMP @@ -1217,7 +1211,9 @@ #endif /* Define if you have LQR library */ -/* #undef LQR_DELEGATE */ +#ifndef MAGICKCORE_LQR_DELEGATE +#define MAGICKCORE_LQR_DELEGATE 1 +#endif /* Define if using libltdl to support dynamically loadable modules */ #ifndef MAGICKCORE_LTDL_DELEGATE @@ -1229,7 +1225,7 @@ /* Define to the system default library search path. */ #ifndef MAGICKCORE_LT_DLSEARCH_PATH -#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib/atlas:/usr/lib/catalyst:/usr/lib/qt-3.3/lib:/usr/lib/wine/:/usr/lib/xulrunner-1.9.2" #endif /* The archive extension */ @@ -1263,9 +1259,7 @@ /* #undef LT_SHARED_EXT */ /* Define if you have LZMA library */ -#ifndef MAGICKCORE_LZMA_DELEGATE -#define MAGICKCORE_LZMA_DELEGATE 1 -#endif +/* #undef LZMA_DELEGATE */ /* Define to prepend to default font search path. */ /* #undef MAGICK_FONT_PATH */ @@ -1321,14 +1315,10 @@ #endif /* Define if you have PANGOFT2 library */ -#ifndef MAGICKCORE_PANGOFT2_DELEGATE -#define MAGICKCORE_PANGOFT2_DELEGATE 1 -#endif +/* #undef PANGOFT2_DELEGATE */ /* Define if you have PANGO library */ -#ifndef MAGICKCORE_PANGO_DELEGATE -#define MAGICKCORE_PANGO_DELEGATE 1 -#endif +/* #undef PANGO_DELEGATE */ /* Define if you have PNG library */ #ifndef MAGICKCORE_PNG_DELEGATE @@ -1353,7 +1343,9 @@ #endif /* Define if you have RSVG library */ -/* #undef RSVG_DELEGATE */ +#ifndef MAGICKCORE_RSVG_DELEGATE +#define MAGICKCORE_RSVG_DELEGATE 1 +#endif /* Define to the type of arg 1 for `select'. */ #ifndef MAGICKCORE_SELECT_TYPE_ARG1 @@ -1404,7 +1396,7 @@ /* The size of `signed long', as computed by sizeof. */ #ifndef MAGICKCORE_SIZEOF_SIGNED_LONG -#define MAGICKCORE_SIZEOF_SIGNED_LONG 8 +#define MAGICKCORE_SIZEOF_SIGNED_LONG 4 #endif /* The size of `signed long long', as computed by sizeof. */ @@ -1419,12 +1411,12 @@ /* The size of `size_t', as computed by sizeof. */ #ifndef MAGICKCORE_SIZEOF_SIZE_T -#define MAGICKCORE_SIZEOF_SIZE_T 8 +#define MAGICKCORE_SIZEOF_SIZE_T 4 #endif /* The size of `ssize_t', as computed by sizeof. */ #ifndef MAGICKCORE_SIZEOF_SSIZE_T -#define MAGICKCORE_SIZEOF_SSIZE_T 8 +#define MAGICKCORE_SIZEOF_SSIZE_T 4 #endif /* The size of `unsigned int', as computed by sizeof. */ @@ -1434,12 +1426,12 @@ /* The size of `unsigned int*', as computed by sizeof. */ #ifndef MAGICKCORE_SIZEOF_UNSIGNED_INTP -#define MAGICKCORE_SIZEOF_UNSIGNED_INTP 8 +#define MAGICKCORE_SIZEOF_UNSIGNED_INTP 4 #endif /* The size of `unsigned long', as computed by sizeof. */ #ifndef MAGICKCORE_SIZEOF_UNSIGNED_LONG -#define MAGICKCORE_SIZEOF_UNSIGNED_LONG 8 +#define MAGICKCORE_SIZEOF_UNSIGNED_LONG 4 #endif /* The size of `unsigned long long', as computed by sizeof. */ @@ -1566,7 +1558,9 @@ #endif /* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ +#ifndef MAGICKCORE__FILE_OFFSET_BITS +#define MAGICKCORE__FILE_OFFSET_BITS 64 +#endif /* enable run-time bounds-checking */ /* #undef _FORTIFY_SOURCE */ diff --git a/MagickCore/option.c b/MagickCore/option.c index 675b85c45..10e494168 100644 --- a/MagickCore/option.c +++ b/MagickCore/option.c @@ -109,11 +109,11 @@ static const OptionInfo }, BooleanOptions[] = { - { "False", 0L, UndefinedOptionFlag, MagickFalse }, - { "True", 1L, UndefinedOptionFlag, MagickFalse }, - { "0", 0L, UndefinedOptionFlag, MagickFalse }, - { "1", 1L, UndefinedOptionFlag, MagickFalse }, - { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse } + { "False", MagickFalse, UndefinedOptionFlag, MagickFalse }, + { "True", MagickTrue, UndefinedOptionFlag, MagickFalse }, + { "0", MagickFalse, UndefinedOptionFlag, MagickFalse }, + { "1", MagickTrue, UndefinedOptionFlag, MagickFalse }, + { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse } }, ChannelOptions[] = { @@ -158,19 +158,19 @@ static const OptionInfo { { "+adjoin", 0L, ImageInfoOptionFlag, MagickFalse }, { "-adjoin", 0L, ImageInfoOptionFlag, MagickFalse }, - { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-adaptive-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickFalse }, + { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickTrue }, { "-adaptive-resize", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickFalse }, + { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickTrue }, { "-adaptive-sharpen", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+affine", 0L, DrawInfoOptionFlag, MagickFalse }, { "-affine", 1L, DrawInfoOptionFlag, MagickFalse }, { "+affinity", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, - { "+alpha", 1L, DeprecateOptionFlag, MagickFalse }, + { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, + { "+alpha", 1L, DeprecateOptionFlag, MagickTrue }, { "-alpha", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+annotate", 0L, DeprecateOptionFlag, MagickFalse }, + { "+annotate", 0L, DeprecateOptionFlag, MagickTrue }, { "-annotate", 2L, SimpleOperatorOptionFlag, MagickFalse }, { "+antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, @@ -180,14 +180,14 @@ static const OptionInfo { "-attenuate", 0L, ImageInfoOptionFlag, MagickFalse }, { "+authenticate", 0L, ImageInfoOptionFlag, MagickFalse }, { "-authenticate", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+auto-gamma", 0L, DeprecateOptionFlag, MagickFalse }, + { "+auto-gamma", 0L, DeprecateOptionFlag, MagickTrue }, { "-auto-gamma", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+auto-level", 0L, DeprecateOptionFlag, MagickFalse }, + { "+auto-level", 0L, DeprecateOptionFlag, MagickTrue }, { "-auto-level", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+auto-orient", 0L, DeprecateOptionFlag, MagickFalse }, + { "+auto-orient", 0L, DeprecateOptionFlag, MagickTrue }, { "-auto-orient", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+average", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-average", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+average", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "-average", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "+backdrop", 0L, NonConvertOptionFlag, MagickFalse }, { "-backdrop", 1L, NonConvertOptionFlag, MagickFalse }, { "+background", 0L, ImageInfoOptionFlag, MagickFalse }, @@ -198,37 +198,39 @@ static const OptionInfo { "-bias", 1L, ImageInfoOptionFlag, MagickFalse }, { "+black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse }, { "-black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse }, - { "+black-threshold", 0L, DeprecateOptionFlag, MagickFalse }, + { "+black-threshold", 0L, DeprecateOptionFlag, MagickTrue }, { "-black-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+blend", 0L, NonConvertOptionFlag, MagickFalse }, { "-blend", 1L, NonConvertOptionFlag, MagickFalse }, { "+blue-primary", 0L, ImageInfoOptionFlag, MagickFalse }, { "-blue-primary", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+blue-shift", 1L, DeprecateOptionFlag, MagickFalse }, + { "+blue-shift", 1L, DeprecateOptionFlag, MagickTrue }, { "-blue-shift", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+border", 1L, DeprecateOptionFlag, MagickFalse }, + { "+border", 1L, DeprecateOptionFlag, MagickTrue }, { "-border", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+bordercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-bordercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+borderwidth", 0L, NonConvertOptionFlag, MagickFalse }, { "-borderwidth", 1L, NonConvertOptionFlag, MagickFalse }, - { "+box", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-box", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickFalse }, + { "+box", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "-box", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickTrue }, { "-brightness-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+cache", 0L, GlobalOptionFlag, MagickFalse }, { "-cache", 1L, GlobalOptionFlag, MagickFalse }, - { "+cdl", 1L, DeprecateOptionFlag, MagickFalse }, + { "+caption", 0L, ImageInfoOptionFlag, MagickFalse }, + { "-caption", 1L, ImageInfoOptionFlag, MagickFalse }, + { "+cdl", 1L, DeprecateOptionFlag, MagickTrue }, { "-cdl", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+channel", 0L, ImageInfoOptionFlag | ListOperatorOptionFlag, MagickFalse }, - { "-channel", 1L, ImageInfoOptionFlag | ListOperatorOptionFlag, MagickFalse }, - { "+charcoal", 0L, DeprecateOptionFlag, MagickFalse }, + { "+channel", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "-channel", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "+charcoal", 0L, DeprecateOptionFlag, MagickTrue }, { "-charcoal", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+chop", 1L, DeprecateOptionFlag, MagickFalse }, + { "+chop", 1L, DeprecateOptionFlag, MagickTrue }, { "-chop", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+clamp", 0L, DeprecateOptionFlag, MagickFalse }, + { "+clamp", 0L, DeprecateOptionFlag, MagickTrue }, { "-clamp", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+clip", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-clip", 0L, SimpleOperatorOptionFlag, MagickFalse }, @@ -238,27 +240,27 @@ static const OptionInfo { "-clip-path", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+clone", 0L, SpecialOperatorOptionFlag, MagickFalse }, { "-clone", 1L, SpecialOperatorOptionFlag, MagickFalse }, - { "+clut", 0L, FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+clut", 0L, FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "-clut", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+coalesce", 0L, FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+coalesce", 0L, FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "-coalesce", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+colorize", 1L, DeprecateOptionFlag, MagickFalse }, + { "+colorize", 1L, DeprecateOptionFlag, MagickTrue }, { "-colorize", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+colormap", 0L, NonConvertOptionFlag, MagickFalse }, { "-colormap", 1L, NonConvertOptionFlag, MagickFalse }, - { "+color-matrix", 1L, DeprecateOptionFlag, MagickFalse }, + { "+color-matrix", 1L, DeprecateOptionFlag, MagickTrue }, { "-color-matrix", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+colors", 1L, DeprecateOptionFlag, MagickFalse }, + { "+colors", 1L, DeprecateOptionFlag, MagickTrue }, { "-colors", 1L, ImageInfoOptionFlag, MagickFalse }, { "+colorspace", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "-colorspace", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, - { "+combine", 0L, FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+combine", 0L, FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "-combine", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+comment", 0L, ImageInfoOptionFlag, MagickFalse }, { "-comment", 1L, ImageInfoOptionFlag, MagickFalse }, { "+compose", 0L, ImageInfoOptionFlag, MagickFalse }, { "-compose", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+composite", 0L, FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+composite", 0L, FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "-composite", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+compress", 0L, ImageInfoOptionFlag, MagickFalse }, { "-compress", 1L, ImageInfoOptionFlag, MagickFalse }, @@ -266,41 +268,41 @@ static const OptionInfo { "-concurrent", 0L, GenesisOptionFlag, MagickTrue }, { "+contrast", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-contrast", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickFalse }, + { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickTrue }, { "-contrast-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+convolve", 1L, DeprecateOptionFlag, MagickFalse }, + { "+convolve", 1L, DeprecateOptionFlag, MagickTrue }, { "-convolve", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-crop", 1L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+cycle", 1L, DeprecateOptionFlag, MagickFalse }, + { "+cycle", 1L, DeprecateOptionFlag, MagickTrue }, { "-cycle", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+debug", 0L, GlobalOptionFlag|GenesisOptionFlag | FireOptionFlag, MagickFalse }, { "-debug", 1L, GlobalOptionFlag|GenesisOptionFlag | FireOptionFlag, MagickFalse }, - { "+decipher", 1L, DeprecateOptionFlag, MagickFalse }, + { "+decipher", 1L, DeprecateOptionFlag, MagickTrue }, { "-decipher", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+deconstruct", 0L, FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+deconstruct", 0L, FireOptionFlag | DeprecateOptionFlag, MagickTrue }, { "-deconstruct", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+define", 1L, ImageInfoOptionFlag, MagickFalse }, { "-define", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+delay", 0L, ImageInfoOptionFlag, MagickFalse }, - { "-delay", 1L, ImageInfoOptionFlag, MagickFalse }, + { "+delay", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "-delay", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "+delete", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-delete", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+density", 0L, ImageInfoOptionFlag, MagickFalse }, + { "+density", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-density", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, - { "+depth", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "-depth", 1L, SimpleOperatorOptionFlag, MagickFalse }, + { "+depth", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "-depth", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "+descend", 0L, NonConvertOptionFlag, MagickFalse }, { "-descend", 1L, NonConvertOptionFlag, MagickFalse }, { "+deskew", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-deskew", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+despeckle", 0L, DeprecateOptionFlag, MagickFalse }, + { "+despeckle", 0L, DeprecateOptionFlag, MagickTrue }, { "-despeckle", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+direction", 0L, ImageInfoOptionFlag, MagickFalse }, - { "-direction", 1L, ImageInfoOptionFlag, MagickFalse }, + { "+direction", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, + { "-direction", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+displace", 0L, NonConvertOptionFlag, MagickFalse }, { "-displace", 1L, NonConvertOptionFlag, MagickFalse }, - { "+display", 1L, ImageInfoOptionFlag, MagickFalse }, + { "+display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+dispose", 0L, ImageInfoOptionFlag, MagickFalse }, { "-dispose", 1L, ImageInfoOptionFlag, MagickFalse }, @@ -308,37 +310,37 @@ static const OptionInfo { "-dissolve", 1L, NonConvertOptionFlag, MagickFalse }, { "+distort", 2L, SimpleOperatorOptionFlag, MagickFalse }, { "-distort", 2L, SimpleOperatorOptionFlag, MagickFalse }, - { "+dither", 0L, ListOperatorOptionFlag | ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse }, - { "-dither", 1L, ListOperatorOptionFlag | ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse }, + { "+dither", 0L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse }, + { "-dither", 1L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse }, { "+draw", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-draw", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+duplicate", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-duplicate", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+duration", 1L, GenesisOptionFlag, MagickFalse }, { "-duration", 1L, GenesisOptionFlag, MagickFalse }, - { "+edge", 1L, DeprecateOptionFlag, MagickFalse }, + { "+edge", 1L, DeprecateOptionFlag, MagickTrue }, { "-edge", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+emboss", 1L, DeprecateOptionFlag, MagickFalse }, + { "+emboss", 1L, DeprecateOptionFlag, MagickTrue }, { "-emboss", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+encipher", 1L, DeprecateOptionFlag, MagickFalse }, + { "+encipher", 1L, DeprecateOptionFlag, MagickTrue }, { "-encipher", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+encoding", 0L, ImageInfoOptionFlag, MagickFalse }, + { "+encoding", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-encoding", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+endian", 0L, ImageInfoOptionFlag, MagickFalse }, { "-endian", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+enhance", 0L, DeprecateOptionFlag, MagickFalse }, + { "+enhance", 0L, DeprecateOptionFlag, MagickTrue }, { "-enhance", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+equalize", 0L, DeprecateOptionFlag, MagickFalse }, + { "+equalize", 0L, DeprecateOptionFlag, MagickTrue }, { "-equalize", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+evaluate", 2L, DeprecateOptionFlag, MagickFalse }, + { "+evaluate", 2L, DeprecateOptionFlag, MagickTrue }, { "-evaluate", 2L, SimpleOperatorOptionFlag, MagickFalse }, - { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-evaluate-sequence", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+extent", 1L, DeprecateOptionFlag, MagickFalse }, + { "+extent", 1L, DeprecateOptionFlag, MagickTrue }, { "-extent", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+extract", 0L, ImageInfoOptionFlag, MagickFalse }, { "-extract", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+family", 0L, DeprecateOptionFlag, MagickFalse }, + { "+family", 0L, DeprecateOptionFlag, MagickTrue }, { "-family", 1L, DrawInfoOptionFlag, MagickFalse }, { "+features", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-features", 1L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse }, @@ -348,11 +350,11 @@ static const OptionInfo { "-fill", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+filter", 0L, ImageInfoOptionFlag, MagickFalse }, { "-filter", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+flatten", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, - { "-flatten", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+flip", 0L, DeprecateOptionFlag, MagickFalse }, + { "+flatten", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, + { "-flatten", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "+flip", 0L, DeprecateOptionFlag, MagickTrue }, { "-flip", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+flop", 0L, DeprecateOptionFlag, MagickFalse }, + { "+flop", 0L, DeprecateOptionFlag, MagickTrue }, { "-flop", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+floodfill", 2L, SimpleOperatorOptionFlag, MagickFalse }, { "-floodfill", 2L, SimpleOperatorOptionFlag, MagickFalse }, @@ -360,19 +362,19 @@ static const OptionInfo { "-font", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+foreground", 0L, NonConvertOptionFlag, MagickFalse }, { "-foreground", 1L, NonConvertOptionFlag, MagickFalse }, - { "+format", 0L, DeprecateOptionFlag, MagickFalse }, + { "+format", 0L, ImageInfoOptionFlag, MagickFalse }, { "-format", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+frame", 1L, DeprecateOptionFlag, MagickFalse }, + { "+frame", 1L, DeprecateOptionFlag, MagickTrue }, { "-frame", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+fuzz", 0L, ImageInfoOptionFlag, MagickFalse }, { "-fuzz", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+fx", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+fx", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-fx", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+gamma", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-gamma", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+gaussian", 1L, DeprecateOptionFlag, MagickFalse }, - { "-gaussian", 1L, SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+gaussian", 1L, DeprecateOptionFlag, MagickTrue }, + { "-gaussian", 1L, SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-gaussian-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+geometry", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-geometry", 1L, SimpleOperatorOptionFlag, MagickFalse }, @@ -380,7 +382,7 @@ static const OptionInfo { "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse }, { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-hald-clut", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+help", 0L, SpecialOperatorOptionFlag, MagickFalse }, { "-help", 0L, SpecialOperatorOptionFlag, MagickFalse }, @@ -390,13 +392,13 @@ static const OptionInfo { "-iconGeometry", 1L, NonConvertOptionFlag, MagickFalse }, { "+iconic", 0L, NonConvertOptionFlag, MagickFalse }, { "-iconic", 1L, NonConvertOptionFlag, MagickFalse }, - { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-identify", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+ift", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-ift", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+immutable", 0L, NonConvertOptionFlag, MagickFalse }, { "-immutable", 0L, NonConvertOptionFlag, MagickFalse }, - { "+implode", 0L, DeprecateOptionFlag, MagickFalse }, + { "+implode", 0L, DeprecateOptionFlag, MagickTrue }, { "-implode", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+insert", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-insert", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, @@ -414,29 +416,29 @@ static const OptionInfo { "-kerning", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+label", 0L, ImageInfoOptionFlag, MagickFalse }, { "-label", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+lat", 1L, DeprecateOptionFlag, MagickFalse }, + { "+lat", 1L, DeprecateOptionFlag, MagickTrue }, { "-lat", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-layers", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+level", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-level", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+limit", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse }, - { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse }, - { "+linear-stretch", 1L, DeprecateOptionFlag, MagickFalse }, + { "+limit", 0L, DeprecateOptionFlag, MagickTrue }, + { "-limit", 2L, GlobalOptionFlag | ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, + { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue }, { "-linear-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+linewidth", 0L, DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-linewidth", 1L, DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickFalse }, + { "+linewidth", 0L, DrawInfoOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "-linewidth", 1L, DrawInfoOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue }, { "-liquid-rescale", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+list", 0L, GlobalOptionFlag, MagickFalse }, - { "-list", 1L, GlobalOptionFlag, MagickFalse }, - { "+log", 0L, GlobalOptionFlag, MagickFalse }, + { "+list", 0L, DeprecateOptionFlag, MagickTrue }, + { "-list", 1L, GlobalOptionFlag | ImageInfoOptionFlag, MagickFalse }, + { "+log", 0L, DeprecateOptionFlag, MagickFalse }, { "-log", 1L, GlobalOptionFlag, MagickFalse }, { "+loop", 0L, ImageInfoOptionFlag, MagickFalse }, { "-loop", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+lowlight-color", 1L, DeprecateOptionFlag, MagickFalse }, + { "+lowlight-color", 1L, DeprecateOptionFlag, MagickTrue }, { "-lowlight-color", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+magnify", 0L, NonConvertOptionFlag, MagickFalse }, { "-magnify", 1L, NonConvertOptionFlag, MagickFalse }, @@ -444,33 +446,33 @@ static const OptionInfo { "-map", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+mask", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-mask", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+matte", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-matte", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+matte", 0L, DeprecateOptionFlag, MagickTrue }, + { "-matte", 0L, DeprecateOptionFlag, MagickTrue }, { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse }, { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, - { "-maximum", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+median", 1L, DeprecateOptionFlag, MagickFalse }, - { "-median", 1L, SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, + { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, + { "+median", 1L, DeprecateOptionFlag, MagickTrue }, + { "-median", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "+metric", 0L, NonConvertOptionFlag, MagickFalse }, { "-metric", 1L, NonConvertOptionFlag, MagickFalse }, - { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, - { "-minimum", 0L, ImageInfoOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, + { "-minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "+mode", 1L, NonConvertOptionFlag, MagickFalse }, { "-mode", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+modulate", 1L, DeprecateOptionFlag, MagickFalse }, + { "+modulate", 1L, DeprecateOptionFlag, MagickTrue }, { "-modulate", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+monitor", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, - { "-monitor", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "+monitor", 0L, GlobalOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, + { "-monitor", 0L, GlobalOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "+monochrome", 0L, ImageInfoOptionFlag, MagickFalse }, { "-monochrome", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, - { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-morph", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+morphology", 2L, DeprecateOptionFlag, MagickFalse }, + { "+morphology", 2L, DeprecateOptionFlag, MagickTrue }, { "-morphology", 2L, SimpleOperatorOptionFlag, MagickFalse }, - { "+mosaic", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-mosaic", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "+motion-blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+mosaic", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "-mosaic", 0L, ListOperatorOptionFlag | FireOptionFlag | DeprecateOptionFlag, MagickTrue }, + { "+motion-blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-motion-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+name", 0L, NonConvertOptionFlag, MagickFalse }, { "-name", 1L, NonConvertOptionFlag, MagickFalse }, @@ -480,41 +482,43 @@ static const OptionInfo { "-noise", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+noop", 0L, SpecialOperatorOptionFlag, MagickFalse }, { "-noop", 0L, SpecialOperatorOptionFlag, MagickFalse }, - { "+normalize", 0L, DeprecateOptionFlag, MagickFalse }, + { "+normalize", 0L, DeprecateOptionFlag, MagickTrue }, { "-normalize", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+opaque", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-opaque", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+ordered-dither", 0L, DeprecateOptionFlag, MagickFalse }, + { "+ordered-dither", 0L, DeprecateOptionFlag, MagickTrue }, { "-ordered-dither", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+orient", 0L, ImageInfoOptionFlag, MagickFalse }, { "-orient", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+origin", 0L, DeprecateOptionFlag, MagickFalse }, - { "-origin", 1L, DeprecateOptionFlag, MagickFalse }, + { "+origin", 0L, DeprecateOptionFlag, MagickTrue }, + { "-origin", 1L, DeprecateOptionFlag, MagickTrue }, { "+page", 0L, ImageInfoOptionFlag, MagickFalse }, { "-page", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+paint", 0L, DeprecateOptionFlag, MagickFalse }, + { "+paint", 0L, DeprecateOptionFlag, MagickTrue }, { "-paint", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+path", 0L, SpecialOperatorOptionFlag, MagickFalse }, { "-path", 1L, SpecialOperatorOptionFlag, MagickFalse }, { "+pause", 0L, NonConvertOptionFlag, MagickFalse }, { "-pause", 1L, NonConvertOptionFlag, MagickFalse }, - { "+passphrase", 0L, DeprecateOptionFlag, MagickFalse }, - { "-passphrase", 1L, DeprecateOptionFlag, MagickFalse }, - { "+pen", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, - { "-pen", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+passphrase", 0L, DeprecateOptionFlag, MagickTrue }, + { "-passphrase", 1L, DeprecateOptionFlag, MagickTrue }, + { "+pen", 0L, DeprecateOptionFlag, MagickTrue }, + { "-pen", 1L, DeprecateOptionFlag, MagickTrue }, { "+ping", 0L, ImageInfoOptionFlag, MagickFalse }, { "-ping", 0L, ImageInfoOptionFlag, MagickFalse }, { "+pointsize", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-pointsize", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "+polaroid", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-polaroid", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+posterize", 1L, DeprecateOptionFlag, MagickFalse }, + { "+posterize", 1L, DeprecateOptionFlag, MagickTrue }, { "-posterize", 1L, SimpleOperatorOptionFlag, MagickFalse }, + { "+precision", 0L, GlobalOptionFlag, MagickFalse }, + { "-precision", 1L, GlobalOptionFlag, MagickFalse }, { "+preview", 0L, ImageInfoOptionFlag, MagickFalse }, { "-preview", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-print", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-process", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+profile", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-profile", 1L, SimpleOperatorOptionFlag, MagickFalse }, @@ -524,14 +528,14 @@ static const OptionInfo { "-quantize", 1L, QuantizeInfoOptionFlag, MagickFalse }, { "+quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse }, { "-quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse }, - { "+radial-blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+radial-blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-radial-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+raise", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-raise", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+random-threshold", 1L, DeprecateOptionFlag, MagickFalse }, + { "+random-threshold", 1L, DeprecateOptionFlag, MagickTrue }, { "-random-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+recolor", 1L, DeprecateOptionFlag, MagickFalse }, - { "-recolor", 1L, SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickFalse }, + { "+recolor", 1L, DeprecateOptionFlag, MagickTrue }, + { "-recolor", 1L, SimpleOperatorOptionFlag | DeprecateOptionFlag, MagickTrue }, { "+red-primary", 0L, ImageInfoOptionFlag, MagickFalse }, { "-red-primary", 1L, ImageInfoOptionFlag, MagickFalse }, { "+regard-warnings", 0L, GenesisOptionFlag, MagickFalse }, @@ -542,23 +546,23 @@ static const OptionInfo { "-remote", 1L, NonConvertOptionFlag, MagickFalse }, { "+render", 0L, DrawInfoOptionFlag, MagickFalse }, { "-render", 0L, DrawInfoOptionFlag, MagickFalse }, - { "+remap", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+remap", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-remap", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+repage", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-repage", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+resample", 1L, DeprecateOptionFlag, MagickFalse }, + { "+resample", 1L, DeprecateOptionFlag, MagickTrue }, { "-resample", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+resize", 1L, DeprecateOptionFlag, MagickFalse }, + { "+resize", 1L, DeprecateOptionFlag, MagickTrue }, { "-resize", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+respect-parenthesis", 0L, SpecialOperatorOptionFlag, MagickFalse }, { "-respect-parenthesis", 0L, SpecialOperatorOptionFlag, MagickFalse }, - { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-reverse", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+roll", 1L, DeprecateOptionFlag, MagickFalse }, + { "+roll", 1L, DeprecateOptionFlag, MagickTrue }, { "-roll", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+rotate", 1L, DeprecateOptionFlag, MagickFalse }, + { "+rotate", 1L, DeprecateOptionFlag, MagickTrue }, { "-rotate", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+sample", 1L, DeprecateOptionFlag, MagickFalse }, + { "+sample", 1L, DeprecateOptionFlag, MagickTrue }, { "-sample", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+sampling-factor", 0L, ImageInfoOptionFlag, MagickFalse }, { "-sampling-factor", 1L, ImageInfoOptionFlag, MagickFalse }, @@ -568,7 +572,7 @@ static const OptionInfo { "-sans0", 0L, NonConvertOptionFlag, MagickTrue }, { "+sans2", 2L, NonConvertOptionFlag, MagickTrue }, { "-sans2", 2L, NonConvertOptionFlag, MagickTrue }, - { "+scale", 1L, DeprecateOptionFlag, MagickFalse }, + { "+scale", 1L, DeprecateOptionFlag, MagickTrue }, { "-scale", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+scene", 0L, ImageInfoOptionFlag, MagickFalse }, { "-scene", 1L, ImageInfoOptionFlag, MagickFalse }, @@ -578,27 +582,27 @@ static const OptionInfo { "-screen", 1L, NonConvertOptionFlag, MagickFalse }, { "+seed", 0L, GlobalOptionFlag, MagickFalse }, { "-seed", 1L, GlobalOptionFlag, MagickFalse }, - { "+segment", 1L, DeprecateOptionFlag, MagickFalse }, + { "+segment", 1L, DeprecateOptionFlag, MagickTrue }, { "-segment", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+selective-blur", 1L, DeprecateOptionFlag, MagickFalse }, + { "+selective-blur", 1L, DeprecateOptionFlag, MagickTrue }, { "-selective-blur", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse }, + { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue }, { "-separate", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+sepia-tone", 1L, DeprecateOptionFlag, MagickFalse }, + { "+sepia-tone", 1L, DeprecateOptionFlag, MagickTrue }, { "-sepia-tone", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+set", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "-set", 2L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, - { "+shade", 0L, DeprecateOptionFlag, MagickFalse }, + { "+shade", 0L, DeprecateOptionFlag, MagickTrue }, { "-shade", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+shadow", 1L, DeprecateOptionFlag, MagickFalse }, + { "+shadow", 1L, DeprecateOptionFlag, MagickTrue }, { "-shadow", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+shared-memory", 0L, NonConvertOptionFlag, MagickFalse }, { "-shared-memory", 1L, NonConvertOptionFlag, MagickFalse }, - { "+sharpen", 1L, DeprecateOptionFlag, MagickFalse }, + { "+sharpen", 1L, DeprecateOptionFlag, MagickTrue }, { "-sharpen", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+shave", 1L, DeprecateOptionFlag, MagickFalse }, + { "+shave", 1L, DeprecateOptionFlag, MagickTrue }, { "-shave", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+shear", 1L, DeprecateOptionFlag, MagickFalse }, + { "+shear", 1L, DeprecateOptionFlag, MagickTrue }, { "-shear", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+sigmoidal-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-sigmoidal-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse }, @@ -606,29 +610,29 @@ static const OptionInfo { "-silent", 1L, NonConvertOptionFlag, MagickFalse }, { "+size", 0L, ImageInfoOptionFlag, MagickFalse }, { "-size", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+sketch", 1L, DeprecateOptionFlag, MagickFalse }, + { "+sketch", 1L, DeprecateOptionFlag, MagickTrue }, { "-sketch", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+smush", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-smush", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "+snaps", 0L, NonConvertOptionFlag, MagickFalse }, { "-snaps", 1L, NonConvertOptionFlag, MagickFalse }, - { "+solarize", 1L, DeprecateOptionFlag, MagickFalse }, + { "+solarize", 1L, DeprecateOptionFlag, MagickTrue }, { "-solarize", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+sparse-color", 2L, DeprecateOptionFlag, MagickFalse }, + { "+sparse-color", 2L, DeprecateOptionFlag, MagickTrue }, { "-sparse-color", 2L, SimpleOperatorOptionFlag, MagickFalse }, - { "+splice", 1L, DeprecateOptionFlag, MagickFalse }, + { "+splice", 1L, DeprecateOptionFlag, MagickTrue }, { "-splice", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+spread", 1L, DeprecateOptionFlag, MagickFalse }, + { "+spread", 1L, DeprecateOptionFlag, MagickTrue }, { "-spread", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+statistic", 2L, DeprecateOptionFlag, MagickFalse }, + { "+statistic", 2L, DeprecateOptionFlag, MagickTrue }, { "-statistic", 2L, SimpleOperatorOptionFlag, MagickFalse }, { "+stegano", 0L, NonConvertOptionFlag, MagickFalse }, { "-stegano", 1L, NonConvertOptionFlag, MagickFalse }, - { "+stereo", 0L, DeprecateOptionFlag, MagickFalse }, + { "+stereo", 0L, DeprecateOptionFlag, MagickTrue }, { "-stereo", 1L, NonConvertOptionFlag, MagickFalse }, - { "+stretch", 1L, DeprecateOptionFlag, MagickFalse }, + { "+stretch", 1L, DeprecateOptionFlag, MagickTrue }, { "-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+strip", 0L, DeprecateOptionFlag, MagickFalse }, + { "+strip", 0L, DeprecateOptionFlag, MagickTrue }, { "-strip", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+stroke", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-stroke", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, @@ -640,7 +644,7 @@ static const OptionInfo { "-subimage-search", 0L, NonConvertOptionFlag, MagickFalse }, { "+swap", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, { "-swap", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse }, - { "+swirl", 1L, DeprecateOptionFlag, MagickFalse }, + { "+swirl", 1L, DeprecateOptionFlag, MagickTrue }, { "-swirl", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+synchronize", 0L, ImageInfoOptionFlag, MagickFalse }, { "-synchronize", 0L, ImageInfoOptionFlag, MagickFalse }, @@ -652,7 +656,7 @@ static const OptionInfo { "-texture", 1L, ImageInfoOptionFlag, MagickFalse }, { "+threshold", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+thumbnail", 1L, DeprecateOptionFlag, MagickFalse }, + { "+thumbnail", 1L, DeprecateOptionFlag, MagickTrue }, { "-thumbnail", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+tile", 0L, DrawInfoOptionFlag, MagickFalse }, { "-tile", 1L, DrawInfoOptionFlag, MagickFalse }, @@ -662,31 +666,31 @@ static const OptionInfo { "-tint", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+title", 0L, NonConvertOptionFlag, MagickFalse }, { "-title", 1L, NonConvertOptionFlag, MagickFalse }, - { "+transform", 0L, DeprecateOptionFlag, MagickFalse }, + { "+transform", 0L, DeprecateOptionFlag, MagickTrue }, { "-transform", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+transparent", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "-transparent", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+transparent-color", 1L, ImageInfoOptionFlag, MagickFalse }, { "-transparent-color", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+transpose", 0L, DeprecateOptionFlag, MagickFalse }, + { "+transpose", 0L, DeprecateOptionFlag, MagickTrue }, { "-transpose", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+transverse", 0L, DeprecateOptionFlag, MagickFalse }, + { "+transverse", 0L, DeprecateOptionFlag, MagickTrue }, { "-transverse", 0L, SimpleOperatorOptionFlag, MagickFalse }, - { "+treedepth", 1L, DeprecateOptionFlag, MagickFalse }, + { "+treedepth", 1L, DeprecateOptionFlag, MagickTrue }, { "-treedepth", 1L, QuantizeInfoOptionFlag, MagickFalse }, - { "+trim", 0L, DeprecateOptionFlag, MagickFalse }, + { "+trim", 0L, DeprecateOptionFlag, MagickTrue }, { "-trim", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+type", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "-type", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, - { "+undercolor", 0L, ImageInfoOptionFlag, MagickFalse }, + { "+undercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, { "-undercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse }, - { "+unique", 0L, DeprecateOptionFlag, MagickFalse }, + { "+unique", 0L, DeprecateOptionFlag, MagickTrue }, { "-unique", 0L, ImageInfoOptionFlag, MagickFalse }, - { "+unique-colors", 0L, DeprecateOptionFlag, MagickFalse }, + { "+unique-colors", 0L, DeprecateOptionFlag, MagickTrue }, { "-unique-colors", 0L, SimpleOperatorOptionFlag, MagickFalse }, { "+units", 0L, ImageInfoOptionFlag, MagickFalse }, { "-units", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+unsharp", 1L, DeprecateOptionFlag, MagickFalse }, + { "+unsharp", 1L, DeprecateOptionFlag, MagickTrue }, { "-unsharp", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+update", 0L, NonConvertOptionFlag, MagickFalse }, { "-update", 1L, NonConvertOptionFlag, MagickFalse }, @@ -698,7 +702,7 @@ static const OptionInfo { "-version", 1L, SpecialOperatorOptionFlag, MagickFalse }, { "+view", 0L, ImageInfoOptionFlag, MagickFalse }, { "-view", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+vignette", 1L, DeprecateOptionFlag, MagickFalse }, + { "+vignette", 1L, DeprecateOptionFlag, MagickTrue }, { "-vignette", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+virtual-pixel", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, { "-virtual-pixel", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse }, @@ -706,13 +710,13 @@ static const OptionInfo { "-visual", 1L, NonConvertOptionFlag, MagickFalse }, { "+watermark", 0L, NonConvertOptionFlag, MagickFalse }, { "-watermark", 1L, NonConvertOptionFlag, MagickFalse }, - { "+wave", 1L, DeprecateOptionFlag, MagickFalse }, + { "+wave", 1L, DeprecateOptionFlag, MagickTrue }, { "-wave", 1L, SimpleOperatorOptionFlag, MagickFalse }, - { "+weight", 1L, DeprecateOptionFlag, MagickFalse }, + { "+weight", 1L, DeprecateOptionFlag, MagickTrue }, { "-weight", 1L, DrawInfoOptionFlag, MagickFalse }, { "+white-point", 0L, ImageInfoOptionFlag, MagickFalse }, { "-white-point", 1L, ImageInfoOptionFlag, MagickFalse }, - { "+white-threshold", 1L, DeprecateOptionFlag, MagickFalse }, + { "+white-threshold", 1L, DeprecateOptionFlag, MagickTrue }, { "-white-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse }, { "+window", 0L, NonConvertOptionFlag, MagickFalse }, { "-window", 1L, NonConvertOptionFlag, MagickFalse }, @@ -1633,7 +1637,7 @@ MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DefineImageOption() associates an assignment string of the form -% "key=value" with an image option. +% "key=value" with an image option. It is equivelent to SetImageOption(). % % The format of the DefineImageOption method is: % @@ -2553,7 +2557,7 @@ MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info, if (LocaleCompare(option,"size") == 0) (void) CloneString(&image_info->size,value); - /* create tree if needed */ + /* create tree if needed - specify how key,values are to be freed */ if (image_info->options == (void *) NULL) image_info->options=NewSplayTree(CompareSplayTreeString, RelinquishMagickMemory,RelinquishMagickMemory); diff --git a/MagickCore/option.h b/MagickCore/option.h index 47bd977d5..83ed5f8e5 100644 --- a/MagickCore/option.h +++ b/MagickCore/option.h @@ -143,7 +143,7 @@ typedef enum NonConvertOptionFlag = 0x4000, /* Option not used by Convert */ DeprecateOptionFlag = 0x8000, /* Deprecate option, give warning */ - SettingInfoOption = 0x001F /* one of the setting options */ + SettingInfoOption = 0x001F /* mask for all setting options */ } CommandOptionFlags; extern MagickExport char diff --git a/MagickCore/property.c b/MagickCore/property.c index 26568ec2f..4c727b7db 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -2385,6 +2385,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info, } if (LocaleNCompare("scene",property,5) == 0) { + /* FUTURE: I am not certain this properity return makes sense! */ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double) image->scene); if (image_info->number_scenes != 0) diff --git a/MagickCore/quantize.h b/MagickCore/quantize.h index bb53c4ef9..479cb7d85 100644 --- a/MagickCore/quantize.h +++ b/MagickCore/quantize.h @@ -35,7 +35,7 @@ typedef enum typedef struct _QuantizeInfo { size_t - number_colors; + number_colors; /* desired maximum number of colors */ size_t tree_depth; diff --git a/MagickCore/splay-tree.c b/MagickCore/splay-tree.c index 23c531c0b..c54f21bdc 100644 --- a/MagickCore/splay-tree.c +++ b/MagickCore/splay-tree.c @@ -131,7 +131,8 @@ static void % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% AddValueToSplayTree() adds a value to the splay-tree. +% AddValueToSplayTree() adds the given key and value to the splay-tree. +% The both key and value is used as is, without coping or cloning. % % The format of the AddValueToSplayTree method is: % diff --git a/MagickCore/string.c b/MagickCore/string.c index f5f7cce99..2a949a707 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -236,6 +236,12 @@ MagickExport StringInfo *BlobToStringInfo(const void *blob,const size_t length) % CloneString() allocates memory for the destination string and copies % the source string to that memory location. % +% If source is a NULL pointer the destination will also be set to a NULL +% point (any existing string is freed). Otherwise the memory is allocated +% (or resized) and the source string copied into it. +% +% A pointer to the copy of the source string, or NULL is returned. +% % The format of the CloneString method is: % % char *CloneString(char **destination,const char *source) diff --git a/MagickCore/version.h b/MagickCore/version.h index fc32b0f4e..d5977e23f 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -34,7 +34,7 @@ extern "C" { #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2012-01-12" +#define MagickReleaseDate "2012-01-17" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/MagickWand/ChangeLog b/MagickWand/ChangeLog index cf404f6c2..3a3da83c6 100644 --- a/MagickWand/ChangeLog +++ b/MagickWand/ChangeLog @@ -1,7 +1,7 @@ 2011-10-04 7.0.0-0 Anthony * Rename adjust handling of wand iteration flags to be more logical * Remove initialization of unused "quantize_info" in wand - * Wand elements "quantize_info" and "draw_info" for CLI use only + * Wand elements "quantize_info" and "draw_info" added for CLI use only 2011-09-21 7.0.0-0 Anthony * new module "operator.c" which will holds the standard CLI options diff --git a/MagickWand/operation.c b/MagickWand/operation.c index a133773ff..dd2ed43bb 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -43,14 +43,13 @@ % % Anthony Thyssen, Sept 2011 */ -#if 0 /* Include declarations. */ #include "MagickWand/studio.h" #include "MagickWand/MagickWand.h" -#include "MagickWand/mogrify-private.h" +#include "MagickWand/magick-wand-private.h" #include "MagickCore/monitor-private.h" #include "MagickCore/thread-private.h" #include "MagickCore/string-private.h" @@ -64,8 +63,8 @@ */ static const char BackgroundColor[] = "#fff", /* white */ - BorderColor[] = "#dfdfdf", /* gray */ - MatteColor[] = "#bdbdbd"; /* gray */ + BorderColor[] = "#dfdfdf", /* sRGB gray */ + MatteColor[] = "#bdbdbd"; /* slightly darker gray */ /* ** Function to report on the progress of image operations @@ -375,27 +374,26 @@ static Image *SparseColorOption(const Image *image, % % % % % % -+ A p p l y S e t t i n g O p t i o n % ++ A p p l y S e t t i n g I n f o O p t i o n % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% ApplySettingOption() applies a single settings option into a CLI wand +% ApplySettingInfoOption() applies a single settings option into a CLI wand % holding the image_info, draw_info, quantize_info structures that will be % later used when processing images. % % These options do no require images to be present in the wand for them to be -% able to be set. That is they may be used without any image in memory. +% able to be set, in which case they will be applied to % % Options handled by this function are listed in CommandOptions[] of -% "option.c" that is one of "SettingInfoOption" option flags. +% "option.c" that is one of "ApplySettingInfoOption" option flags. % % The format of the ApplySettingOption method is: % -% MagickBooleanType ApplySettingOption(MagickWand *wand, -% const char *option, const MagickBooleanType set_option, const char -% **args, ExceptionInfo *exception) +% MagickBooleanType ApplySettingInfoOption(MagickWand *wand, +% const char *option, const char *arg, ExceptionInfo *exception) % % A description of each parameter follows: % @@ -403,31 +401,35 @@ static Image *SparseColorOption(const Image *image, % % o option: The option string to be set % -% o set_option: is the option being set (-), or reset (+) to some default -% -% o arg: the single argument (if needed) to set this option. +% o arg: The single argument used to set this option. +% If NULL the setting is reset to its default value. +% For boolean (no argument) settings NULL=false, any_string=true % % o exception: return any errors or warnings in this structure. % % -% Example usage (FUTURE) +% Example usage... +% +% ApplySettingInfoOption(wand, "background", MagickTrue, "Red", exception); +% ApplySettingInfoOption(wand, "adjoin", "true", exception); +% ApplySettingInfoOption(wand, "adjoin", NULL, exception); +% +% Or for handling command line arguments EG: +/-option ["arg"] % % argc,argv % i=index in argv % % count=ParseCommandOption(MagickCommandOptions,MagickFalse,argv[i]); % flags=GetCommandOptionFlags(MagickCommandOptions,MagickFalse,argv[i]); -% if ( flags == MagickCommandOptions ) +% if ( (flags & SettingInfoOption) != 0 ) % ApplySettingsOption(wand, argv[i]+1, -% (*argv[i])=='-' ? MagickTrue : MagickFalse, -% (count>0)? argv[i+1]:(char *)NULL, -% exception); +% (((*argv[i])!='-') ? (char *)NULL : (count>0) ? argv[i+1] : "true"), +% exception); % i += count+1; % */ -WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, - const char *option, const MagickBooleanType set_option, const char *arg, - ExceptionInfo *exception) +WandExport MagickBooleanType ApplySettingInfoOption(MagickWand *wand, + const char *option, const char *arg, ExceptionInfo *exception) { assert(wand != (MagickWand *) NULL); assert(wand->signature == WandSignature); @@ -435,11 +437,12 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); -#define image_info (wand->image_info) -#define draw_info (wand->draw_info) -#define quantize_info (wand->quantize_info) -#define IfSetOption (set_option != MagickFalse) -#define IfArgOption (IfSetOption?arg:(char *)NULL) +#define image_info (wand->image_info) +#define draw_info (wand->draw_info) +#define quantize_info (wand->quantize_info) +#define IfSetOption (arg!=(char *)NULL) +#define ArgOption(def) (IfSetOption?arg:(const char *)(def)) +#define ArgBoolean (IfSetOption?MagickTrue:MagickFalse) switch (*option) { @@ -447,28 +450,28 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("adjoin",option) == 0) { - image_info->adjoin = set_option; + image_info->adjoin = ArgBoolean; break; } if (LocaleCompare("affine",option) == 0) { /* draw_info setting only */ if (IfSetOption) - (void) ParseAffineGeometry(arg,draw_info->affine,exception); + (void) ParseAffineGeometry(arg,&draw_info->affine,exception); else - GetAffineMatrix(draw_info->affine); + GetAffineMatrix(&draw_info->affine); break; } if (LocaleCompare("antialias",option) == 0) { image_info->antialias = - draw_info->stroke_antialias = - draw_info->text_antialias = set_option; + draw_info->stroke_antialias = + draw_info->text_antialias = ArgBoolean; break; } if (LocaleCompare("authenticate",option) == 0) { - (void) SetImageOption(image_info,option,IfArgOption); + (void) SetImageOption(image_info,option,ArgOption(NULL)); break; } break; @@ -478,20 +481,17 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (LocaleCompare("background",option) == 0) { /* FUTURE: both image_info attribute & ImageOption in use! - image_info only used for generating new images. - Note that +background, means fall-back to image - attribute so ImageOption is deleted, not set to a default. + image_info only used directly for generating new images. + SyncImageSettings() used to set per-image attribute. + + FUTURE: if image_info->background_color is not set then + we should fall back to image + Note that +background, means fall-back to image background + and only if not set fall back to BackgroundColor const. */ - if (IfSetOption) - { - (void) SetImageOption(image_info,option,arg); - (void) QueryColorCompliance(arg,AllCompliance, - image_info->background_color,exception); - break; - } - (void) DeleteImageOption(image_info,option); - (void) QueryColorCompliance("none",AllCompliance, - image_info->background_color,exception); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + (void) QueryColorCompliance(ArgOption(BackgroundColor),AllCompliance, + &image_info->background_color,exception); break; } if (LocaleCompare("bias",option) == 0) @@ -499,14 +499,17 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, /* FUTURE: bias OBSOLETED, replaced by "convolve:bias" as it is actually rarely used except in direct convolve Usage outside direct convolve is actally non-sensible! + + SyncImageSettings() used to set per-image attribute. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0"); + (void) SetImageOption(image_info,option,ArgOption("0")); break; } if (LocaleCompare("black-point-compensation",option) == 0) { - /* Used as a image chromaticity setting */ + /* Used as a image chromaticity setting + SyncImageSettings() used to set per-image attribute. + */ (void) SetImageOption(image_info,option, IfSetOption ? "true" : "false" ); break; @@ -515,18 +518,20 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { /* Image chromaticity X,Y NB: Y=X if Y not defined Used by many coders including PNG + SyncImageSettings() used to set per-image attribute. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0" ); + (void) SetImageOption(image_info,option,ArgOption("0.0")); break; } if (LocaleCompare("bordercolor",option) == 0) { - /* FUTURE: both image_info attribute & ImageOption in use! */ + /* FUTURE: both image_info attribute & ImageOption in use! + SyncImageSettings() used to set per-image attribute. + */ if (IfSetOption) { (void) SetImageOption(image_info,option,arg); - (void) QueryColorCompliance(arg,AllCompliece, + (void) QueryColorCompliance(arg,AllCompliance, &image_info->border_color,exception); (void) QueryColorCompliance(arg,AllCompliance, &draw_info->border_color,exception); @@ -541,13 +546,8 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("box",option) == 0) { - /* Only used to set draw_info for text drawing */ - const char - *value = IfSetOption ? arg : "none"; - (void) SetImageOption(image_info,option,value); - (void) QueryColorCompliance(value,AllCompliance, - &draw_info->undercolor,exception); - break; + /* Depreciated - now "undercolor" */ + return(ApplySettingInfoOption(wand,"undercolor",arg,exception)); } break; } @@ -567,16 +567,14 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("caption",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (const char*)NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); break; } if (LocaleCompare("channel",option) == 0) { - /* FUTURE: This is also a SimpleImageOperator!!! */ + /* This is applied to images in SimpleImageOperator!!! */ image_info->channel=(ChannelType) ( IfSetOption ? ParseChannelOption(arg) : DefaultChannels ); - /* This is also a SimpleImageOperator */ break; } if (LocaleCompare("colorspace",option) == 0) @@ -585,49 +583,44 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, But also used as a SimpleImageOperator Undefined colorspace means don't modify images on read or as a operation */ - image_info->colorspace=UndefinedColorspace; - if (IfSetOption) - image_info->colorspace=(ColorspaceType) ParseCommandOption( - MagickColorspaceOptions,MagickFalse,arg) + image_info->colorspace=(ColorspaceType) ParseCommandOption( + MagickColorspaceOptions,MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("comment",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (const char*)NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); break; } if (LocaleCompare("compose",option) == 0) { - /* FUTURE: image_info should be used, but Option kept escapes + /* FUTURE: image_info should be used, + SyncImageSettings() used to set per-image attribute. - REMOVE + This setting should NOT be used to set image 'compose' - which is used by "-layer" operators is image_info is undefined + "-layer" operators shoud use image_info if defined otherwise + they should use a per-image compose setting. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (const char*)NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); image_info->compose=(CompositeOperator) ParseCommandOption( - MagickComposeOptions,MagickFalse, - IfSetOption ? arg : "undefined"); + MagickComposeOptions,MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("compress",option) == 0) { /* FUTURE: What should be used? image_info or ImageOption ??? The former is more efficent, but Crisy prefers the latter! + SyncImageSettings() used to set per-image attribute. The coders appears to use image_info, not Image_Option however the image attribute (for save) is set from the ImageOption! + + Note that "undefined" is a different setting to "none". */ - if (IfSetOption) - { - image_info->compression=(CompressionType) ParseCommandOption( - MagickCompressOptions,MagickFalse,arg); - (void) SetImageOption(image_info,option,arg); - break; - } - image_info->compression=UndefinedCompression; - (void) SetImageOption(image_info,option,"undefined"); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + image_info->compression=(CompressionType) ParseCommandOption( + MagickCompressOptions,MagickFalse,ArgOption("undefined")); break; } break; @@ -636,16 +629,17 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("debug",option) == 0) { - if (IfSetOption) - (void) SetLogEventMask(IfSetOption?arg:"none"); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetLogEventMask(ArgOption("none")); image_info->debug=IsEventLogging(); /* extract logging*/ wand->debug=IsEventLogging(); break; } if (LocaleCompare("define",option) == 0) { - /* FUTURE both -set and -define sets ImageOption - But differs in that -set tries to set image properity (attributes) + /* DefineImageOption() equals SetImageOption() but with '=' + It does not however set individual image options. + -set will set individual image options as well! */ if (LocaleNCompare(arg,"registry:",9) == 0) { @@ -653,13 +647,13 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, (void) DefineImageRegistry(StringRegistryType,arg+9, exception); else - (void) DefineImageOption(image_info,arg,exception); + (void) DeleteImageRegistry(arg+9); break; } if (IfSetOption) - (void) DefineImageOption(image_info,arg,exception); + (void) DefineImageOption(image_info,arg); else - (void) DeleteImageOption(image_info,arg,exception); + (void) DeleteImageOption(image_info,arg); break; } if (LocaleCompare("delay",option) == 0) @@ -667,31 +661,26 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, /* Only used for new images via AcquireImage() FUTURE: Option should also be used for "-morph" (color morphing) */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0"); + (void) SetImageOption(image_info,option,ArgOption("0")); break; } if (LocaleCompare("density",option) == 0) { - /* FUTURE: string in image_info - moved into Option ??? */ - /* Used by both draw_info and in images via SyncImageSettings() */ - if (IfSetOption) - { - (void) CloneString(&image_info->density,arg); - (void) CloneString(&draw_info->density,arg); - (void) SetImageOption(image_info,option,arg); - break; - } - if (image_info->density != (char *) NULL) - image_info->density=DestroyString(image_info->density); - if (draw_info->density != (char *) NULL) - draw_info->density=DestroyString(draw_info->density); - (void) SetImageOption(image_info,option,"72"); + /* FUTURE: strings used in image_info attr and draw_info! + Basically as density can be in a XxY form! + + SyncImageSettings() used to set per-image attribute. + */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); + (void) CloneString(&image_info->density,ArgOption(NULL)); + (void) CloneString(&draw_info->density,image_info->density); break; } if (LocaleCompare("depth",option) == 0) { - /* This is also a SimpleImageOperator! to set depth across images */ + /* This is also a SimpleImageOperator! for 8->16 vaule trunc !!!! + SyncImageSettings() used to set per-image attribute. + */ image_info->depth=IfSetOption?StringToUnsignedLong(arg) :MAGICKCORE_QUANTUM_DEPTH; break; @@ -699,38 +688,36 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (LocaleCompare("direction",option) == 0) { /* Image Option is only used to set draw_info */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "undefined"); + (void) SetImageOption(image_info,option,ArgOption("undefined")); draw_info->direction=(DirectionType) ParseCommandOption( MagickDirectionOptions,MagickFalse, - IfSetOption ? arg : "undefined"); + ArgOption("undefined")); break; } if (LocaleCompare("display",option) == 0) { - /* FUTURE: string in image_info - moved into Option ??? */ - (void) CloneString(&image_info->server_name, - IfSetOption ? arg :(char *) NULL); + (void) CloneString(&image_info->server_name,ArgOption(NULL)); + (void) CloneString(&draw_info->server_name,image_info->server_name); break; } if (LocaleCompare("dispose",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "undefined"); + /* only used in setting new images */ + (void) SetImageOption(image_info,option,ArgOption("undefined")); break; } if (LocaleCompare("dither",option) == 0) { - /* FUTURE: merge all options to just Option and quantize_info! */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "none"); - image_info->dither = quantize_info->dither = - IfSetOption ? MagickTrue : MagickFalse; + /* image_info attr (on/off), quantize_info attr (on/off) + but also ImageInfo and quantize_info method! + FUTURE: merge the duality of the dithering options + */ + image_info->dither = quantize_info->dither = ArgBoolean; + (void) SetImageOption(image_info,option,ArgOption("none")); quantize_info->dither_method=(DitherMethod) ParseCommandOption( - MagickDitherOptions,MagickFalse, - IfSetOption ? arg : "none"); + MagickDitherOptions,MagickFalse,ArgOption("none")); if (quantize_info->dither_method == NoDitherMethod) - image_info->dither = quantize_info->dither = MagickFalse; + image_info->dither = quantize_info->dither = MagickFalse; break; } break; @@ -739,74 +726,71 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("encoding",option) == 0) { - (void) CloneString(&draw_info->encoding, - IfSetOption ? arg : "undefined"); - (void) SetImageOption(image_info,option,&draw_info->encoding); + (void) CloneString(&draw_info->encoding,ArgOption("undefined")); + (void) SetImageOption(image_info,option,draw_info->encoding); break; } if (LocaleCompare("endian",option) == 0) { - const char - value; - - value=IfSetOption?arg:"undefined"; - (void) SetImageOption(image_info,option,value); + /* Both image_info attr and ImageInfo */ + (void) SetImageOption(image_info,option,ArgOption("undefined")); image_info->endian=(EndianType) ParseCommandOption( - MagickEndianOptions,MagickFalse,value); + MagickEndianOptions,MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("extract",option) == 0) { - (void) CloneString(&image_info->extract, - IfSetOption?arg:(const char *) NULL); + (void) CloneString(&image_info->extract,ArgOption(NULL)); break; } break; } case 'f': { - if (LocaleCompare("family",argv[0]+1) == 0) + if (LocaleCompare("family",option) == 0) { - (void) CloneString(&draw_info->family, - IfSetOption ? arg : (const char *) NULL); + (void) CloneString(&draw_info->family,ArgOption(NULL)); break; } if (LocaleCompare("fill",option) == 0) { - /* set fill OR a fill-pattern + /* set "fill" OR "fill-pattern" color is only used by draw_info - but draw_info is only initialsed using the color not the pattern + warning draw_info is only initialsed using the color + and not any pattern that was provided! */ const char - value; + *value; + + MagickBooleanType + status; ExceptionInfo *sans; - value = IfSetOption ? arg : "none"; + value = ArgOption("none"); (void) SetImageOption(image_info,option,value); + if (draw_info->fill_pattern != (Image *) NULL) + draw_info->fill_pattern=DestroyImage(draw_info->fill_pattern); + /* is it a color or a image? -- ignore exceptions */ sans=AcquireExceptionInfo(); - status=QueryColorCompliance(value,AllCompliance,&draw_info->fill,sans); + status=QueryColorCompliance(value,AllCompliance,&draw_info->fill, + sans); sans=DestroyExceptionInfo(sans); - - if (draw_info->fill_pattern != (Image *) NULL) - draw_info->fill_pattern=DestroyImage(draw_info->fill_pattern); if (status == MagickFalse) - draw_info->fill_pattern=GetImageCache(image_info,value, - exception); + draw_info->fill_pattern=GetImageCache(image_info,value,exception); break; } if (LocaleCompare("filter",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "undefined"); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetImageOption(image_info,option,ArgOption("undefined")); break; } if (LocaleCompare("font",option) == 0) { - (void) CloneString(&draw_info->font, - IfSetOption ? arg : (const char *) NULL); + (void) CloneString(&draw_info->font,ArgOption(NULL)); (void) CloneString(&image_info->font,draw_info->font); break; } @@ -821,17 +805,16 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (strchr("Agkrz@[#",*(q+1)) != (char *) NULL) image_info->ping=MagickFalse; */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (const char *) NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); break; } if (LocaleCompare("fuzz",option) == 0) { - /* FUTURE: image_info and ImageOption! - Option used to set image fuzz! unless blank canvas (from color) + /* Option used to set image fuzz! unless blank canvas (from color) Image attribute used for color compare operations - image->fuzz is being set by SyncImageSettings() - Can't find anything using image_info->fuzz (except cloning)! + SyncImageSettings() used to set per-image attribute. + + Can't find anything else using image_info->fuzz directly! */ if (IfSetOption) { @@ -850,23 +833,19 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("gravity",option) == 0) { - /* FUTURE gravity also set in image via SyncImageSettings() */ - const char - value; - - value = IfSetOption ? arg : "none"; - (void) SetImageOption(image_info,option,value); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetImageOption(image_info,option,ArgOption("none")); draw_info->gravity=(GravityType) ParseCommandOption( - MagickGravityOptions,MagickFalse,value); + MagickGravityOptions,MagickFalse,ArgOption("none")); break; } if (LocaleCompare("green-primary",option) == 0) { /* Image chromaticity X,Y NB: Y=X if Y not defined - Used by many coders + SyncImageSettings() used to set per-image attribute. + Used directly by many coders */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0.0"); + (void) SetImageOption(image_info,option,ArgOption("0.0")); break; } break; @@ -875,57 +854,42 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("intent",option) == 0) { - /* FUTURE: sets image->rendering_intent in SyncImagesSettings - Which is only used by coders: MIFF, MPC, BMP, PNG + /* Only used by coders: MIFF, MPC, BMP, PNG and for image profile call to AcquireTransformThreadSet() + SyncImageSettings() used to set per-image attribute. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "undefined"); + (void) SetImageOption(image_info,option,ArgOption("undefined")); break; } if (LocaleCompare("interlace",option) == 0) { - /* sets image attibute interlace via SyncImageSettings() - Also image_info is directly used by coders + /* image_info is directly used by coders (so why an image setting?) + SyncImageSettings() used to set per-image attribute. */ - const char - value; - - value = IfSetOption ? arg : "undefined"; - (void) SetImageOption(image_info,option, value); + (void) SetImageOption(image_info,option,ArgOption("undefined")); image_info->interlace=(InterlaceType) ParseCommandOption( - MagickInterlaceOptions,MagickFalse,arg); - (void) SetImageOption(image_info,option,arg); + MagickInterlaceOptions,MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("interline-spacing",option) == 0) { - const char - value; - - value = IfSetOption ? arg : "0"; /* undefined? */ - (void) SetImageOption(image_info,option, value); - draw_info->interline_spacing=StringToDouble(value,(char **) NULL); + (void) SetImageOption(image_info,option, ArgOption(NULL)); + draw_info->interline_spacing=StringToDouble(ArgOption("0"), + (char **) NULL); break; } if (LocaleCompare("interpolate",option) == 0) { - /* FUTURE: sets image interpolate value via SyncImageSettings() - It is NOT used by coders, only in image processing, - so shoud really be a image_info attribute. + /* Not used by coders, only in image processing, + SyncImageSettings() used to set per-image attribute. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "undefined"); + (void) SetImageOption(image_info,option,ArgOption("undefined")); break; } if (LocaleCompare("interword-spacing",option) == 0) { - const char - value; - - value = IfSetOption ? arg : "0"; /* undefined? */ - (void) SetImageOption(image_info,option, value); - draw_info->interword_spacing=StringToDouble(value,(char **) NULL); + (void) SetImageOption(image_info,option, ArgOption(NULL)); + draw_info->interword_spacing=StringToDouble(ArgOption("0"),(char **) NULL); break; } break; @@ -934,12 +898,8 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("kerning",option) == 0) { - const char - value; - - value = IfSetOption ? arg : "0"; /* undefined? */ - (void) SetImageOption(image_info,option, value); - draw_info->kerning=StringToDouble(value,(char **) NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + draw_info->kerning=StringToDouble(ArgOption("0"),(char **) NULL); break; } break; @@ -948,28 +908,15 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("label",option) == 0) { - /* only used for new images */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (char *)NULL); + /* only used for new images - not in SyncImageOptions() */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); break; } - if (LocaleCompare("limit",option) == 0) + if (LocaleCompare("linewidth",option) == 0) { - MagickSizeType - limit; - - ResourceType - type; - - if (!IfSetOption) - break; - type=(ResourceType) ParseCommandOption(MagickResourceOptions, - MagickFalse,arg); - limit=MagickResourceInfinity; - if (LocaleCompare("unlimited",argv[2]) != 0) - limit=(MagickSizeType) SiPrefixToDoubleInterval(argv[2], - 100.0); - (void) SetMagickResourceLimit(type,limit); + /* depreciated */ + (void) SetImageOption(image_info,"strokewidth",ArgOption(NULL)); + draw_info->stroke_width=StringToDouble(ArgOption("1.0"),(char **)NULL); break; } if (LocaleCompare("list",option) == 0) @@ -977,7 +924,8 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, ssize_t list; - list=ParseCommandOption(MagickListOptions,MagickFalse,arg); + list=ParseCommandOption(MagickListOptions,MagickFalse, + ArgOption("list")); switch (list) { case MagickCoderOptions: @@ -1067,37 +1015,20 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("loop",option) == 0) { - /* Sets image attibutes iterations via SyncImageSettings() */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0"); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetImageOption(image_info,option,ArgOption("0")); break; } break; } case 'm': { - if (LocaleCompare("matte",option) == 0) - { - if (*argv[0] == '+') - { - (void) SetImageOption(image_info,option,"false"); - break; - } - (void) SetImageOption(image_info,option,"true"); - break; - } if (LocaleCompare("mattecolor",option) == 0) { - if (*argv[0] == '+') - { - (void) SetImageOption(image_info,option,arg); - (void) QueryColorCompliance(MatteColor,AllCompliance, - &image_info->matte_color,exception); - break; - } - (void) SetImageOption(image_info,option,arg); - (void) QueryColorCompliance(arg,AllCompliance,&image_info->matte_color, - exception); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); + (void) QueryColorCompliance(ArgOption(MatteColor),AllCompliance, + &image_info->matte_color,exception); break; } if (LocaleCompare("monitor",option) == 0) @@ -1108,8 +1039,10 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("monochrome",option) == 0) { - /* Setting (for input coders) and a 'type' operation */ - image_info->monochrome=IfSetOption ? MagickTrue : MagickFalse; + /* Setting (for some input coders) + But also a special 'type' operator + */ + image_info->monochrome= ArgBoolean; break; } break; @@ -1118,17 +1051,14 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("orient",option) == 0) { - /* Sets image attribute orientation via SyncImageSettings() - Is not used when defining for new images. + /* Is not used when defining for new images. This makes it more of a 'operation' than a setting + FUTURE: make set meta-data operator instead. + SyncImageSettings() used to set per-image attribute. */ - const char - value; - - value = IfSetOption ? arg : "undefined"; - (void) SetImageOption(image_info,option, value); + (void) SetImageOption(image_info,option, ArgOption(NULL)); image_info->orientation=(InterlaceType) ParseCommandOption( - MagickOrientationOptions,MagickFalse,value); + MagickOrientationOptions,MagickFalse,ArgOption("undefined")); break; } } @@ -1136,7 +1066,10 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("page",option) == 0) { - /* Only used for new images and image generators */ + /* Only used for new images and image generators + SyncImageSettings() used to set per-image attribute. ????? + That last is WRONG!!!! + */ char *canonical_page, page[MaxTextExtent]; @@ -1175,22 +1108,18 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("ping",option) == 0) { - image_info->ping= IfSetOption ? MagickTrue : MagickFalse; + image_info->ping = ArgBoolean; break; } if (LocaleCompare("pointsize",option) == 0) { - double - value=12.0; - - if (IfSetOption) - StringToDouble(arg,(char **) NULL); - image_info->pointsize=draw_info->pointsize=value; + image_info->pointsize=draw_info->pointsize= + StringToDouble(ArgOption("12"),(char **) NULL); break; } if (LocaleCompare("precision",option) == 0) { - (void) SetMagickPrecision(StringToInteger(arg)); + (void) SetMagickPrecision(StringToInteger(ArgOption("-1"))); break; } /* FUTURE: Only the 'preview' coder appears to use this @@ -1210,19 +1139,15 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("quality",option) == 0) { - if (IfSetOption) - { - image_info->quality=StringToUnsignedLong(arg); - (void) SetImageOption(image_info,option,arg); - break; - } + (void) SetImageOption(image_info,option,ArgOption(NULL)); image_info->quality=UndefinedCompressionQuality; - (void) SetImageOption(image_info,option,"0"); + if (IfSetOption) + image_info->quality=StringToUnsignedLong(arg); break; } if (LocaleCompare("quantize",option) == 0) { - /* no image_info setting! Only set direct in quantize_info */ + /* Just a set direct in quantize_info */ quantize_info->colorspace=UndefinedColorspace; if (IfSetOption) quantize_info->colorspace=(ColorspaceType) ParseCommandOption( @@ -1234,6 +1159,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, /* FUTURE: if two -quiet is performed you can not do +quiet! */ static WarningHandler warning_handler = (WarningHandler) NULL; + WarningHandler tmp = SetWarningHandler((WarningHandler) NULL); @@ -1251,9 +1177,9 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { /* Image chromaticity X,Y NB: Y=X if Y not defined Used by many coders + SyncImageSettings() used to set per-image attribute. */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0" ); + (void) SetImageOption(image_info,option,ArgOption("0.0")); break; } if (LocaleCompare("render",option) == 0) @@ -1269,17 +1195,16 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (LocaleCompare("sampling-factor",option) == 0) { /* FUTURE: should be converted to jpeg:sampling_factor */ - (void) CloneString(&image_info->sampling_factor, - IfSetOption ? arg : (char *) NULL); + (void) CloneString(&image_info->sampling_factor,ArgOption(NULL)); break; } if (LocaleCompare("scene",option) == 0) { - char - *value = IfSetOption ? arg : "0"; - - (void) SetImageOption(image_info,option,value); - image_info->scene=StringToUnsignedLong(value); + /* SyncImageSettings() used to set per-image attribute. + What ??? Why ???? + */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); + image_info->scene=StringToUnsignedLong(ArgOption("0")); break; } if (LocaleCompare("seed",option) == 0) @@ -1294,63 +1219,62 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, /* FUTURE: string in image_info -- convert to Option ??? Look at the special handling for "size" in SetImageOption() */ - (void) CloneString(&image_info->size, - IfSetOption ? arg : (char *) NULL); + (void) CloneString(&image_info->size,ArgOption(NULL)); break; } if (LocaleCompare("stretch",option) == 0) { - draw_info->stretch=UndefinedStretch; - if (IfSetOption) - draw_info->stretch=(StretchType) ParseCommandOption( - MagickStretchOptions,MagickFalse,arg); + draw_info->stretch=(StretchType) ParseCommandOption( + MagickStretchOptions,MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("stroke",option) == 0) { /* set stroke color OR stroke-pattern color is only used by draw_info - but draw_info is only initialsed using the color not the pattern + but draw_info is only initialised using the color not the pattern */ const char - *value = IfSetOption ? arg : "none"; + *value; + + MagickBooleanType + status; ExceptionInfo *sans; + value = ArgOption("none"); (void) SetImageOption(image_info,option,value); + if (draw_info->stroke_pattern != (Image *) NULL) + draw_info->stroke_pattern=DestroyImage(draw_info->stroke_pattern); + + /* is it a color or a image? -- ignore exceptions */ sans=AcquireExceptionInfo(); status=QueryColorCompliance(value,AllCompliance,&draw_info->stroke, sans); sans=DestroyExceptionInfo(sans); - - if (draw_info->stroke_pattern != (Image *) NULL) - draw_info->stroke_pattern=DestroyImage(draw_info->stroke_pattern); if (status == MagickFalse) draw_info->stroke_pattern=GetImageCache(image_info,value, - exception); + exception); break; } if (LocaleCompare("strokewidth",option) == 0) { - const char - *value = IfSetOption ? arg : "1.0"; - (void) SetImageOption(image_info,option,value); - draw_info->stroke_width=StringToDouble(value,(char **) NULL); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + draw_info->stroke_width=StringToDouble(ArgOption("1.0"), + (char **) NULL); break; } if (LocaleCompare("style",option) == 0) { - draw_info->style=UndefinedStyle; - if (IfSetOption) - draw_info->style=(StyleType) ParseCommandOption(MagickStyleOptions, - MagickFalse,arg); + draw_info->style=(StyleType) ParseCommandOption(MagickStyleOptions, + MagickFalse,ArgOption("undefined")); break; } if (LocaleCompare("synchronize",option) == 0) { - image_info->synchronize=IfSetOption ? MagickTrue : MagickFalse; + image_info->synchronize = ArgBoolean; break; } break; @@ -1359,6 +1283,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("taint",option) == 0) { + /* SyncImageSettings() used to set per-image attribute. */ (void) SetImageOption(image_info,option, IfSetOption ? "true" : "false"); break; @@ -1366,50 +1291,42 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, if (LocaleCompare("texture",option) == 0) { /* FUTURE: move image_info string to option splay-tree */ - (void) CloneString(&image_info->texture, - IfSetOption ? arg : (char *) NULL); + (void) CloneString(&image_info->texture,ArgOption(NULL)); break; } if (LocaleCompare("tile",option) == 0) { - draw_info->fill_pattern=DestroyImage(draw_info->fill_pattern); - if (IfSetOption) - draw_info->fill_pattern=GetImageCache(image_info,arg,exception); + draw_info->fill_pattern=IfSetOption + ?GetImageCache(image_info,arg,exception) + :DestroyImage(draw_info->fill_pattern); break; } if (LocaleCompare("tile-offset",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0"); + /* SyncImageSettings() used to set per-image attribute. ??? */ + (void) SetImageOption(image_info,option,ArgOption("0")); break; } if (LocaleCompare("transparent-color",option) == 0) { /* FUTURE: both image_info attribute & ImageOption in use! image_info only used for generating new images. + SyncImageSettings() used to set per-image attribute. + Note that +transparent-color, means fall-back to image attribute so ImageOption is deleted, not set to a default. */ - if (IfSetOption) - { - (void) SetImageOption(image_info,option,arg); - (void) QueryColorCompliance(arg,AllCompliance, - image_info->transparent_color,exception); - break; - } - (void) DeleteImageOption(image_info,option); - (void) QueryColorCompliance("none",AllCompliance, - image_info->transparent_color,exception); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + (void) QueryColorCompliance(ArgOption("none"),AllCompliance, + &image_info->transparent_color,exception); break; } if (LocaleCompare("type",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (char) NULL); - image_info->type=UndefinedType; - if (IfSetOption) - image_info->type=(ImageType) ParseCommandOption(MagickTypeOptions, - MagickFalse,arg); + /* SyncImageSettings() used to set per-image attribute. */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); + image_info->type=(ImageType) ParseCommandOption(MagickTypeOptions, + MagickFalse,ArgOption("undefined")); break; } break; @@ -1418,23 +1335,20 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("undercolor",option) == 0) { - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (char) NULL); - (void) QueryColorCompliance(arg,AllCompliance, - draw_info->undercolor,exception); + (void) SetImageOption(image_info,option,ArgOption(NULL)); + (void) QueryColorCompliance(ArgOption("none"),AllCompliance, + &draw_info->undercolor,exception); break; } if (LocaleCompare("units",option) == 0) { - /* Set in images via SyncImageSettings() */ - /* Should this effect draw_info X and Y resolution? */ - /* FUTURE: this probably should be part of the density setting */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : (char) NULL); - image_info->units=UndefinedResolution; - if (IfSetOption) - image_info->units=(ResolutionType) ParseCommandOption( - MagickResolutionOptions,MagickFalse,arg); + /* SyncImageSettings() used to set per-image attribute. + Should this effect draw_info X and Y resolution? + FUTURE: this probably should be part of the density setting + */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); + image_info->units=(ResolutionType) ParseCommandOption( + MagickResolutionOptions,MagickFalse,ArgOption("undefined")); break; } break; @@ -1446,28 +1360,25 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, /* FUTURE: Also an image artifact, set in Simple Operators. But artifact is only used in verbose output. */ - image_info->verbose= IfSetOption ? MagickTrue : MagickFalse; + image_info->verbose= ArgBoolean; image_info->ping=MagickFalse; /* verbose can't be a ping */ break; } if (LocaleCompare("view",option) == 0) { - /* FUTURE: Convert from image_info to Option + /* FUTURE: Convert from image_info to ImageOption Only used by coder FPX */ - (void) CloneString(&image_info->view, - IfSetOption ? arg : (char) NULL); + (void) CloneString(&image_info->view,ArgOption(NULL)); break; } if (LocaleCompare("virtual-pixel",option) == 0) { - /* Also used as a 'image' option deep in image structure */ - const char - *value = IfSetOption ? arg : "undefined"; - - (void) SetImageOption(image_info,option,value); + /* Also used as a 'image' option very deep in image structure */ + (void) SetImageOption(image_info,option,ArgOption(NULL)); image_info->virtual_pixel_method=(VirtualPixelMethod) - ParseCommandOption(MagickVirtualPixelOptions,MagickFalse,value); + ParseCommandOption(MagickVirtualPixelOptions,MagickFalse, + ArgOption("undefined")); break; } break; @@ -1476,10 +1387,11 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, { if (LocaleCompare("weight",option) == 0) { - /* FUTURE: relative weights not sensical due to first assignment! - Also just what is actually using font 'weight' ??? + /* Just what does using a font 'weight' do ??? There is no "-list weight" output (reference manual says there is) */ + if (!IfSetOption) + break; draw_info->weight=StringToUnsignedLong(arg); if (LocaleCompare(arg,"all") == 0) draw_info->weight=0; @@ -1497,9 +1409,10 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("white-point",option) == 0) { - /* Used as a image chromaticity setting */ - (void) SetImageOption(image_info,option, - IfSetOption ? arg : "0.0" ); + /* Used as a image chromaticity setting + SyncImageSettings() used to set per-image attribute. + */ + (void) SetImageOption(image_info,option,ArgOption("0.0")); break; } break; @@ -1510,18 +1423,19 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, return(MagickTrue); } +#if 0 /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % -+ A p p l y I m a g e O p e r a t o r % ++ A p p l y S i m p l e I m a g e O p e r a t o r % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% ApplyImageOperator() apply one simple image operation to the current +% ApplySimpleImageOperator() apply one simple image operation to the current % image pointed to by the CLI wand, with the settings that are saved in the % CLI wand. % @@ -1529,7 +1443,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, % % * directly modified (EG: -negate, -gamma, -level, -annotate, -draw), % * replaced by a new image (EG: -spread, -resize, -rotate, -morphology) -% * replace by a list of images (-separate and -crop only!) +% * one image replace by a list of images (-separate and -crop only!) % % In each case the result replaces the original image in the list, as well as % the pointer to the modified image (last image added if replaced by a list @@ -1540,9 +1454,9 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, % It is assumed that any per-image settings are up-to-date with respect to % extra settings that have been saved in the wand. % -% The format of the ApplyImageOperator method is: +% The format of the ApplySimpleImageOperator method is: % -% MagickBooleanType ApplyImageOperator(MagickWand *wand, +% MagickBooleanType ApplySimpleImageOperator(MagickWand *wand, % const char *option, const MagickBooleanType set_option, const char % **args, ExceptionInfo *exception) % @@ -1554,7 +1468,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, % % o set_option: is the option being set, or reset to some default % -% o arg: the single argument (if needed) to set this option. +% o args: array of options (typicaly only 1 or 2 options) % % o exception: return any errors or warnings in this structure. % @@ -2131,11 +2045,6 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, new_image=DespeckleImage(*image,exception); break; } - if (LocaleCompare("display",option) == 0) - { - (void) CloneString(&draw_info->server_name,args[0]); - break; - } if (LocaleCompare("distort",option) == 0) { char @@ -2679,12 +2588,6 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, (void) LinearStretchImage(*image,black_point,white_point,exception); break; } - if (LocaleCompare("linewidth",option) == 0) - { - draw_info->stroke_width=StringToDouble(args[0], - (char **) NULL); - break; - } if (LocaleCompare("liquid-rescale",option) == 0) { /* @@ -2753,6 +2656,7 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("matte",option) == 0) { + /* Depreciated */ (void) SetImageAlphaChannel(*image,(*argv[0] == '-') ? SetAlphaChannel : DeactivateAlphaChannel,exception); break; @@ -2791,7 +2695,6 @@ WandExport MagickBooleanType ApplySettingsOption(MagickWand *wand, } if (LocaleCompare("monitor",option) == 0) { - /* FUTURE: Why is this a per-image setting? */ if (*argv[0] == '+') { (void) SetImageProgressMonitor(*image, @@ -3912,18 +3815,6 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info, DeleteImages(images,argv[1],exception); break; } - if (LocaleCompare("dither",argv[0]+1) == 0) - { - if (*argv[0] == '+') - { - quantize_info->dither=MagickFalse; - break; - } - quantize_info->dither=MagickTrue; - quantize_info->dither_method=(DitherMethod) ParseCommandOption( - MagickDitherOptions,MagickFalse,argv[1]); - break; - } if (LocaleCompare("duplicate",argv[0]+1) == 0) { Image @@ -4305,6 +4196,25 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info, *images=layers; break; } + if (LocaleCompare("limit",option) == 0) + { + MagickSizeType + limit; + + ResourceType + type; + + if (!IfSetOption) + break; + type=(ResourceType) ParseCommandOption(MagickResourceOptions, + MagickFalse,arg); + limit=MagickResourceInfinity; + if (LocaleCompare("unlimited",arg[1]) != 0) + limit=(MagickSizeType) SiPrefixToDoubleInterval(argv[2], + 100.0); + (void) SetMagickResourceLimit(type,limit); + break; + } break; } case 'm': @@ -4320,44 +4230,6 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info, } break; } - if (LocaleCompare("maximum",argv[0]+1) == 0) - { - Image - *maximum_image; - - /* - Maximum image sequence (deprecated). - */ - (void) SyncImagesSettings(image_info,*images,exception); - maximum_image=EvaluateImages(*images,MaxEvaluateOperator,exception); - if (maximum_image == (Image *) NULL) - { - status=MagickFalse; - break; - } - *images=DestroyImageList(*images); - *images=maximum_image; - break; - } - if (LocaleCompare("minimum",argv[0]+1) == 0) - { - Image - *minimum_image; - - /* - Minimum image sequence (deprecated). - */ - (void) SyncImagesSettings(image_info,*images,exception); - minimum_image=EvaluateImages(*images,MinEvaluateOperator,exception); - if (minimum_image == (Image *) NULL) - { - status=MagickFalse; - break; - } - *images=DestroyImageList(*images); - *images=minimum_image; - break; - } if (LocaleCompare("morph",argv[0]+1) == 0) { Image diff --git a/MagickWand/operation.h b/MagickWand/operation.h index 9b9421e5e..dd825c8ab 100644 --- a/MagickWand/operation.h +++ b/MagickWand/operation.h @@ -24,12 +24,12 @@ extern "C" { extern WandExport MagickBooleanType - SettingsOptionInfo(ImageInfo *,const int,const char **,ExceptionInfo *), - SimpleOperationImage(ImageInfo *,const int,const char **,Image **, - ExceptionInfo *), -/*SimpleOperationImages(ImageInfo *,const int,const char **,Image + ApplySettingInfoOption(ImageInfo *,const int,const char *,ExceptionInfo *), + ApplySimpleOperationImage(ImageInfo *,const int,const char *,const char *, + Image **,ExceptionInfo *), +/*ApplySimpleOperationImages(ImageInfo *,const int,const char **,Image **,ExceptionInfo *), */ - SequenceOperationImages(ImageInfo *,const int,const char **,Image **, + ApplySequenceOperationImages(ImageInfo *,const int,const char **,Image **, ExceptionInfo *); #if defined(__cplusplus) || defined(c_plusplus) -- 2.40.0