option.c

Go to the documentation of this file.
00001 /*
00002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00003 %                                                                             %
00004 %                                                                             %
00005 %                                                                             %
00006 %                   OOO   PPPP   TTTTT  IIIII   OOO   N   N                   %
00007 %                  O   O  P   P    T      I    O   O  NN  N                   %
00008 %                  O   O  PPPP     T      I    O   O  N N N                   %
00009 %                  O   O  P        T      I    O   O  N  NN                   %
00010 %                   OOO   P        T    IIIII   OOO   N   N                   %
00011 %                                                                             %
00012 %                                                                             %
00013 %                         MagickCore Option Methods                           %
00014 %                                                                             %
00015 %                              Software Design                                %
00016 %                                John Cristy                                  %
00017 %                                 March 2000                                  %
00018 %                                                                             %
00019 %                                                                             %
00020 %  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization      %
00021 %  dedicated to making software imaging solutions freely available.           %
00022 %                                                                             %
00023 %  You may not use this file except in compliance with the License.  You may  %
00024 %  obtain a copy of the License at                                            %
00025 %                                                                             %
00026 %    http://www.imagemagick.org/script/license.php                            %
00027 %                                                                             %
00028 %  Unless required by applicable law or agreed to in writing, software        %
00029 %  distributed under the License is distributed on an "AS IS" BASIS,          %
00030 %  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
00031 %  See the License for the specific language governing permissions and        %
00032 %  limitations under the License.                                             %
00033 %                                                                             %
00034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00035 %
00036 %
00037 %
00038 */
00039 
00040 /*
00041   Include declarations.
00042 */
00043 #include "magick/studio.h"
00044 #include "magick/artifact.h"
00045 #include "magick/cache.h"
00046 #include "magick/color.h"
00047 #include "magick/compare.h"
00048 #include "magick/constitute.h"
00049 #include "magick/distort.h"
00050 #include "magick/draw.h"
00051 #include "magick/effect.h"
00052 #include "magick/exception.h"
00053 #include "magick/exception-private.h"
00054 #include "magick/fx.h"
00055 #include "magick/gem.h"
00056 #include "magick/geometry.h"
00057 #include "magick/image.h"
00058 #include "magick/image-private.h"
00059 #include "magick/layer.h"
00060 #include "magick/mime-private.h"
00061 #include "magick/memory_.h"
00062 #include "magick/monitor.h"
00063 #include "magick/montage.h"
00064 #include "magick/option.h"
00065 #include "magick/policy.h"
00066 #include "magick/property.h"
00067 #include "magick/quantize.h"
00068 #include "magick/quantum.h"
00069 #include "magick/resource_.h"
00070 #include "magick/splay-tree.h"
00071 #include "magick/string_.h"
00072 #include "magick/token.h"
00073 #include "magick/utility.h"
00074 
00075 /*
00076   ImageMagick options.
00077 */
00078 static const OptionInfo
00079   AlignOptions[] =
00080   {
00081     { "Undefined", (long) UndefinedAlign, MagickTrue },
00082     { "Center", (long) CenterAlign, MagickFalse },
00083     { "End", (long) RightAlign, MagickFalse },
00084     { "Left", (long) LeftAlign, MagickFalse },
00085     { "Middle", (long) CenterAlign, MagickFalse },
00086     { "Right", (long) RightAlign, MagickFalse },
00087     { "Start", (long) LeftAlign, MagickFalse },
00088     { (char *) NULL, (long) UndefinedAlign, MagickFalse }
00089   },
00090   AlphaOptions[] =
00091   {
00092     { "Undefined", (long) UndefinedAlphaChannel, MagickTrue },
00093     { "Activate", (long) ActivateAlphaChannel, MagickFalse },
00094     { "Background", (long) BackgroundAlphaChannel, MagickFalse },
00095     { "Copy", (long) CopyAlphaChannel, MagickFalse },
00096     { "Deactivate", (long) DeactivateAlphaChannel, MagickFalse },
00097     { "Extract", (long) ExtractAlphaChannel, MagickFalse },
00098     { "Off", (long) DeactivateAlphaChannel, MagickFalse },
00099     { "On", (long) ActivateAlphaChannel, MagickFalse },
00100     { "Opaque", (long) OpaqueAlphaChannel, MagickFalse },
00101     { "Set", (long) SetAlphaChannel, MagickFalse },
00102     { "Shape", (long) ShapeAlphaChannel, MagickFalse },
00103     { "Reset", (long) SetAlphaChannel, MagickTrue }, /* deprecated */
00104     { "Transparent", (long) TransparentAlphaChannel, MagickFalse },
00105     { (char *) NULL, (long) UndefinedAlphaChannel, MagickFalse }
00106   },
00107   BooleanOptions[] =
00108   {
00109     { "False", 0L, MagickFalse },
00110     { "True", 1L, MagickFalse },
00111     { "0", 0L, MagickFalse },
00112     { "1", 1L, MagickFalse },
00113     { (char *) NULL, 0L, MagickFalse }
00114   },
00115   ChannelOptions[] =
00116   {
00117     { "Undefined", (long) UndefinedChannel, MagickTrue },
00118     { "All", (long) AllChannels, MagickFalse },
00119     { "Alpha", (long) OpacityChannel, MagickFalse },
00120     { "Black", (long) BlackChannel, MagickFalse },
00121     { "Blue", (long) BlueChannel, MagickFalse },
00122     { "Cyan", (long) CyanChannel, MagickFalse },
00123     { "Default", (long) DefaultChannels, MagickFalse },
00124     { "Gray", (long) GrayChannel, MagickFalse },
00125     { "Green", (long) GreenChannel, MagickFalse },
00126     { "Hue", (long) RedChannel, MagickFalse },
00127     { "Index", (long) IndexChannel, MagickFalse },
00128     { "Lightness", (long) BlueChannel, MagickFalse },
00129     { "Luminance", (long) BlueChannel, MagickFalse },
00130     { "Luminosity", (long) BlueChannel, MagickFalse },  /* deprecated */
00131     { "Magenta", (long) MagentaChannel, MagickFalse },
00132     { "Matte", (long) OpacityChannel, MagickFalse },
00133     { "Opacity", (long) OpacityChannel, MagickFalse },
00134     { "Red", (long) RedChannel, MagickFalse },
00135     { "Saturation", (long) GreenChannel, MagickFalse },
00136     { "Yellow", (long) YellowChannel, MagickFalse },
00137     { "Sync", (long) SyncChannels, MagickFalse },   /* special channel flag */
00138     { (char *) NULL, (long) UndefinedChannel, MagickFalse }
00139   },
00140   ClassOptions[] =
00141   {
00142     { "Undefined", (long) UndefinedClass, MagickTrue },
00143     { "DirectClass", (long) DirectClass, MagickFalse },
00144     { "PseudoClass", (long) PseudoClass, MagickFalse },
00145     { (char *) NULL, (long) UndefinedClass, MagickFalse }
00146   },
00147   ClipPathOptions[] =
00148   {
00149     { "Undefined", (long) UndefinedPathUnits, MagickTrue },
00150     { "ObjectBoundingBox", (long) ObjectBoundingBox, MagickFalse },
00151     { "UserSpace", (long) UserSpace, MagickFalse },
00152     { "UserSpaceOnUse", (long) UserSpaceOnUse, MagickFalse },
00153     { (char *) NULL, (long) UndefinedPathUnits, MagickFalse }
00154   },
00155   CommandOptions[] =
00156   {
00157     { "+adjoin", 0L, MagickFalse },
00158     { "-adjoin", 0L, MagickFalse },
00159     { "+adaptive-sharpen", 1L, MagickFalse },
00160     { "-adaptive-sharpen", 1L, MagickFalse },
00161     { "+adaptive-threshold", 1L, MagickFalse },
00162     { "-adaptive-threshold", 1L, MagickFalse },
00163     { "+affine", 0L, MagickFalse },
00164     { "-affine", 1L, MagickFalse },
00165     { "+affinity", 0L, MagickFalse },
00166     { "-affinity", 1L, MagickFalse },
00167     { "+alpha", 1L, MagickFalse },
00168     { "-alpha", 1L, MagickFalse },
00169     { "+annotate", 0L, MagickFalse },
00170     { "-annotate", 2L, MagickFalse },
00171     { "+antialias", 0L, MagickFalse },
00172     { "-antialias", 0L, MagickFalse },
00173     { "+append", 0L, MagickFalse },
00174     { "-append", 0L, MagickFalse },
00175     { "+authenticate", 0L, MagickFalse },
00176     { "-authenticate", 1L, MagickFalse },
00177     { "+auto-gamma", 0L, MagickTrue },   /* under development */
00178     { "-auto-gamma", 0L, MagickTrue },   /* under development */
00179     { "+auto-level", 0L, MagickTrue },   /* under development */
00180     { "-auto-level", 0L, MagickTrue },   /* under development */
00181     { "+auto-orient", 0L, MagickFalse },
00182     { "-auto-orient", 0L, MagickFalse },
00183     { "+average", 0L, MagickFalse },
00184     { "-average", 0L, MagickFalse },
00185     { "+backdrop", 0L, MagickFalse },
00186     { "-backdrop", 1L, MagickFalse },
00187     { "+background", 0L, MagickFalse },
00188     { "-background", 1L, MagickFalse },
00189     { "+bench", 0L, MagickTrue },
00190     { "-bench", 1L, MagickTrue },
00191     { "+bias", 0L, MagickFalse },
00192     { "-bias", 1L, MagickFalse },
00193     { "+black-threshold", 0L, MagickFalse },
00194     { "-black-threshold", 1L, MagickFalse },
00195     { "+blend", 0L, MagickFalse },
00196     { "-blend", 1L, MagickFalse },
00197     { "+blue-primary", 0L, MagickFalse },
00198     { "-blue-primary", 1L, MagickFalse },
00199     { "+blue-shift", 1L, MagickFalse },
00200     { "-blue-shift", 1L, MagickFalse },
00201     { "+blur", 0L, MagickFalse },
00202     { "-blur", 1L, MagickFalse },
00203     { "+border", 0L, MagickFalse },
00204     { "-border", 1L, MagickFalse },
00205     { "+bordercolor", 0L, MagickFalse },
00206     { "-bordercolor", 1L, MagickFalse },
00207     { "+borderwidth", 0L, MagickFalse },
00208     { "-borderwidth", 1L, MagickFalse },
00209     { "+box", 0L, MagickFalse },
00210     { "-box", 1L, MagickFalse },
00211     { "+cache", 0L, MagickFalse },
00212     { "-cache", 1L, MagickFalse },
00213     { "+cdl", 1L, MagickFalse },
00214     { "-cdl", 1L, MagickFalse },
00215     { "+channel", 0L, MagickFalse },
00216     { "-channel", 1L, MagickFalse },
00217     { "+charcoal", 0L, MagickFalse },
00218     { "-charcoal", 0L, MagickFalse },
00219     { "+chop", 0L, MagickFalse },
00220     { "-chop", 1L, MagickFalse },
00221     { "+clip", 0L, MagickFalse },
00222     { "-clip", 0L, MagickFalse },
00223     { "+clip-mask", 0L, MagickFalse },
00224     { "-clip-mask", 1L, MagickFalse },
00225     { "+clip-path", 0L, MagickFalse },
00226     { "-clip-path", 1L, MagickFalse },
00227     { "+clone", 0L, MagickFalse },
00228     { "-clone", 1L, MagickFalse },
00229     { "+clut", 0L, MagickFalse },
00230     { "-clut", 0L, MagickFalse },
00231     { "+coalesce", 0L, MagickFalse },
00232     { "-coalesce", 0L, MagickFalse },
00233     { "+colorize", 0L, MagickFalse },
00234     { "-colorize", 1L, MagickFalse },
00235     { "+colormap", 0L, MagickFalse },
00236     { "-colormap", 1L, MagickFalse },
00237     { "+colors", 0L, MagickFalse },
00238     { "-colors", 1L, MagickFalse },
00239     { "+colorspace", 0L, MagickFalse },
00240     { "-colorspace", 1L, MagickFalse },
00241     { "+combine", 0L, MagickFalse },
00242     { "-combine", 0L, MagickFalse },
00243     { "+comment", 0L, MagickFalse },
00244     { "-comment", 1L, MagickFalse },
00245     { "+compose", 0L, MagickFalse },
00246     { "-compose", 1L, MagickFalse },
00247     { "+composite", 0L, MagickFalse },
00248     { "-composite", 0L, MagickFalse },
00249     { "+compress", 0L, MagickFalse },
00250     { "-compress", 1L, MagickFalse },
00251     { "+concurrent", 0L, MagickTrue },
00252     { "-concurrent", 0L, MagickTrue },
00253     { "+contrast", 0L, MagickFalse },
00254     { "-contrast", 0L, MagickFalse },
00255     { "+contrast-stretch", 0L, MagickFalse },
00256     { "-contrast-stretch", 1L, MagickFalse },
00257     { "+convolve", 0L, MagickFalse },
00258     { "-convolve", 1L, MagickFalse },
00259     { "+crop", 0L, MagickFalse },
00260     { "-crop", 1L, MagickFalse },
00261     { "+cycle", 0L, MagickFalse },
00262     { "-cycle", 1L, MagickFalse },
00263     { "+debug", 0L, MagickFalse },
00264     { "-debug", 1L, MagickFalse },
00265     { "+decipher", 1L, MagickFalse },
00266     { "-decipher", 1L, MagickFalse },
00267     { "+deconstruct", 0L, MagickFalse },
00268     { "-deconstruct", 0L, MagickFalse },
00269     { "+define", 1L, MagickFalse },
00270     { "-define", 1L, MagickFalse },
00271     { "+delay", 0L, MagickFalse },
00272     { "-delay", 1L, MagickFalse },
00273     { "+delete", 0L, MagickFalse },
00274     { "-delete", 1L, MagickFalse },
00275     { "+density", 0L, MagickFalse },
00276     { "-density", 1L, MagickFalse },
00277     { "+depth", 0L, MagickFalse },
00278     { "-depth", 1L, MagickFalse },
00279     { "+descend", 0L, MagickFalse },
00280     { "-descend", 1L, MagickFalse },
00281     { "+deskew", 0L, MagickFalse },
00282     { "-deskew", 1L, MagickFalse },
00283     { "+despeckle", 0L, MagickFalse },
00284     { "-despeckle", 0L, MagickFalse },
00285     { "+displace", 0L, MagickFalse },
00286     { "-displace", 1L, MagickFalse },
00287     { "+display", 0L, MagickFalse },
00288     { "-display", 1L, MagickFalse },
00289     { "+dispose", 0L, MagickFalse },
00290     { "-dispose", 1L, MagickFalse },
00291     { "+dissolve", 0L, MagickFalse },
00292     { "-dissolve", 1L, MagickFalse },
00293     { "+distort", 2L, MagickFalse },
00294     { "-distort", 2L, MagickFalse },
00295     { "+dither", 0L, MagickFalse },
00296     { "-dither", 1L, MagickFalse },
00297     { "+draw", 0L, MagickFalse },
00298     { "-draw", 1L, MagickFalse },
00299     { "+duration", 1L, MagickTrue },
00300     { "-duration", 1L, MagickTrue },
00301     { "+edge", 0L, MagickFalse },
00302     { "-edge", 1L, MagickFalse },
00303     { "+emboss", 0L, MagickFalse },
00304     { "-emboss", 1L, MagickFalse },
00305     { "+encipher", 1L, MagickFalse },
00306     { "-encipher", 1L, MagickFalse },
00307     { "+encoding", 0L, MagickFalse },
00308     { "-encoding", 1L, MagickFalse },
00309     { "+endian", 0L, MagickFalse },
00310     { "-endian", 1L, MagickFalse },
00311     { "+enhance", 0L, MagickFalse },
00312     { "-enhance", 0L, MagickFalse },
00313     { "+equalize", 0L, MagickFalse },
00314     { "-equalize", 0L, MagickFalse },
00315     { "+evaluate", 0L, MagickFalse },
00316     { "-evaluate", 2L, MagickFalse },
00317     { "+extent", 0L, MagickFalse },
00318     { "-extent", 1L, MagickFalse },
00319     { "+extract", 0L, MagickFalse },
00320     { "-extract", 1L, MagickFalse },
00321     { "+family", 0L, MagickFalse },
00322     { "-family", 1L, MagickFalse },
00323     { "+fft", 0L, MagickFalse },
00324     { "-fft", 0L, MagickFalse },
00325     { "+fill", 0L, MagickFalse },
00326     { "-fill", 1L, MagickFalse },
00327     { "+filter", 0L, MagickFalse },
00328     { "-filter", 1L, MagickFalse },
00329     { "+flatten", 0L, MagickFalse },
00330     { "-flatten", 0L, MagickFalse },
00331     { "+flip", 0L, MagickFalse },
00332     { "-flip", 0L, MagickFalse },
00333     { "+floodfill", 0L, MagickFalse },
00334     { "-floodfill", 2L, MagickFalse },
00335     { "+flop", 0L, MagickFalse },
00336     { "-flop", 0L, MagickFalse },
00337     { "+font", 0L, MagickFalse },
00338     { "-font", 1L, MagickFalse },
00339     { "+foreground", 0L, MagickFalse },
00340     { "-foreground", 1L, MagickFalse },
00341     { "+format", 0L, MagickFalse },
00342     { "-format", 1L, MagickFalse },
00343     { "+frame", 0L, MagickFalse },
00344     { "-frame", 1L, MagickFalse },
00345     { "+fuzz", 0L, MagickFalse },
00346     { "-fuzz", 1L, MagickFalse },
00347     { "+fx", 0L, MagickFalse },
00348     { "-fx", 1L, MagickFalse },
00349     { "+gamma", 0L, MagickFalse },
00350     { "-gamma", 1L, MagickFalse },
00351     { "+gaussian", 0L, MagickFalse },
00352     { "-gaussian", 1L, MagickFalse },
00353     { "+gaussian-blur", 0L, MagickFalse },
00354     { "-gaussian-blur", 1L, MagickFalse },
00355     { "+geometry", 0L, MagickFalse },
00356     { "-geometry", 1L, MagickFalse },
00357     { "+gravity", 0L, MagickFalse },
00358     { "-gravity", 1L, MagickFalse },
00359     { "+green-primary", 0L, MagickFalse },
00360     { "-green-primary", 1L, MagickFalse },
00361     { "+hald-clut", 0L, MagickFalse },
00362     { "-hald-clut", 0L, MagickFalse },
00363     { "+help", 0L, MagickFalse },
00364     { "-help", 0L, MagickFalse },
00365     { "+highlight-color", 1L, MagickFalse },
00366     { "-highlight-color", 1L, MagickFalse },
00367     { "+iconGeometry", 0L, MagickFalse },
00368     { "-iconGeometry", 1L, MagickFalse },
00369     { "+iconic", 0L, MagickFalse },
00370     { "-iconic", 1L, MagickFalse },
00371     { "+identify", 0L, MagickFalse },
00372     { "-identify", 0L, MagickFalse },
00373     { "+immutable", 0L, MagickFalse },
00374     { "-immutable", 0L, MagickFalse },
00375     { "+implode", 0L, MagickFalse },
00376     { "-implode", 1L, MagickFalse },
00377     { "+insert", 0L, MagickFalse },
00378     { "-insert", 1L, MagickFalse },
00379     { "+intent", 0L, MagickFalse },
00380     { "-intent", 1L, MagickFalse },
00381     { "+interlace", 0L, MagickFalse },
00382     { "-interlace", 1L, MagickFalse },
00383     { "+interpolate", 0L, MagickFalse },
00384     { "-interpolate", 1L, MagickFalse },
00385     { "+interword-spacing", 0L, MagickFalse },
00386     { "-interword-spacing", 1L, MagickFalse },
00387     { "+kerning", 0L, MagickFalse },
00388     { "-kerning", 1L, MagickFalse },
00389     { "+label", 0L, MagickFalse },
00390     { "-label", 1L, MagickFalse },
00391     { "+lat", 0L, MagickFalse },
00392     { "-lat", 1L, MagickFalse },
00393     { "+layers", 0L, MagickFalse },
00394     { "-layers", 1L, MagickFalse },
00395     { "+level", 1L, MagickFalse },
00396     { "-level", 1L, MagickFalse },
00397     { "+level-colors", 1L, MagickFalse },
00398     { "-level-colors", 1L, MagickFalse },
00399     { "+limit", 0L, MagickFalse },
00400     { "-limit", 2L, MagickFalse },
00401     { "+linear-stretch", 0L, MagickFalse },
00402     { "-linear-stretch", 1L, MagickFalse },
00403     { "+linewidth", 0L, MagickFalse },
00404     { "-linewidth", 1L, MagickFalse },
00405     { "+liquid-rescale", 0L, MagickFalse },
00406     { "-liquid-rescale", 1L, MagickFalse },
00407     { "+list", 0L, MagickFalse },
00408     { "-list", 1L, MagickFalse },
00409     { "+log", 0L, MagickFalse },
00410     { "-log", 1L, MagickFalse },
00411     { "+loop", 0L, MagickFalse },
00412     { "-loop", 1L, MagickFalse },
00413     { "+lowlight-color", 1L, MagickFalse },
00414     { "-lowlight-color", 1L, MagickFalse },
00415     { "+magnify", 0L, MagickFalse },
00416     { "-magnify", 1L, MagickFalse },
00417     { "+map", 0L, MagickFalse },
00418     { "-map", 1L, MagickFalse },
00419     { "+mask", 0L, MagickFalse },
00420     { "-mask", 1L, MagickFalse },
00421     { "+matte", 0L, MagickFalse },
00422     { "-matte", 0L, MagickFalse },
00423     { "+mattecolor", 0L, MagickFalse },
00424     { "-mattecolor", 1L, MagickFalse },
00425     { "+median", 0L, MagickFalse },
00426     { "-median", 1L, MagickFalse },
00427     { "+metric", 0L, MagickFalse },
00428     { "-metric", 1L, MagickFalse },
00429     { "+mode", 0L, MagickFalse },
00430     { "-mode", 1L, MagickFalse },
00431     { "+modulate", 0L, MagickFalse },
00432     { "-modulate", 1L, MagickFalse },
00433     { "+monitor", 0L, MagickFalse },
00434     { "-monitor", 0L, MagickFalse },
00435     { "+monochrome", 0L, MagickFalse },
00436     { "-monochrome", 0L, MagickFalse },
00437     { "+morph", 0L, MagickFalse },
00438     { "-morph", 1L, MagickFalse },
00439     { "+mosaic", 0L, MagickFalse },
00440     { "-mosaic", 0L, MagickFalse },
00441     { "+motion-blur", 0L, MagickFalse },
00442     { "-motion-blur", 1L, MagickFalse },
00443     { "+name", 0L, MagickFalse },
00444     { "-name", 1L, MagickFalse },
00445     { "+negate", 0L, MagickFalse },
00446     { "-negate", 0L, MagickFalse },
00447     { "+noise", 1L, MagickFalse },
00448     { "-noise", 1L, MagickFalse },
00449     { "+noop", 0L, MagickFalse },
00450     { "-noop", 0L, MagickFalse },
00451     { "+normalize", 0L, MagickFalse },
00452     { "-normalize", 0L, MagickFalse },
00453     { "+opaque", 1L, MagickFalse },
00454     { "-opaque", 1L, MagickFalse },
00455     { "+ordered-dither", 0L, MagickFalse },
00456     { "-ordered-dither", 1L, MagickFalse },
00457     { "+orient", 0L, MagickFalse },
00458     { "-orient", 1L, MagickFalse },
00459     { "+origin", 0L, MagickFalse },
00460     { "-origin", 1L, MagickFalse },
00461     { "+page", 0L, MagickFalse },
00462     { "-page", 1L, MagickFalse },
00463     { "+paint", 0L, MagickFalse },
00464     { "-paint", 1L, MagickFalse },
00465     { "+path", 0L, MagickFalse },
00466     { "-path", 1L, MagickFalse },
00467     { "+pause", 0L, MagickFalse },
00468     { "-pause", 1L, MagickFalse },
00469     { "+passphrase", 0L, MagickFalse },
00470     { "-passphrase", 1L, MagickFalse },
00471     { "+pen", 0L, MagickFalse },
00472     { "-pen", 1L, MagickFalse },
00473     { "+ping", 0L, MagickFalse },
00474     { "-ping", 0L, MagickFalse },
00475     { "+pointsize", 0L, MagickFalse },
00476     { "-pointsize", 1L, MagickFalse },
00477     { "+polaroid", 0L, MagickFalse },
00478     { "-polaroid", 1L, MagickFalse },
00479     { "+posterize", 0L, MagickFalse },
00480     { "-posterize", 1L, MagickFalse },
00481     { "+preview", 0L, MagickFalse },
00482     { "-preview", 1L, MagickFalse },
00483     { "+process", 0L, MagickFalse },
00484     { "-process", 1L, MagickFalse },
00485     { "+profile", 1L, MagickFalse },
00486     { "-profile", 1L, MagickFalse },
00487     { "+quality", 0L, MagickFalse },
00488     { "-quality", 1L, MagickFalse },
00489     { "+quiet", 0L, MagickFalse },
00490     { "-quiet", 0L, MagickFalse },
00491     { "+radial-blur", 0L, MagickFalse },
00492     { "-radial-blur", 1L, MagickFalse },
00493     { "+raise", 0L, MagickFalse },
00494     { "-raise", 1L, MagickFalse },
00495     { "+random-threshold", 0L, MagickFalse },
00496     { "-random-threshold", 1L, MagickFalse },
00497     { "+recolor", 0L, MagickFalse },
00498     { "-recolor", 1L, MagickFalse },
00499     { "+red-primary", 0L, MagickFalse },
00500     { "-red-primary", 1L, MagickFalse },
00501     { "+regard-warnings", 0L, MagickFalse },
00502     { "-regard-warnings", 0L, MagickFalse },
00503     { "+region", 0L, MagickFalse },
00504     { "-region", 1L, MagickFalse },
00505     { "+remote", 0L, MagickFalse },
00506     { "-remote", 1L, MagickFalse },
00507     { "+render", 0L, MagickFalse },
00508     { "-render", 0L, MagickFalse },
00509     { "+repage", 0L, MagickFalse },
00510     { "-repage", 1L, MagickFalse },
00511     { "+resample", 0L, MagickFalse },
00512     { "-resample", 1L, MagickFalse },
00513     { "+resize", 0L, MagickFalse },
00514     { "-resize", 1L, MagickFalse },
00515     { "+respect-parenthesis", 0L, MagickFalse },
00516     { "-respect-parenthesis", 0L, MagickFalse },
00517     { "+reverse", 0L, MagickFalse },
00518     { "-reverse", 0L, MagickFalse },
00519     { "+roll", 0L, MagickFalse },
00520     { "-roll", 1L, MagickFalse },
00521     { "+rotate", 0L, MagickFalse },
00522     { "-rotate", 1L, MagickFalse },
00523     { "+sample", 0L, MagickFalse },
00524     { "-sample", 1L, MagickFalse },
00525     { "+sampling-factor", 0L, MagickFalse },
00526     { "-sampling-factor", 1L, MagickFalse },
00527     { "+sans", 0L, MagickFalse },
00528     { "-sans", 1L, MagickFalse },
00529     { "+sans0", 0L, MagickFalse },
00530     { "-sans0", 0L, MagickFalse },
00531     { "+sans2", 2L, MagickFalse },
00532     { "-sans2", 2L, MagickFalse },
00533     { "+scale", 0L, MagickFalse },
00534     { "-scale", 1L, MagickFalse },
00535     { "+scene", 0L, MagickFalse },
00536     { "-scene", 1L, MagickFalse },
00537     { "+scenes", 0L, MagickFalse },
00538     { "-scenes", 1L, MagickFalse },
00539     { "+screen", 0L, MagickFalse },
00540     { "-screen", 1L, MagickFalse },
00541     { "+seed", 0L, MagickFalse },
00542     { "-seed", 1L, MagickFalse },
00543     { "+segment", 0L, MagickFalse },
00544     { "-segment", 1L, MagickFalse },
00545     { "+separate", 0L, MagickFalse },
00546     { "-separate", 0L, MagickFalse },
00547     { "+sepia-tone", 0L, MagickFalse },
00548     { "-sepia-tone", 1L, MagickFalse },
00549     { "+set", 1L, MagickFalse },
00550     { "-set", 2L, MagickFalse },
00551     { "+shade", 0L, MagickFalse },
00552     { "-shade", 1L, MagickFalse },
00553     { "+shadow", 0L, MagickFalse },
00554     { "-shadow", 1L, MagickFalse },
00555     { "+shared-memory", 0L, MagickFalse },
00556     { "-shared-memory", 1L, MagickFalse },
00557     { "+sharpen", 0L, MagickFalse },
00558     { "-sharpen", 1L, MagickFalse },
00559     { "+shave", 0L, MagickFalse },
00560     { "-shave", 1L, MagickFalse },
00561     { "+shear", 0L, MagickFalse },
00562     { "-shear", 1L, MagickFalse },
00563     { "+sigmoidal-contrast", 0L, MagickFalse },
00564     { "-sigmoidal-contrast", 1L, MagickFalse },
00565     { "+silent", 0L, MagickFalse },
00566     { "-silent", 1L, MagickFalse },
00567     { "+size", 0L, MagickFalse },
00568     { "-size", 1L, MagickFalse },
00569     { "+sketch", 0L, MagickFalse },
00570     { "-sketch", 1L, MagickFalse },
00571     { "+snaps", 0L, MagickFalse },
00572     { "-snaps", 1L, MagickFalse },
00573     { "+solarize", 0L, MagickFalse },
00574     { "-solarize", 1L, MagickFalse },
00575     { "+splice", 0L, MagickFalse },
00576     { "-splice", 1L, MagickFalse },
00577     { "+sparse-color", 2L, MagickFalse },
00578     { "-sparse-color", 2L, MagickFalse },
00579     { "+spread", 0L, MagickFalse },
00580     { "-spread", 1L, MagickFalse },
00581     { "+stegano", 0L, MagickFalse },
00582     { "-stegano", 1L, MagickFalse },
00583     { "+stereo", 0L, MagickFalse },
00584     { "-stereo", 1L, MagickFalse },
00585     { "+stretch", 0L, MagickFalse },
00586     { "-stretch", 1L, MagickFalse },
00587     { "+strip", 0L, MagickFalse },
00588     { "-strip", 0L, MagickFalse },
00589     { "+stroke", 0L, MagickFalse },
00590     { "-stroke", 1L, MagickFalse },
00591     { "+strokewidth", 0L, MagickFalse },
00592     { "-strokewidth", 1L, MagickFalse },
00593     { "+style", 0L, MagickFalse },
00594     { "-style", 1L, MagickFalse },
00595     { "+swap", 0L, MagickFalse },
00596     { "-swap", 1L, MagickFalse },
00597     { "+swirl", 0L, MagickFalse },
00598     { "-swirl", 1L, MagickFalse },
00599     { "+text-font", 0L, MagickFalse },
00600     { "-text-font", 1L, MagickFalse },
00601     { "+texture", 0L, MagickFalse },
00602     { "-texture", 1L, MagickFalse },
00603     { "+threshold", 0L, MagickFalse },
00604     { "-threshold", 1L, MagickFalse },
00605     { "+thumbnail", 0L, MagickFalse },
00606     { "-thumbnail", 1L, MagickFalse },
00607     { "+thumnail", 0L, MagickFalse },
00608     { "-thumnail", 1L, MagickFalse },
00609     { "+tile", 0L, MagickFalse },
00610     { "-tile", 1L, MagickFalse },
00611     { "+tile-offset", 0L, MagickFalse },
00612     { "-tile-offset", 1L, MagickFalse },
00613     { "+tint", 0L, MagickFalse },
00614     { "-tint", 1L, MagickFalse },
00615     { "+title", 0L, MagickFalse },
00616     { "-title", 1L, MagickFalse },
00617     { "+transform", 0L, MagickFalse },
00618     { "-transform", 0L, MagickFalse },
00619     { "+transparent", 1L, MagickFalse },
00620     { "-transparent", 1L, MagickFalse },
00621     { "+transparent-color", 1L, MagickFalse },
00622     { "-transparent-color", 1L, MagickFalse },
00623     { "+transpose", 0L, MagickFalse },
00624     { "-transpose", 0L, MagickFalse },
00625     { "+transverse", 0L, MagickFalse },
00626     { "-transverse", 0L, MagickFalse },
00627     { "+treedepth", 0L, MagickFalse },
00628     { "-treedepth", 1L, MagickFalse },
00629     { "+trim", 0L, MagickFalse },
00630     { "-trim", 0L, MagickFalse },
00631     { "+type", 0L, MagickFalse },
00632     { "-type", 1L, MagickFalse },
00633     { "+undercolor", 0L, MagickFalse },
00634     { "-undercolor", 1L, MagickFalse },
00635     { "+unique-colors", 0L, MagickFalse },
00636     { "-unique-colors", 0L, MagickFalse },
00637     { "+units", 0L, MagickFalse },
00638     { "-units", 1L, MagickFalse },
00639     { "+unsharp", 0L, MagickFalse },
00640     { "-unsharp", 1L, MagickFalse },
00641     { "+update", 0L, MagickFalse },
00642     { "-update", 1L, MagickFalse },
00643     { "+use-pixmap", 0L, MagickFalse },
00644     { "-use-pixmap", 1L, MagickFalse },
00645     { "+verbose", 0L, MagickFalse },
00646     { "-verbose", 0L, MagickFalse },
00647     { "+version", 0L, MagickFalse },
00648     { "-version", 1L, MagickFalse },
00649     { "+view", 0L, MagickFalse },
00650     { "-view", 1L, MagickFalse },
00651     { "+vignette", 0L, MagickFalse },
00652     { "-vignette", 1L, MagickFalse },
00653     { "+virtual-pixel", 0L, MagickFalse },
00654     { "-virtual-pixel", 1L, MagickFalse },
00655     { "+visual", 0L, MagickFalse },
00656     { "-visual", 1L, MagickFalse },
00657     { "+watermark", 0L, MagickFalse },
00658     { "-watermark", 1L, MagickFalse },
00659     { "+wave", 0L, MagickFalse },
00660     { "-wave", 1L, MagickFalse },
00661     { "+weight", 0L, MagickFalse },
00662     { "-weight", 1L, MagickFalse },
00663     { "+white-point", 0L, MagickFalse },
00664     { "-white-point", 1L, MagickFalse },
00665     { "+white-threshold", 0L, MagickFalse },
00666     { "-white-threshold", 1L, MagickFalse },
00667     { "+window", 0L, MagickFalse },
00668     { "-window", 1L, MagickFalse },
00669     { "+window-group", 0L, MagickFalse },
00670     { "-window-group", 1L, MagickFalse },
00671     { "+write", 1L, MagickFalse },
00672     { "-write", 1L, MagickFalse },
00673     { (char *) NULL, (long) 0L, MagickFalse }
00674   },
00675   ComposeOptions[] =
00676   {
00677     { "Undefined", (long) UndefinedCompositeOp, MagickTrue },
00678     { "Add", (long) AddCompositeOp, MagickFalse },
00679     { "Atop", (long) AtopCompositeOp, MagickFalse },
00680     { "Blend", (long) BlendCompositeOp, MagickFalse },
00681     { "Blur", (long) BlurCompositeOp, MagickFalse },
00682     { "Bumpmap", (long) BumpmapCompositeOp, MagickFalse },
00683     { "ChangeMask", (long) ChangeMaskCompositeOp, MagickFalse },
00684     { "Clear", (long) ClearCompositeOp, MagickFalse },
00685     { "ColorBurn", (long) ColorBurnCompositeOp, MagickFalse },
00686     { "ColorDodge", (long) ColorDodgeCompositeOp, MagickFalse },
00687     { "Colorize", (long) ColorizeCompositeOp, MagickFalse },
00688     { "CopyBlack", (long) CopyBlackCompositeOp, MagickFalse },
00689     { "CopyBlue", (long) CopyBlueCompositeOp, MagickFalse },
00690     { "CopyCyan", (long) CopyCyanCompositeOp, MagickFalse },
00691     { "CopyGreen", (long) CopyGreenCompositeOp, MagickFalse },
00692     { "Copy", (long) CopyCompositeOp, MagickFalse },
00693     { "CopyMagenta", (long) CopyMagentaCompositeOp, MagickFalse },
00694     { "CopyOpacity", (long) CopyOpacityCompositeOp, MagickFalse },
00695     { "CopyRed", (long) CopyRedCompositeOp, MagickFalse },
00696     { "CopyYellow", (long) CopyYellowCompositeOp, MagickFalse },
00697     { "Darken", (long) DarkenCompositeOp, MagickFalse },
00698     { "Divide", (long) DivideCompositeOp, MagickFalse },
00699     { "Dst", (long) DstCompositeOp, MagickFalse },
00700     { "Difference", (long) DifferenceCompositeOp, MagickFalse },
00701     { "Displace", (long) DisplaceCompositeOp, MagickFalse },
00702     { "Dissolve", (long) DissolveCompositeOp, MagickFalse },
00703     { "Distort", (long) DistortCompositeOp, MagickFalse },
00704     { "DstAtop", (long) DstAtopCompositeOp, MagickFalse },
00705     { "DstIn", (long) DstInCompositeOp, MagickFalse },
00706     { "DstOut", (long) DstOutCompositeOp, MagickFalse },
00707     { "DstOver", (long) DstOverCompositeOp, MagickFalse },
00708     { "Dst", (long) DstCompositeOp, MagickFalse },
00709     { "Exclusion", (long) ExclusionCompositeOp, MagickFalse },
00710     { "HardLight", (long) HardLightCompositeOp, MagickFalse },
00711     { "Hue", (long) HueCompositeOp, MagickFalse },
00712     { "In", (long) InCompositeOp, MagickFalse },
00713     { "Lighten", (long) LightenCompositeOp, MagickFalse },
00714     { "LinearBurn", (long) LinearBurnCompositeOp, MagickFalse },
00715     { "LinearDodge", (long) LinearDodgeCompositeOp, MagickFalse },
00716     { "LinearLight", (long) LinearLightCompositeOp, MagickFalse },
00717     { "Luminize", (long) LuminizeCompositeOp, MagickFalse },
00718     { "Mathematics", (long) MathematicsCompositeOp, MagickFalse },
00719     { "Minus", (long) MinusCompositeOp, MagickFalse },
00720     { "Modulate", (long) ModulateCompositeOp, MagickFalse },
00721     { "Multiply", (long) MultiplyCompositeOp, MagickFalse },
00722     { "None", (long) NoCompositeOp, MagickFalse },
00723     { "Out", (long) OutCompositeOp, MagickFalse },
00724     { "Overlay", (long) OverlayCompositeOp, MagickFalse },
00725     { "Over", (long) OverCompositeOp, MagickFalse },
00726     { "PegtopLight", (long) PegtopLightCompositeOp, MagickFalse },
00727     { "PinLight", (long) PinLightCompositeOp, MagickFalse },
00728     { "Plus", (long) PlusCompositeOp, MagickFalse },
00729     { "Replace", (long) ReplaceCompositeOp, MagickFalse },
00730     { "Saturate", (long) SaturateCompositeOp, MagickFalse },
00731     { "Screen", (long) ScreenCompositeOp, MagickFalse },
00732     { "SoftLight", (long) SoftLightCompositeOp, MagickFalse },
00733     { "Src", (long) SrcCompositeOp, MagickFalse },
00734     { "SrcAtop", (long) SrcAtopCompositeOp, MagickFalse },
00735     { "SrcIn", (long) SrcInCompositeOp, MagickFalse },
00736     { "SrcOut", (long) SrcOutCompositeOp, MagickFalse },
00737     { "SrcOver", (long) SrcOverCompositeOp, MagickFalse },
00738     { "Src", (long) SrcCompositeOp, MagickFalse },
00739     { "Subtract", (long) SubtractCompositeOp, MagickFalse },
00740     { "Threshold", (long) ThresholdCompositeOp, MagickTrue }, /* depreciate */
00741     { "VividLight", (long) VividLightCompositeOp, MagickFalse },
00742     { "Xor", (long) XorCompositeOp, MagickFalse },
00743     { (char *) NULL, (long) UndefinedCompositeOp, MagickFalse }
00744   },
00745   CompressOptions[] =
00746   {
00747     { "Undefined", (long) UndefinedCompression, MagickTrue },
00748     { "B44", (long) B44Compression, MagickFalse },
00749     { "B44A", (long) B44ACompression, MagickFalse },
00750     { "BZip", (long) BZipCompression, MagickFalse },
00751     { "DXT1", (long) DXT1Compression, MagickFalse },
00752     { "DXT3", (long) DXT3Compression, MagickFalse },
00753     { "DXT5", (long) DXT5Compression, MagickFalse },
00754     { "Fax", (long) FaxCompression, MagickFalse },
00755     { "Group4", (long) Group4Compression, MagickFalse },
00756     { "JPEG", (long) JPEGCompression, MagickFalse },
00757     { "JPEG2000", (long) JPEG2000Compression, MagickFalse },
00758     { "Lossless", (long) LosslessJPEGCompression, MagickFalse },
00759     { "LosslessJPEG", (long) LosslessJPEGCompression, MagickFalse },
00760     { "LZW", (long) LZWCompression, MagickFalse },
00761     { "None", (long) NoCompression, MagickFalse },
00762     { "Piz", (long) PizCompression, MagickFalse },
00763     { "Pxr24", (long) Pxr24Compression, MagickFalse },
00764     { "RLE", (long) RLECompression, MagickFalse },
00765     { "Zip", (long) ZipCompression, MagickFalse },
00766     { "RunlengthEncoded", (long) RLECompression, MagickFalse },
00767     { "ZipS", (long) ZipSCompression, MagickFalse },
00768     { (char *) NULL, (long) UndefinedCompression, MagickFalse }
00769   },
00770   ColorspaceOptions[] =
00771   {
00772     { "Undefined", (long) UndefinedColorspace, MagickTrue },
00773     { "CMY", (long) CMYColorspace, MagickFalse },
00774     { "CMYK", (long) CMYKColorspace, MagickFalse },
00775     { "Gray", (long) GRAYColorspace, MagickFalse },
00776     { "HSB", (long) HSBColorspace, MagickFalse },
00777     { "HSL", (long) HSLColorspace, MagickFalse },
00778     { "HWB", (long) HWBColorspace, MagickFalse },
00779     { "Lab", (long) LabColorspace, MagickFalse },
00780     { "Log", (long) LogColorspace, MagickFalse },
00781     { "OHTA", (long) OHTAColorspace, MagickFalse },
00782     { "Rec601Luma", (long) Rec601LumaColorspace, MagickFalse },
00783     { "Rec601YCbCr", (long) Rec601YCbCrColorspace, MagickFalse },
00784     { "Rec709Luma", (long) Rec709LumaColorspace, MagickFalse },
00785     { "Rec709YCbCr", (long) Rec709YCbCrColorspace, MagickFalse },
00786     { "RGB", (long) RGBColorspace, MagickFalse },
00787     { "sRGB", (long) sRGBColorspace, MagickFalse },
00788     { "Transparent", (long) TransparentColorspace, MagickFalse },
00789     { "XYZ", (long) XYZColorspace, MagickFalse },
00790     { "YCbCr", (long) YCbCrColorspace, MagickFalse },
00791     { "YCC", (long) YCCColorspace, MagickFalse },
00792     { "YIQ", (long) YIQColorspace, MagickFalse },
00793     { "YPbPr", (long) YPbPrColorspace, MagickFalse },
00794     { "YUV", (long) YUVColorspace, MagickFalse },
00795     { (char *) NULL, (long) UndefinedColorspace, MagickFalse }
00796   },
00797   DataTypeOptions[] =
00798   {
00799     { "Undefined", (long) UndefinedData, MagickTrue },
00800     { "Byte", (long) ByteData, MagickFalse },
00801     { "Long", (long) LongData, MagickFalse },
00802     { "Short", (long) ShortData, MagickFalse },
00803     { "String", (long) StringData, MagickFalse },
00804     { (char *) NULL, (long) UndefinedData, MagickFalse }
00805   },
00806   DecorateOptions[] =
00807   {
00808     { "Undefined", (long) UndefinedDecoration, MagickTrue },
00809     { "LineThrough", (long) LineThroughDecoration, MagickFalse },
00810     { "None", (long) NoDecoration, MagickFalse },
00811     { "Overline", (long) OverlineDecoration, MagickFalse },
00812     { "Underline", (long) UnderlineDecoration, MagickFalse },
00813     { (char *) NULL, (long) UndefinedDecoration, MagickFalse }
00814   },
00815   DisposeOptions[] =
00816   {
00817     { "Background", (long) BackgroundDispose, MagickFalse },
00818     { "None", (long) NoneDispose, MagickFalse },
00819     { "Previous", (long) PreviousDispose, MagickFalse },
00820     { "Undefined", (long) UndefinedDispose, MagickFalse },
00821     { "0", (long) UndefinedDispose, MagickFalse },
00822     { "1", (long) NoneDispose, MagickFalse },
00823     { "2", (long) BackgroundDispose, MagickFalse },
00824     { "3", (long) PreviousDispose, MagickFalse },
00825     { (char *) NULL, (long) UndefinedDispose, MagickFalse }
00826   },
00827   DistortOptions[] =
00828   {
00829     { "Undefined", (long) UndefinedDistortion, MagickTrue },
00830     { "Affine", (long) AffineDistortion, MagickFalse },
00831     { "AffineProjection", (long) AffineProjectionDistortion, MagickFalse },
00832     { "ScaleRotateTranslate", (long) ScaleRotateTranslateDistortion, MagickFalse },
00833     { "SRT", (long) ScaleRotateTranslateDistortion, MagickFalse },
00834     { "Perspective", (long) PerspectiveDistortion, MagickFalse },
00835     { "PerspectiveProjection", (long) PerspectiveProjectionDistortion, MagickFalse },
00836     { "Bilinear", (long) BilinearForwardDistortion, MagickTrue },
00837     { "BilinearForward", (long) BilinearForwardDistortion, MagickFalse },
00838     { "BilinearReverse", (long) BilinearReverseDistortion, MagickFalse },
00839     { "Polynomial", (long) PolynomialDistortion, MagickFalse },
00840     { "Arc", (long) ArcDistortion, MagickFalse },
00841     { "Polar", (long) PolarDistortion, MagickFalse },
00842     { "DePolar", (long) DePolarDistortion, MagickFalse },
00843     { "Barrel", (long) BarrelDistortion, MagickFalse },
00844     { "BarrelInverse", (long) BarrelInverseDistortion, MagickFalse },
00845     { "Shepards", (long) ShepardsDistortion, MagickFalse },
00846     { (char *) NULL, (long) UndefinedDistortion, MagickFalse }
00847   },
00848   DitherOptions[] =
00849   {
00850     { "Undefined", (long) UndefinedDitherMethod, MagickTrue },
00851     { "None", (long) NoDitherMethod, MagickFalse },
00852     { "FloydSteinberg", (long) FloydSteinbergDitherMethod, MagickFalse },
00853     { "Riemersma", (long) RiemersmaDitherMethod, MagickFalse },
00854     { (char *) NULL, (long) UndefinedEndian, MagickFalse }
00855   },
00856   EndianOptions[] =
00857   {
00858     { "Undefined", (long) UndefinedEndian, MagickTrue },
00859     { "LSB", (long) LSBEndian, MagickFalse },
00860     { "MSB", (long) MSBEndian, MagickFalse },
00861     { (char *) NULL, (long) UndefinedEndian, MagickFalse }
00862   },
00863   EvaluateOptions[] =
00864   {
00865     { "Undefined", (long) UndefinedEvaluateOperator, MagickTrue },
00866     { "Add", (long) AddEvaluateOperator, MagickFalse },
00867     { "AddModulus", (long) AddModulusEvaluateOperator, MagickFalse },
00868     { "And", (long) AndEvaluateOperator, MagickFalse },
00869     { "Cos", (long) CosineEvaluateOperator, MagickFalse },
00870     { "Cosine", (long) CosineEvaluateOperator, MagickFalse },
00871     { "Divide", (long) DivideEvaluateOperator, MagickFalse },
00872     { "GaussianNoise", (long) GaussianNoiseEvaluateOperator, MagickFalse },
00873     { "ImpulseNoise", (long) ImpulseNoiseEvaluateOperator, MagickFalse },
00874     { "LaplacianNoise", (long) LaplacianNoiseEvaluateOperator, MagickFalse },
00875     { "LeftShift", (long) LeftShiftEvaluateOperator, MagickFalse },
00876     { "Log", (long) LogEvaluateOperator, MagickFalse },
00877     { "Max", (long) MaxEvaluateOperator, MagickFalse },
00878     { "Min", (long) MinEvaluateOperator, MagickFalse },
00879     { "MultiplicativeNoise", (long) MultiplicativeNoiseEvaluateOperator, MagickFalse },
00880     { "Multiply", (long) MultiplyEvaluateOperator, MagickFalse },
00881     { "Or", (long) OrEvaluateOperator, MagickFalse },
00882     { "PoissonNoise", (long) PoissonNoiseEvaluateOperator, MagickFalse },
00883     { "Pow", (long) PowEvaluateOperator, MagickFalse },
00884     { "RightShift", (long) RightShiftEvaluateOperator, MagickFalse },
00885     { "Set", (long) SetEvaluateOperator, MagickFalse },
00886     { "Sin", (long) SineEvaluateOperator, MagickFalse },
00887     { "Sine", (long) SineEvaluateOperator, MagickFalse },
00888     { "Subtract", (long) SubtractEvaluateOperator, MagickFalse },
00889     { "Threshold", (long) ThresholdEvaluateOperator, MagickFalse },
00890     { "ThresholdBlack", (long) ThresholdBlackEvaluateOperator, MagickFalse },
00891     { "ThresholdWhite", (long) ThresholdWhiteEvaluateOperator, MagickFalse },
00892     { "UniformNoise", (long) UniformNoiseEvaluateOperator, MagickFalse },
00893     { "Xor", (long) XorEvaluateOperator, MagickFalse },
00894     { (char *) NULL, (long) UndefinedEvaluateOperator, MagickFalse }
00895   },
00896   FillRuleOptions[] =
00897   {
00898     { "Undefined", (long) UndefinedRule, MagickTrue },
00899     { "Evenodd", (long) EvenOddRule, MagickFalse },
00900     { "NonZero", (long) NonZeroRule, MagickFalse },
00901     { (char *) NULL, (long) UndefinedRule, MagickFalse }
00902   },
00903   FilterOptions[] =
00904   {
00905     { "Undefined", (long) UndefinedFilter, MagickTrue },
00906     { "Bartlett", (long) BartlettFilter, MagickFalse },
00907     { "Bessel", (long) BesselFilter, MagickFalse },
00908     { "Blackman", (long) BlackmanFilter, MagickFalse },
00909     { "Bohman", (long) BohmanFilter, MagickFalse },
00910     { "Box", (long) BoxFilter, MagickFalse },
00911     { "Catrom", (long) CatromFilter, MagickFalse },
00912     { "Cubic", (long) CubicFilter, MagickFalse },
00913     { "Gaussian", (long) GaussianFilter, MagickFalse },
00914     { "Hamming", (long) HammingFilter, MagickFalse },
00915     { "Hanning", (long) HanningFilter, MagickFalse },
00916     { "Hermite", (long) HermiteFilter, MagickFalse },
00917     { "Kaiser", (long) KaiserFilter, MagickFalse },
00918     { "Lagrange", (long) LagrangeFilter, MagickFalse },
00919     { "Lanczos", (long) LanczosFilter, MagickFalse },
00920     { "Mitchell", (long) MitchellFilter, MagickFalse },
00921     { "Parzen", (long) ParzenFilter, MagickFalse },
00922     { "Point", (long) PointFilter, MagickFalse },
00923     { "Quadratic", (long) QuadraticFilter, MagickFalse },
00924     { "Sinc", (long) SincFilter, MagickFalse },
00925     { "Triangle", (long) TriangleFilter, MagickFalse },
00926     { "Welsh", (long) WelshFilter, MagickFalse },
00927     { (char *) NULL, (long) UndefinedFilter, MagickFalse }
00928   },
00929   FunctionOptions[] =
00930   {
00931     { "Undefined", (long) UndefinedFunction, MagickTrue },
00932     { "Polynomial", (long) PolynomialFunction, MagickFalse },
00933     { "Sinusoid", (long) SinusoidFunction, MagickFalse },
00934     { "ArcSin", (long) ArcsinFunction, MagickFalse },
00935     { "ArcTan", (long) ArctanFunction, MagickFalse },
00936     { (char *) NULL, (long) UndefinedFunction, MagickFalse }
00937   },
00938   GravityOptions[] =
00939   {
00940     { "Undefined", (long) UndefinedGravity, MagickTrue },
00941     { "None", (long) UndefinedGravity, MagickFalse },
00942     { "Center", (long) CenterGravity, MagickFalse },
00943     { "East", (long) EastGravity, MagickFalse },
00944     { "Forget", (long) ForgetGravity, MagickFalse },
00945     { "NorthEast", (long) NorthEastGravity, MagickFalse },
00946     { "North", (long) NorthGravity, MagickFalse },
00947     { "NorthWest", (long) NorthWestGravity, MagickFalse },
00948     { "SouthEast", (long) SouthEastGravity, MagickFalse },
00949     { "South", (long) SouthGravity, MagickFalse },
00950     { "SouthWest", (long) SouthWestGravity, MagickFalse },
00951     { "West", (long) WestGravity, MagickFalse },
00952     { "Static", (long) StaticGravity, MagickFalse },
00953     { (char *) NULL, UndefinedGravity, MagickFalse }
00954   },
00955   ImageListOptions[] =
00956   {
00957     { "append", MagickTrue, MagickFalse },
00958     { "affinity", MagickTrue, MagickFalse },
00959     { "average", MagickTrue, MagickFalse },
00960     { "clut", MagickTrue, MagickFalse },
00961     { "coalesce", MagickTrue, MagickFalse },
00962     { "combine", MagickTrue, MagickFalse },
00963     { "composite", MagickTrue, MagickFalse },
00964     { "crop", MagickTrue, MagickFalse },
00965     { "debug", MagickTrue, MagickFalse },
00966     { "deconstruct", MagickTrue, MagickFalse },
00967     { "delete", MagickTrue, MagickFalse },
00968     { "fft", MagickTrue, MagickFalse },
00969     { "flatten", MagickTrue, MagickFalse },
00970     { "fx", MagickTrue, MagickFalse },
00971     { "hald-clut", MagickTrue, MagickFalse },
00972     { "ift", MagickTrue, MagickFalse },
00973     { "identify", MagickTrue, MagickFalse },
00974     { "insert", MagickTrue, MagickFalse },
00975     { "layers", MagickTrue, MagickFalse },
00976     { "limit", MagickTrue, MagickFalse },
00977     { "map", MagickTrue, MagickFalse },
00978     { "morph", MagickTrue, MagickFalse },
00979     { "mosaic", MagickTrue, MagickFalse },
00980     { "optimize", MagickTrue, MagickFalse },
00981     { "process", MagickTrue, MagickFalse },
00982     { "quiet", MagickTrue, MagickFalse },
00983     { "separate", MagickTrue, MagickFalse },
00984     { "swap", MagickTrue, MagickFalse },
00985     { "write", MagickTrue, MagickFalse },
00986     { (char *) NULL, MagickFalse, MagickFalse }
00987   },
00988   IntentOptions[] =
00989   {
00990     { "Undefined", (long) UndefinedIntent, MagickTrue },
00991     { "Absolute", (long) AbsoluteIntent, MagickFalse },
00992     { "Perceptual", (long) PerceptualIntent, MagickFalse },
00993     { "Relative", (long) RelativeIntent, MagickFalse },
00994     { "Saturation", (long) SaturationIntent, MagickFalse },
00995     { (char *) NULL, (long) UndefinedIntent, MagickFalse }
00996   },
00997   InterlaceOptions[] =
00998   {
00999     { "Undefined", (long) UndefinedInterlace, MagickTrue },
01000     { "Line", (long) LineInterlace, MagickFalse },
01001     { "None", (long) NoInterlace, MagickFalse },
01002     { "Plane", (long) PlaneInterlace, MagickFalse },
01003     { "Partition", (long) PartitionInterlace, MagickFalse },
01004     { "GIF", (long) GIFInterlace, MagickFalse },
01005     { "JPEG", (long) JPEGInterlace, MagickFalse },
01006     { "PNG", (long) PNGInterlace, MagickFalse },
01007     { (char *) NULL, (long) UndefinedInterlace, MagickFalse }
01008   },
01009   InterpolateOptions[] =
01010   {
01011     { "Undefined", (long) UndefinedInterpolatePixel, MagickTrue },
01012     { "Average", (long) AverageInterpolatePixel, MagickFalse },
01013     { "Bicubic", (long) BicubicInterpolatePixel, MagickFalse },
01014     { "Bilinear", (long) BilinearInterpolatePixel, MagickFalse },
01015     { "filter", (long) FilterInterpolatePixel, MagickFalse },
01016     { "Integer", (long) IntegerInterpolatePixel, MagickFalse },
01017     { "Mesh", (long) MeshInterpolatePixel, MagickFalse },
01018     { "NearestNeighbor", (long) NearestNeighborInterpolatePixel, MagickFalse },
01019     { "Spline", (long) SplineInterpolatePixel, MagickFalse },
01020     { (char *) NULL, (long) UndefinedInterpolatePixel, MagickFalse }
01021   },
01022   LayerOptions[] =
01023   {
01024     { "Undefined", (long) UndefinedLayer, MagickTrue },
01025     { "Coalesce", (long) CoalesceLayer, MagickFalse },
01026     { "CompareAny", (long) CompareAnyLayer, MagickFalse },
01027     { "CompareClear", (long) CompareClearLayer, MagickFalse },
01028     { "CompareOverlay", (long) CompareOverlayLayer, MagickFalse },
01029     { "Dispose", (long) DisposeLayer, MagickFalse },
01030     { "Optimize", (long) OptimizeLayer, MagickFalse },
01031     { "OptimizeFrame", (long) OptimizeImageLayer, MagickFalse },
01032     { "OptimizePlus", (long) OptimizePlusLayer, MagickFalse },
01033     { "OptimizeTransparency", (long) OptimizeTransLayer, MagickFalse },
01034     { "RemoveDups", (long) RemoveDupsLayer, MagickFalse },
01035     { "RemoveZero", (long) RemoveZeroLayer, MagickFalse },
01036     { "Composite", (long) CompositeLayer, MagickFalse },
01037     { "Merge", (long) MergeLayer, MagickFalse },
01038     { "Flatten", (long) FlattenLayer, MagickFalse },
01039     { "Mosaic", (long) MosaicLayer, MagickFalse },
01040     { "TrimBounds", (long) TrimBoundsLayer, MagickFalse },
01041     { (char *) NULL, (long) UndefinedLayer, MagickFalse }
01042   },
01043   LineCapOptions[] =
01044   {
01045     { "Undefined", (long) UndefinedCap, MagickTrue },
01046     { "Butt", (long) ButtCap, MagickFalse },
01047     { "Round", (long) RoundCap, MagickFalse },
01048     { "Square", (long) SquareCap, MagickFalse },
01049     { (char *) NULL, (long) UndefinedCap, MagickFalse }
01050   },
01051   LineJoinOptions[] =
01052   {
01053     { "Undefined", (long) UndefinedJoin, MagickTrue },
01054     { "Bevel", (long) BevelJoin, MagickFalse },
01055     { "Miter", (long) MiterJoin, MagickFalse },
01056     { "Round", (long) RoundJoin, MagickFalse },
01057     { (char *) NULL, (long) UndefinedJoin, MagickFalse }
01058   },
01059   ListOptions[] =
01060   {
01061     { "Align", (long) MagickAlignOptions, MagickFalse },
01062     { "Alpha", (long) MagickAlphaOptions, MagickFalse },
01063     { "Boolean", (long) MagickBooleanOptions, MagickFalse },
01064     { "Channel", (long) MagickChannelOptions, MagickFalse },
01065     { "Class", (long) MagickClassOptions, MagickFalse },
01066     { "ClipPath", (long) MagickClipPathOptions, MagickFalse },
01067     { "Coder", (long) MagickCoderOptions, MagickFalse },
01068     { "Color", (long) MagickColorOptions, MagickFalse },
01069     { "Colorspace", (long) MagickColorspaceOptions, MagickFalse },
01070     { "Command", (long) MagickCommandOptions, MagickFalse },
01071     { "Compose", (long) MagickComposeOptions, MagickFalse },
01072     { "Compress", (long) MagickCompressOptions, MagickFalse },
01073     { "Configure", (long) MagickConfigureOptions, MagickFalse },
01074     { "DataType", (long) MagickDataTypeOptions, MagickFalse },
01075     { "Debug", (long) MagickDebugOptions, MagickFalse },
01076     { "Decoration", (long) MagickDecorateOptions, MagickFalse },
01077     { "Delegate", (long) MagickDelegateOptions, MagickFalse },
01078     { "Dispose", (long) MagickDisposeOptions, MagickFalse },
01079     { "Distort", (long) MagickDistortOptions, MagickFalse },
01080     { "Dither", (long) MagickDitherOptions, MagickFalse },
01081     { "Endian", (long) MagickEndianOptions, MagickFalse },
01082     { "Evaluate", (long) MagickEvaluateOptions, MagickFalse },
01083     { "FillRule", (long) MagickFillRuleOptions, MagickFalse },
01084     { "Filter", (long) MagickFilterOptions, MagickFalse },
01085     { "Font", (long) MagickFontOptions, MagickFalse },
01086     { "Format", (long) MagickFormatOptions, MagickFalse },
01087     { "Function", (long) MagickFunctionOptions, MagickFalse },
01088     { "Gravity", (long) MagickGravityOptions, MagickFalse },
01089     { "ImageList", (long) MagickImageListOptions, MagickFalse },
01090     { "Intent", (long) MagickIntentOptions, MagickFalse },
01091     { "Interlace", (long) MagickInterlaceOptions, MagickFalse },
01092     { "Interpolate", (long) MagickInterpolateOptions, MagickFalse },
01093     { "Layers", (long) MagickLayerOptions, MagickFalse },
01094     { "LineCap", (long) MagickLineCapOptions, MagickFalse },
01095     { "LineJoin", (long) MagickLineJoinOptions, MagickFalse },
01096     { "List", (long) MagickListOptions, MagickFalse },
01097     { "Locale", (long) MagickLocaleOptions, MagickFalse },
01098     { "LogEvent", (long) MagickLogEventOptions, MagickFalse },
01099     { "Log", (long) MagickLogOptions, MagickFalse },
01100     { "Magic", (long) MagickMagicOptions, MagickFalse },
01101     { "Method", (long) MagickMethodOptions, MagickFalse },
01102     { "Metric", (long) MagickMetricOptions, MagickFalse },
01103     { "Mime", (long) MagickMimeOptions, MagickFalse },
01104     { "Mode", (long) MagickModeOptions, MagickFalse },
01105     { "Module", (long) MagickModuleOptions, MagickFalse },
01106     { "Noise", (long) MagickNoiseOptions, MagickFalse },
01107     { "Orientation", (long) MagickOrientationOptions, MagickFalse },
01108     { "Policy", (long) MagickPolicyOptions, MagickFalse },
01109     { "PolicyDomain", (long) MagickPolicyDomainOptions, MagickFalse },
01110     { "PolicyRights", (long) MagickPolicyRightsOptions, MagickFalse },
01111     { "Preview", (long) MagickPreviewOptions, MagickFalse },
01112     { "Primitive", (long) MagickPrimitiveOptions, MagickFalse },
01113     { "QuantumFormat", (long) MagickQuantumFormatOptions, MagickFalse },
01114     { "Resource", (long) MagickResourceOptions, MagickFalse },
01115     { "SparseColor", (long) MagickSparseColorOptions, MagickFalse },
01116     { "Storage", (long) MagickStorageOptions, MagickFalse },
01117     { "Stretch", (long) MagickStretchOptions, MagickFalse },
01118     { "Style", (long) MagickStyleOptions, MagickFalse },
01119     { "Threshold", (long) MagickThresholdOptions, MagickFalse },
01120     { "Type", (long) MagickTypeOptions, MagickFalse },
01121     { "Units", (long) MagickResolutionOptions, MagickFalse },
01122     { "Undefined", (long) MagickUndefinedOptions, MagickTrue },
01123     { "Validate", (long) MagickValidateOptions, MagickFalse },
01124     { "VirtualPixel", (long) MagickVirtualPixelOptions, MagickFalse },
01125     { (char *) NULL, (long) MagickUndefinedOptions, MagickFalse }
01126   },
01127   LogEventOptions[] =
01128   {
01129     { "Undefined", (long) UndefinedEvents, MagickTrue },
01130     { "All", (long) (AllEvents &~ TraceEvent), MagickFalse },
01131     { "Annotate", (long) AnnotateEvent, MagickFalse },
01132     { "Blob", (long) BlobEvent, MagickFalse },
01133     { "Cache", (long) CacheEvent, MagickFalse },
01134     { "Coder", (long) CoderEvent, MagickFalse },
01135     { "Configure", (long) ConfigureEvent, MagickFalse },
01136     { "Deprecate", (long) DeprecateEvent, MagickFalse },
01137     { "Draw", (long) DrawEvent, MagickFalse },
01138     { "Exception", (long) ExceptionEvent, MagickFalse },
01139     { "Locale", (long) LocaleEvent, MagickFalse },
01140     { "Module", (long) ModuleEvent, MagickFalse },
01141     { "None", (long) NoEvents, MagickFalse },
01142     { "Policy", (long) PolicyEvent, MagickFalse },
01143     { "Resource", (long) ResourceEvent, MagickFalse },
01144     { "Trace", (long) TraceEvent, MagickFalse },
01145     { "Transform", (long) TransformEvent, MagickFalse },
01146     { "User", (long) UserEvent, MagickFalse },
01147     { "Wand", (long) WandEvent, MagickFalse },
01148     { "X11", (long) X11Event, MagickFalse },
01149     { (char *) NULL, (long) UndefinedEvents, MagickFalse }
01150   },
01151   MetricOptions[] =
01152   {
01153     { "Undefined", (long) UndefinedMetric, MagickTrue },
01154     { "AE", (long) AbsoluteErrorMetric, MagickFalse },
01155     { "MAE", (long) MeanAbsoluteErrorMetric, MagickFalse },
01156     { "MEPP", (long) MeanErrorPerPixelMetric, MagickFalse },
01157     { "MSE", (long) MeanSquaredErrorMetric, MagickFalse },
01158     { "PAE", (long) PeakAbsoluteErrorMetric, MagickFalse },
01159     { "PSNR", (long) PeakSignalToNoiseRatioMetric, MagickFalse },
01160     { "RMSE", (long) RootMeanSquaredErrorMetric, MagickFalse },
01161     { (char *) NULL, (long) UndefinedMetric, MagickFalse }
01162   },
01163   MethodOptions[] =
01164   {
01165     { "Undefined", (long) UndefinedMethod, MagickTrue },
01166     { "FillToBorder", (long) FillToBorderMethod, MagickFalse },
01167     { "Floodfill", (long) FloodfillMethod, MagickFalse },
01168     { "Point", (long) PointMethod, MagickFalse },
01169     { "Replace", (long) ReplaceMethod, MagickFalse },
01170     { "Reset", (long) ResetMethod, MagickFalse },
01171     { (char *) NULL, (long) UndefinedMethod, MagickFalse }
01172   },
01173   ModeOptions[] =
01174   {
01175     { "Undefined", (long) UndefinedMode, MagickTrue },
01176     { "Concatenate", (long) ConcatenateMode, MagickFalse },
01177     { "Frame", (long) FrameMode, MagickFalse },
01178     { "Unframe", (long) UnframeMode, MagickFalse },
01179     { (char *) NULL, (long) UndefinedMode, MagickFalse }
01180   },
01181   NoiseOptions[] =
01182   {
01183     { "Undefined", (long) UndefinedNoise, MagickTrue },
01184     { "Gaussian", (long) (long) GaussianNoise, MagickFalse },
01185     { "Impulse", (long) ImpulseNoise, MagickFalse },
01186     { "Laplacian", (long) LaplacianNoise, MagickFalse },
01187     { "Multiplicative", (long) MultiplicativeGaussianNoise, MagickFalse },
01188     { "Poisson", (long) PoissonNoise, MagickFalse },
01189     { "Random", (long) RandomNoise, MagickFalse },
01190     { "Uniform", (long) UniformNoise, MagickFalse },
01191     { (char *) NULL, (long) UndefinedNoise, MagickFalse }
01192   },
01193   OrientationOptions[] =
01194   {
01195     { "Undefined", (long) UndefinedOrientation, MagickTrue },
01196     { "TopLeft", (long) TopLeftOrientation, MagickFalse },
01197     { "TopRight", (long) TopRightOrientation, MagickFalse },
01198     { "BottomRight", (long) BottomRightOrientation, MagickFalse },
01199     { "BottomLeft", (long) BottomLeftOrientation, MagickFalse },
01200     { "LeftTop", (long) LeftTopOrientation, MagickFalse },
01201     { "RightTop", (long) RightTopOrientation, MagickFalse },
01202     { "RightBottom", (long) RightBottomOrientation, MagickFalse },
01203     { "LeftBottom", (long) LeftBottomOrientation, MagickFalse }
01204   },
01205   PolicyDomainOptions[] =
01206   {
01207     { "Undefined", (long) UndefinedPolicyDomain, MagickTrue },
01208     { "Coder", (long) CoderPolicyDomain, MagickFalse },
01209     { "Delegate", (long) DelegatePolicyDomain, MagickFalse },
01210     { "Filter", (long) FilterPolicyDomain, MagickFalse },
01211     { "Path", (long) PathPolicyDomain, MagickFalse },
01212     { "Resource", (long) ResourcePolicyDomain, MagickFalse }
01213   },
01214   PolicyRightsOptions[] =
01215   {
01216     { "Undefined", (long) UndefinedPolicyRights, MagickTrue },
01217     { "None", (long) NoPolicyRights, MagickFalse },
01218     { "Read", (long) ReadPolicyRights, MagickFalse },
01219     { "Write", (long) WritePolicyRights, MagickFalse },
01220     { "Execute", (long) ExecutePolicyRights, MagickFalse }
01221   },
01222   PreviewOptions[] =
01223   {
01224     { "Undefined", (long) UndefinedPreview, MagickTrue },
01225     { "AddNoise", (long) AddNoisePreview, MagickFalse },
01226     { "Blur", (long) BlurPreview, MagickFalse },
01227     { "Brightness", (long) BrightnessPreview, MagickFalse },
01228     { "Charcoal", (long) CharcoalDrawingPreview, MagickFalse },
01229     { "Despeckle", (long) DespecklePreview, MagickFalse },
01230     { "Dull", (long) DullPreview, MagickFalse },
01231     { "EdgeDetect", (long) EdgeDetectPreview, MagickFalse },
01232     { "Gamma", (long) GammaPreview, MagickFalse },
01233     { "Grayscale", (long) GrayscalePreview, MagickFalse },
01234     { "Hue", (long) HuePreview, MagickFalse },
01235     { "Implode", (long) ImplodePreview, MagickFalse },
01236     { "JPEG", (long) JPEGPreview, MagickFalse },
01237     { "OilPaint", (long) OilPaintPreview, MagickFalse },
01238     { "Quantize", (long) QuantizePreview, MagickFalse },
01239     { "Raise", (long) RaisePreview, MagickFalse },
01240     { "ReduceNoise", (long) ReduceNoisePreview, MagickFalse },
01241     { "Roll", (long) RollPreview, MagickFalse },
01242     { "Rotate", (long) RotatePreview, MagickFalse },
01243     { "Saturation", (long) SaturationPreview, MagickFalse },
01244     { "Segment", (long) SegmentPreview, MagickFalse },
01245     { "Shade", (long) ShadePreview, MagickFalse },
01246     { "Sharpen", (long) SharpenPreview, MagickFalse },
01247     { "Shear", (long) ShearPreview, MagickFalse },
01248     { "Solarize", (long) SolarizePreview, MagickFalse },
01249     { "Spiff", (long) SpiffPreview, MagickFalse },
01250     { "Spread", (long) SpreadPreview, MagickFalse },
01251     { "Swirl", (long) SwirlPreview, MagickFalse },
01252     { "Threshold", (long) ThresholdPreview, MagickFalse },
01253     { "Wave", (long) WavePreview, MagickFalse },
01254     { (char *) NULL, (long) UndefinedPreview, MagickFalse }
01255   },
01256   PrimitiveOptions[] =
01257   {
01258     { "Undefined", (long) UndefinedPrimitive, MagickTrue },
01259     { "Arc", (long) ArcPrimitive, MagickFalse },
01260     { "Bezier", (long) BezierPrimitive, MagickFalse },
01261     { "Circle", (long) CirclePrimitive, MagickFalse },
01262     { "Color", (long) ColorPrimitive, MagickFalse },
01263     { "Ellipse", (long) EllipsePrimitive, MagickFalse },
01264     { "Image", (long) ImagePrimitive, MagickFalse },
01265     { "Line", (long) LinePrimitive, MagickFalse },
01266     { "Matte", (long) MattePrimitive, MagickFalse },
01267     { "Path", (long) PathPrimitive, MagickFalse },
01268     { "Point", (long) PointPrimitive, MagickFalse },
01269     { "Polygon", (long) PolygonPrimitive, MagickFalse },
01270     { "Polyline", (long) PolylinePrimitive, MagickFalse },
01271     { "Rectangle", (long) RectanglePrimitive, MagickFalse },
01272     { "roundRectangle", (long) RoundRectanglePrimitive, MagickFalse },
01273     { "Text", (long) TextPrimitive, MagickFalse },
01274     { (char *) NULL, (long) UndefinedPrimitive, MagickFalse }
01275   },
01276   QuantumFormatOptions[] =
01277   {
01278     { "Undefined", (long) UndefinedQuantumFormat, MagickTrue },
01279     { "FloatingPoint", (long) FloatingPointQuantumFormat, MagickFalse },
01280     { "Signed", (long) SignedQuantumFormat, MagickFalse },
01281     { "Unsigned", (long) UnsignedQuantumFormat, MagickFalse },
01282     { (char *) NULL, (long) FloatingPointQuantumFormat, MagickFalse }
01283   },
01284   ResolutionOptions[] =
01285   {
01286     { "Undefined", (long) UndefinedResolution, MagickTrue },
01287     { "PixelsPerInch", (long) PixelsPerInchResolution, MagickFalse },
01288     { "PixelsPerCentimeter", (long) PixelsPerCentimeterResolution, MagickFalse },
01289     { (char *) NULL, (long) UndefinedResolution, MagickFalse }
01290   },
01291   ResourceOptions[] =
01292   {
01293     { "Undefined", (long) UndefinedResource, MagickTrue },
01294     { "Area", (long) AreaResource, MagickFalse },
01295     { "Disk", (long) DiskResource, MagickFalse },
01296     { "File", (long) FileResource, MagickFalse },
01297     { "Map", (long) MapResource, MagickFalse },
01298     { "Memory", (long) MemoryResource, MagickFalse },
01299     { "Thread", (long) ThreadResource, MagickFalse },
01300     { "Time", (long) TimeResource, MagickFalse },
01301     { (char *) NULL, (long) UndefinedResource, MagickFalse }
01302   },
01303   SparseColorOptions[] =
01304   {
01305     { "Undefined", (long) UndefinedDistortion, MagickTrue },
01306     { "Barycentric", (long) BarycentricColorInterpolate, MagickFalse },
01307     { "Bilinear", (long) BilinearColorInterpolate, MagickFalse },
01308     { "Shepards", (long) ShepardsColorInterpolate, MagickFalse },
01309     { "Voronoi", (long) VoronoiColorInterpolate, MagickFalse },
01310     { (char *) NULL, (long) UndefinedResource, MagickFalse }
01311   },
01312   StorageOptions[] =
01313   {
01314     { "Undefined", (long) UndefinedPixel, MagickTrue },
01315     { "Char", (long) CharPixel, MagickFalse },
01316     { "Double", (long) DoublePixel, MagickFalse },
01317     { "Float", (long) FloatPixel, MagickFalse },
01318     { "Integer", (long) IntegerPixel, MagickFalse },
01319     { "Long", (long) LongPixel, MagickFalse },
01320     { "Quantum", (long) QuantumPixel, MagickFalse },
01321     { "Short", (long) ShortPixel, MagickFalse },
01322     { (char *) NULL, (long) UndefinedResource, MagickFalse }
01323   },
01324   StretchOptions[] =
01325   {
01326     { "Undefined", (long) UndefinedStretch, MagickTrue },
01327     { "Any", (long) AnyStretch, MagickFalse },
01328     { "Condensed", (long) CondensedStretch, MagickFalse },
01329     { "Expanded", (long) ExpandedStretch, MagickFalse },
01330     { "ExtraCondensed", (long) ExtraCondensedStretch, MagickFalse },
01331     { "ExtraExpanded", (long) ExtraExpandedStretch, MagickFalse },
01332     { "Normal", (long) NormalStretch, MagickFalse },
01333     { "SemiCondensed", (long) SemiCondensedStretch, MagickFalse },
01334     { "SemiExpanded", (long) SemiExpandedStretch, MagickFalse },
01335     { "UltraCondensed", (long) UltraCondensedStretch, MagickFalse },
01336     { "UltraExpanded", (long) UltraExpandedStretch, MagickFalse },
01337     { (char *) NULL, (long) UndefinedStretch, MagickFalse }
01338   },
01339   StyleOptions[] =
01340   {
01341     { "Undefined", (long) UndefinedStyle, MagickTrue },
01342     { "Any", (long) AnyStyle, MagickFalse },
01343     { "Italic", (long) ItalicStyle, MagickFalse },
01344     { "Normal", (long) NormalStyle, MagickFalse },
01345     { "Oblique", (long) ObliqueStyle, MagickFalse },
01346     { (char *) NULL, (long) UndefinedStyle, MagickFalse }
01347   },
01348   TypeOptions[] =
01349   {
01350     { "Undefined", (long) UndefinedType, MagickTrue },
01351     { "Bilevel", (long) BilevelType, MagickFalse },
01352     { "ColorSeparation", (long) ColorSeparationType, MagickFalse },
01353     { "ColorSeparationMatte", (long) ColorSeparationMatteType, MagickFalse },
01354     { "Grayscale", (long) GrayscaleType, MagickFalse },
01355     { "GrayscaleMatte", (long) GrayscaleMatteType, MagickFalse },
01356     { "Optimize", (long) OptimizeType, MagickFalse },
01357     { "Palette", (long) PaletteType, MagickFalse },
01358     { "PaletteBilevelMatte", (long) PaletteBilevelMatteType, MagickFalse },
01359     { "PaletteMatte", (long) PaletteMatteType, MagickFalse },
01360     { "TrueColorMatte", (long) TrueColorMatteType, MagickFalse },
01361     { "TrueColor", (long) TrueColorType, MagickFalse },
01362     { (char *) NULL, (long) UndefinedType, MagickFalse }
01363   },
01364   ValidateOptions[] =
01365   {
01366     { "Undefined", (long) UndefinedValidate, MagickTrue },
01367     { "All", (long) AllValidate, MagickFalse },
01368     { "Compare", (long) CompareValidate, MagickFalse },
01369     { "Composite", (long) CompositeValidate, MagickFalse },
01370     { "Convert", (long) ConvertValidate, MagickFalse },
01371     { "FormatsInMemory", (long) FormatsInMemoryValidate, MagickFalse },
01372     { "FormatsOnDisk", (long) FormatsOnDiskValidate, MagickFalse },
01373     { "Identify", (long) IdentifyValidate, MagickFalse },
01374     { "ImportExport", (long) ImportExportValidate, MagickFalse },
01375     { "Montage", (long) MontageValidate, MagickFalse },
01376     { "Stream", (long) StreamValidate, MagickFalse },
01377     { "None", (long) NoValidate, MagickFalse },
01378     { (char *) NULL, (long) UndefinedValidate, MagickFalse }
01379   },
01380   VirtualPixelOptions[] =
01381   {
01382     { "Undefined", (long) UndefinedVirtualPixelMethod, MagickTrue },
01383     { "Background", (long) BackgroundVirtualPixelMethod, MagickFalse },
01384     { "Black", (long) BlackVirtualPixelMethod, MagickFalse },
01385     { "Constant", (long) BackgroundVirtualPixelMethod, MagickTrue }, /* deprecated */
01386     { "CheckerTile", (long) CheckerTileVirtualPixelMethod, MagickFalse },
01387     { "Dither", (long) DitherVirtualPixelMethod, MagickFalse },
01388     { "Edge", (long) EdgeVirtualPixelMethod, MagickFalse },
01389     { "Gray", (long) GrayVirtualPixelMethod, MagickFalse },
01390     { "HorizontalTile", (long) HorizontalTileVirtualPixelMethod, MagickFalse },
01391     { "HorizontalTileEdge", (long) HorizontalTileEdgeVirtualPixelMethod, MagickFalse },
01392     { "Mirror", (long) MirrorVirtualPixelMethod, MagickFalse },
01393     { "Random", (long) RandomVirtualPixelMethod, MagickFalse },
01394     { "Tile", (long) TileVirtualPixelMethod, MagickFalse },
01395     { "Transparent", (long) TransparentVirtualPixelMethod, MagickFalse },
01396     { "VerticalTile", (long) VerticalTileVirtualPixelMethod, MagickFalse },
01397     { "VerticalTileEdge", (long) VerticalTileEdgeVirtualPixelMethod, MagickFalse },
01398     { "White", (long) WhiteVirtualPixelMethod, MagickFalse },
01399     { (char *) NULL, (long) UndefinedVirtualPixelMethod, MagickFalse }
01400   };
01401 
01402 /*
01403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01404 %                                                                             %
01405 %                                                                             %
01406 %                                                                             %
01407 %   C l o n e I m a g e O p t i o n s                                         %
01408 %                                                                             %
01409 %                                                                             %
01410 %                                                                             %
01411 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01412 %
01413 %  CloneImageOptions() clones one or more image options.
01414 %
01415 %  The format of the CloneImageOptions method is:
01416 %
01417 %      MagickBooleanType CloneImageOptions(ImageInfo *image_info,
01418 %        const ImageInfo *clone_info)
01419 %
01420 %  A description of each parameter follows:
01421 %
01422 %    o image_info: the image info.
01423 %
01424 %    o clone_info: the clone image info.
01425 %
01426 */
01427 MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
01428   const ImageInfo *clone_info)
01429 {
01430   assert(image_info != (ImageInfo *) NULL);
01431   assert(image_info->signature == MagickSignature);
01432   if (image_info->debug != MagickFalse)
01433     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
01434       image_info->filename);
01435   assert(clone_info != (const ImageInfo *) NULL);
01436   assert(clone_info->signature == MagickSignature);
01437   if (clone_info->options != (void *) NULL)
01438     image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
01439       (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
01440   return(MagickTrue);
01441 }
01442 
01443 /*
01444 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01445 %                                                                             %
01446 %                                                                             %
01447 %                                                                             %
01448 %   D e f i n e I m a g e O p t i o n                                         %
01449 %                                                                             %
01450 %                                                                             %
01451 %                                                                             %
01452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01453 %
01454 %  DefineImageOption() associates a key/value pair with an image option.
01455 %
01456 %  The format of the DefineImageOption method is:
01457 %
01458 %      MagickBooleanType DefineImageOption(ImageInfo *image_info,
01459 %        const char *option)
01460 %
01461 %  A description of each parameter follows:
01462 %
01463 %    o image_info: the image info.
01464 %
01465 %    o option: the image option.
01466 %
01467 */
01468 MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
01469   const char *option)
01470 {
01471   char
01472     key[MaxTextExtent],
01473     value[MaxTextExtent];
01474 
01475   register char
01476     *p;
01477 
01478   assert(image_info != (ImageInfo *) NULL);
01479   assert(option != (const char *) NULL);
01480   (void) CopyMagickString(key,option,MaxTextExtent);
01481   for (p=key; *p != '\0'; p++)
01482     if (*p == '=')
01483       break;
01484   *value='\0';
01485   if (*p == '=')
01486     (void) CopyMagickString(value,p+1,MaxTextExtent);
01487   *p='\0';
01488   return(SetImageOption(image_info,key,value));
01489 }
01490 
01491 /*
01492 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01493 %                                                                             %
01494 %                                                                             %
01495 %                                                                             %
01496 %   D e l e t e I m a g e O p t i o n                                         %
01497 %                                                                             %
01498 %                                                                             %
01499 %                                                                             %
01500 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01501 %
01502 %  DeleteImageOption() deletes an key from the image map.
01503 %
01504 %  The format of the DeleteImageOption method is:
01505 %
01506 %      MagickBooleanType DeleteImageOption(ImageInfo *image_info,
01507 %        const char *key)
01508 %
01509 %  A description of each parameter follows:
01510 %
01511 %    o image_info: the image info.
01512 %
01513 %    o option: the image option.
01514 %
01515 */
01516 MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
01517   const char *option)
01518 {
01519   assert(image_info != (ImageInfo *) NULL);
01520   assert(image_info->signature == MagickSignature);
01521   if (image_info->debug != MagickFalse)
01522     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
01523       image_info->filename);
01524   if (image_info->options == (void *) NULL)
01525     return(MagickFalse);
01526   return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
01527 }
01528 
01529 /*
01530 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01531 %                                                                             %
01532 %                                                                             %
01533 %                                                                             %
01534 %   D e s t r o y I m a g e O p t i o n s                                     %
01535 %                                                                             %
01536 %                                                                             %
01537 %                                                                             %
01538 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01539 %
01540 %  DestroyImageOptions() releases memory associated with image option values.
01541 %
01542 %  The format of the DestroyDefines method is:
01543 %
01544 %      void DestroyImageOptions(ImageInfo *image_info)
01545 %
01546 %  A description of each parameter follows:
01547 %
01548 %    o image_info: the image info.
01549 %
01550 */
01551 MagickExport void DestroyImageOptions(ImageInfo *image_info)
01552 {
01553   assert(image_info != (ImageInfo *) NULL);
01554   assert(image_info->signature == MagickSignature);
01555   if (image_info->debug != MagickFalse)
01556     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
01557       image_info->filename);
01558   if (image_info->options != (void *) NULL)
01559     image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
01560 }
01561 
01562 /*
01563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01564 %                                                                             %
01565 %                                                                             %
01566 %                                                                             %
01567 %   G e t I m a g e O p t i o n                                               %
01568 %                                                                             %
01569 %                                                                             %
01570 %                                                                             %
01571 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01572 %
01573 %  GetImageOption() gets a value associated with an image option.
01574 %
01575 %  The format of the GetImageOption method is:
01576 %
01577 %      const char *GetImageOption(const ImageInfo *image_info,
01578 %        const char *key)
01579 %
01580 %  A description of each parameter follows:
01581 %
01582 %    o image_info: the image info.
01583 %
01584 %    o key: the key.
01585 %
01586 */
01587 MagickExport const char *GetImageOption(const ImageInfo *image_info,
01588   const char *key)
01589 {
01590   const char
01591     *option;
01592 
01593   assert(image_info != (ImageInfo *) NULL);
01594   assert(image_info->signature == MagickSignature);
01595   if (image_info->debug != MagickFalse)
01596     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
01597       image_info->filename);
01598   if (image_info->options == (void *) NULL)
01599     return((const char *) NULL);
01600   option=(const char *) GetValueFromSplayTree((SplayTreeInfo *)
01601     image_info->options,key);
01602   return(option);
01603 }
01604 
01605 /*
01606 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01607 %                                                                             %
01608 %                                                                             %
01609 %                                                                             %
01610 %   G e t M a g i c k O p t i o n s                                           %
01611 %                                                                             %
01612 %                                                                             %
01613 %                                                                             %
01614 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01615 %
01616 %  GetMagickOptions() returns a list of values.
01617 %
01618 %  The format of the GetMagickOptions method is:
01619 %
01620 %      const char **GetMagickOptions(const MagickOption value)
01621 %
01622 %  A description of each parameter follows:
01623 %
01624 %    o value: the value.
01625 %
01626 */
01627 
01628 static const OptionInfo *GetOptionInfo(const MagickOption option)
01629 {
01630   switch (option)
01631   {
01632     case MagickAlignOptions: return(AlignOptions);
01633     case MagickAlphaOptions: return(AlphaOptions);
01634     case MagickBooleanOptions: return(BooleanOptions);
01635     case MagickChannelOptions: return(ChannelOptions);
01636     case MagickClassOptions: return(ClassOptions);
01637     case MagickClipPathOptions: return(ClipPathOptions);
01638     case MagickColorspaceOptions: return(ColorspaceOptions);
01639     case MagickCommandOptions: return(CommandOptions);
01640     case MagickComposeOptions: return(ComposeOptions);
01641     case MagickCompressOptions: return(CompressOptions);
01642     case MagickDataTypeOptions: return(DataTypeOptions);
01643     case MagickDebugOptions: return(LogEventOptions);
01644     case MagickDecorateOptions: return(DecorateOptions);
01645     case MagickDisposeOptions: return(DisposeOptions);
01646     case MagickDistortOptions: return(DistortOptions);
01647     case MagickDitherOptions: return(DitherOptions);
01648     case MagickEndianOptions: return(EndianOptions);
01649     case MagickEvaluateOptions: return(EvaluateOptions);
01650     case MagickFillRuleOptions: return(FillRuleOptions);
01651     case MagickFilterOptions: return(FilterOptions);
01652     case MagickFunctionOptions: return(FunctionOptions);
01653     case MagickGravityOptions: return(GravityOptions);
01654     case MagickImageListOptions: return(ImageListOptions);
01655     case MagickIntentOptions: return(IntentOptions);
01656     case MagickInterlaceOptions: return(InterlaceOptions);
01657     case MagickInterpolateOptions: return(InterpolateOptions);
01658     case MagickLayerOptions: return(LayerOptions);
01659     case MagickLineCapOptions: return(LineCapOptions);
01660     case MagickLineJoinOptions: return(LineJoinOptions);
01661     case MagickListOptions: return(ListOptions);
01662     case MagickLogEventOptions: return(LogEventOptions);
01663     case MagickMetricOptions: return(MetricOptions);
01664     case MagickMethodOptions: return(MethodOptions);
01665     case MagickModeOptions: return(ModeOptions);
01666     case MagickNoiseOptions: return(NoiseOptions);
01667     case MagickOrientationOptions: return(OrientationOptions);
01668     case MagickPolicyDomainOptions: return(PolicyDomainOptions);
01669     case MagickPolicyRightsOptions: return(PolicyRightsOptions);
01670     case MagickPreviewOptions: return(PreviewOptions);
01671     case MagickPrimitiveOptions: return(PrimitiveOptions);
01672     case MagickQuantumFormatOptions: return(QuantumFormatOptions);
01673     case MagickResolutionOptions: return(ResolutionOptions);
01674     case MagickResourceOptions: return(ResourceOptions);
01675     case MagickSparseColorOptions: return(SparseColorOptions);
01676     case MagickStorageOptions: return(StorageOptions);
01677     case MagickStretchOptions: return(StretchOptions);
01678     case MagickStyleOptions: return(StyleOptions);
01679     case MagickTypeOptions: return(TypeOptions);
01680     case MagickValidateOptions: return(ValidateOptions);
01681     case MagickVirtualPixelOptions: return(VirtualPixelOptions);
01682     default: break;
01683   }
01684   return((const OptionInfo *) NULL);
01685 }
01686 
01687 MagickExport char **GetMagickOptions(const MagickOption value)
01688 {
01689   char
01690     **values;
01691 
01692   const OptionInfo
01693     *option_info;
01694 
01695   register long
01696     i;
01697 
01698   option_info=GetOptionInfo(value);
01699   if (option_info == (const OptionInfo *) NULL)
01700     return((char **) NULL);
01701   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
01702   values=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*values));
01703   if (values == (char **) NULL)
01704     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
01705   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
01706     values[i]=AcquireString(option_info[i].mnemonic);
01707   values[i]=(char *) NULL;
01708   return(values);
01709 }
01710 
01711 /*
01712 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01713 %                                                                             %
01714 %                                                                             %
01715 %                                                                             %
01716 %   G e t N e x t I m a g e O p t i o n                                       %
01717 %                                                                             %
01718 %                                                                             %
01719 %                                                                             %
01720 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01721 %
01722 %  GetNextImageOption() gets the next image option value.
01723 %
01724 %  The format of the GetNextImageOption method is:
01725 %
01726 %      char *GetNextImageOption(const ImageInfo *image_info)
01727 %
01728 %  A description of each parameter follows:
01729 %
01730 %    o image_info: the image info.
01731 %
01732 */
01733 MagickExport char *GetNextImageOption(const ImageInfo *image_info)
01734 {
01735   assert(image_info != (ImageInfo *) NULL);
01736   assert(image_info->signature == MagickSignature);
01737   if (image_info->debug != MagickFalse)
01738     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
01739       image_info->filename);
01740   if (image_info->options == (void *) NULL)
01741     return((char *) NULL);
01742   return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
01743 }
01744 
01745 /*
01746 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01747 %                                                                             %
01748 %                                                                             %
01749 %                                                                             %
01750 %     I s M a g i c k O p t i o n                                             %
01751 %                                                                             %
01752 %                                                                             %
01753 %                                                                             %
01754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01755 %
01756 %  IsMagickOption() returns MagickTrue if the option begins with a - or + and
01757 %  the first character that follows is alphanumeric.
01758 %
01759 %  The format of the IsMagickOption method is:
01760 %
01761 %      MagickBooleanType IsMagickOption(const char *option)
01762 %
01763 %  A description of each parameter follows:
01764 %
01765 %    o option: the option.
01766 %
01767 */
01768 MagickExport MagickBooleanType IsMagickOption(const char *option)
01769 {
01770   assert(option != (const char *) NULL);
01771   if ((*option != '-') && (*option != '+'))
01772     return(MagickFalse);
01773   if (strlen(option) == 1)
01774     return(MagickFalse);
01775   option++;
01776   if (isalpha((int) ((unsigned char) *option)) == 0)
01777     return(MagickFalse);
01778   return(MagickTrue);
01779 }
01780 
01781 /*
01782 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01783 %                                                                             %
01784 %                                                                             %
01785 %                                                                             %
01786 %   M a g i c k O p t i o n T o M n e m o n i c                               %
01787 %                                                                             %
01788 %                                                                             %
01789 %                                                                             %
01790 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01791 %
01792 %  MagickOptionToMnemonic() returns an enumerated value as a mnemonic.
01793 %
01794 %  The format of the MagickOptionToMnemonic method is:
01795 %
01796 %      const char *MagickOptionToMnemonic(const MagickOption option,
01797 %        const long type)
01798 %
01799 %  A description of each parameter follows:
01800 %
01801 %    o option: the option.
01802 %
01803 %    o type: one or more values separated by commas.
01804 %
01805 */
01806 MagickExport const char *MagickOptionToMnemonic(const MagickOption option,
01807   const long type)
01808 {
01809   const OptionInfo
01810     *option_info;
01811 
01812   register long
01813     i;
01814 
01815   option_info=GetOptionInfo(option);
01816   if (option_info == (const OptionInfo *) NULL)
01817     return((const char *) NULL);
01818   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
01819     if (type == option_info[i].type)
01820       break;
01821   if (option_info[i].mnemonic == (const char *) NULL)
01822     return("undefined");
01823   return(option_info[i].mnemonic);
01824 }
01825 
01826 /*
01827 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01828 %                                                                             %
01829 %                                                                             %
01830 %                                                                             %
01831 %   L i s t M a g i c k O p t i o n s                                         %
01832 %                                                                             %
01833 %                                                                             %
01834 %                                                                             %
01835 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01836 %
01837 %  ListMagickOptions() lists the contents of enumerated option type(s).
01838 %
01839 %  The format of the ListMagickOptions method is:
01840 %
01841 %      MagickBooleanType ListMagickOptions(FILE *file,const MagickOption option,
01842 %        ExceptionInfo *exception)
01843 %
01844 %  A description of each parameter follows:
01845 %
01846 %    o file:  list options to this file handle.
01847 %
01848 %    o option:  list these options.
01849 %
01850 %    o exception:  return any errors or warnings in this structure.
01851 %
01852 */
01853 MagickExport MagickBooleanType ListMagickOptions(FILE *file,
01854   const MagickOption option,ExceptionInfo *magick_unused(exception))
01855 {
01856   const OptionInfo
01857     *option_info;
01858 
01859   register long
01860     i;
01861 
01862   if (file == (FILE *) NULL)
01863     file=stdout;
01864   option_info=GetOptionInfo(option);
01865   if (option_info == (const OptionInfo *) NULL)
01866     return(MagickFalse);
01867   for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
01868   {
01869     if (option_info[i].stealth != MagickFalse)
01870       continue;
01871     (void) fprintf(file,"%s\n",option_info[i].mnemonic);
01872   }
01873   return(MagickTrue);
01874 }
01875 
01876 /*
01877 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01878 %                                                                             %
01879 %                                                                             %
01880 %                                                                             %
01881 %   P a r s e C h a n n e l O p t i o n                                       %
01882 %                                                                             %
01883 %                                                                             %
01884 %                                                                             %
01885 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01886 %
01887 %  ParseChannelOption() parses a string and returns an enumerated channel
01888 %  type(s).
01889 %
01890 %  The format of the ParseChannelOption method is:
01891 %
01892 %      long ParseChannelOption(const char *channels)
01893 %
01894 %  A description of each parameter follows:
01895 %
01896 %    o options: One or more values separated by commas.
01897 %
01898 */
01899 MagickExport long ParseChannelOption(const char *channels)
01900 {
01901   long
01902     channel;
01903 
01904   register long
01905     i;
01906 
01907   channel=ParseMagickOption(MagickChannelOptions,MagickTrue,channels);
01908   if (channel >= 0)
01909     return(channel);
01910   channel=0;
01911   for (i=0; i < (long) strlen(channels); i++)
01912   {
01913     switch (channels[i])
01914     {
01915       case 'A':
01916       case 'a':
01917       {
01918         channel|=OpacityChannel;
01919         break;
01920       }
01921       case 'B':
01922       case 'b':
01923       {
01924         channel|=BlueChannel;
01925         break;
01926       }
01927       case 'C':
01928       case 'c':
01929       {
01930         channel|=CyanChannel;
01931         break;
01932       }
01933       case 'g':
01934       case 'G':
01935       {
01936         channel|=GreenChannel;
01937         break;
01938       }
01939       case 'I':
01940       case 'i':
01941       {
01942         channel|=IndexChannel;
01943         break;
01944       }
01945       case 'K':
01946       case 'k':
01947       {
01948         channel|=BlackChannel;
01949         break;
01950       }
01951       case 'M':
01952       case 'm':
01953       {
01954         channel|=MagentaChannel;
01955         break;
01956       }
01957       case 'o':
01958       case 'O':
01959       {
01960         channel|=OpacityChannel;
01961         break;
01962       }
01963       case 'R':
01964       case 'r':
01965       {
01966         channel|=RedChannel;
01967         break;
01968       }
01969       case 'Y':
01970       case 'y':
01971       {
01972         channel|=YellowChannel;
01973         break;
01974       }
01975       case ',':
01976       {
01977         /*
01978           More channel flags follow shorthand.  For example "RGB,sync"
01979           Gather the additional channel flags and merge with shorthand
01980         */
01981         long
01982           more_channel;
01983         more_channel=ParseMagickOption(MagickChannelOptions,MagickTrue,
01984                              channels+i+1);
01985         if (more_channel < 0)
01986           return(more_channel);
01987         channel |= more_channel;
01988         return(channel);
01989       }
01990       default:
01991         return(-1);
01992     }
01993   }
01994   return(channel);
01995 }
01996 
01997 /*
01998 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01999 %                                                                             %
02000 %                                                                             %
02001 %                                                                             %
02002 %   P a r s e M a g i c k O p t i o n                                         %
02003 %                                                                             %
02004 %                                                                             %
02005 %                                                                             %
02006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02007 %
02008 %  ParseMagickOption() parses a string and returns an enumerated option type(s).
02009 %
02010 %  The format of the ParseMagickOption method is:
02011 %
02012 %      long ParseMagickOption(const MagickOption option,
02013 %        const MagickBooleanType list,const char *options)
02014 %
02015 %  A description of each parameter follows:
02016 %
02017 %    o option: Index to the option table to lookup
02018 %
02019 %    o list: A option other than zero permits more than one option separated by
02020 %      a comma or pipe.
02021 %
02022 %    o options: One or more options separated by commas.
02023 %
02024 */
02025 MagickExport long ParseMagickOption(const MagickOption option,
02026   const MagickBooleanType list,const char *options)
02027 {
02028   char
02029     token[MaxTextExtent];
02030 
02031   const OptionInfo
02032     *option_info;
02033 
02034   int
02035     sentinel;
02036 
02037   long
02038     option_types;
02039 
02040   MagickBooleanType
02041     negate;
02042 
02043   register char
02044     *q;
02045 
02046   register const char
02047     *p;
02048 
02049   register long
02050     i;
02051 
02052   option_info=GetOptionInfo(option);
02053   if (option_info == (const OptionInfo *) NULL)
02054     return(-1);
02055   option_types=0;
02056   sentinel=',';
02057   if (strchr(options,'|') != (char *) NULL)
02058     sentinel='|';
02059   for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
02060   {
02061     while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
02062            (*p != '\0'))
02063       p++;
02064     negate=(*p == '!') ? MagickTrue : MagickFalse;
02065     if (negate != MagickFalse)
02066       p++;
02067     q=token;
02068     while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
02069            (*p != '\0'))
02070     {
02071       if ((q-token) >= MaxTextExtent)
02072         break;
02073       *q++=(*p++);
02074     }
02075     *q='\0';
02076     for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
02077       if (LocaleCompare(token,option_info[i].mnemonic) == 0)
02078         {
02079           if (*token == '!')
02080             option_types=option_types &~ option_info[i].type;
02081           else
02082             option_types=option_types | option_info[i].type;
02083           break;
02084         }
02085     if ((option_info[i].mnemonic == (char *) NULL) &&
02086         ((strchr(token+1,'-') != (char *) NULL) ||
02087          (strchr(token+1,'_') != (char *) NULL)))
02088       {
02089         while ((q=strchr(token+1,'-')) != (char *) NULL)
02090           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
02091         while ((q=strchr(token+1,'_')) != (char *) NULL)
02092           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
02093         for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
02094           if (LocaleCompare(token,option_info[i].mnemonic) == 0)
02095             {
02096               if (*token == '!')
02097                 option_types=option_types &~ option_info[i].type;
02098               else
02099                 option_types=option_types | option_info[i].type;
02100               break;
02101             }
02102       }
02103     if (option_info[i].mnemonic == (char *) NULL)
02104       return(-1);
02105     if (list == MagickFalse)
02106       break;
02107   }
02108   return(option_types);
02109 }
02110 
02111 /*
02112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02113 %                                                                             %
02114 %                                                                             %
02115 %                                                                             %
02116 %   R e m o v e I m a g e O p t i o n                                         %
02117 %                                                                             %
02118 %                                                                             %
02119 %                                                                             %
02120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02121 %
02122 %  RemoveImageOption() removes an option from the image and returns its value.
02123 %
02124 %  The format of the RemoveImageOption method is:
02125 %
02126 %      char *RemoveImageOption(ImageInfo *image_info,const char *option)
02127 %
02128 %  A description of each parameter follows:
02129 %
02130 %    o image_info: the image info.
02131 %
02132 %    o option: the image option.
02133 %
02134 */
02135 MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
02136 {
02137   char
02138     *value;
02139 
02140   assert(image_info != (ImageInfo *) NULL);
02141   assert(image_info->signature == MagickSignature);
02142   if (image_info->debug != MagickFalse)
02143     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
02144       image_info->filename);
02145   if (image_info->options == (void *) NULL)
02146     return((char *) NULL);
02147   value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
02148     image_info->options,option);
02149   return(value);
02150 }
02151 
02152 /*
02153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02154 %                                                                             %
02155 %                                                                             %
02156 %                                                                             %
02157 %   R e s e t I m a g e O p t i o n                                           %
02158 %                                                                             %
02159 %                                                                             %
02160 %                                                                             %
02161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02162 %
02163 %  ResetImageOptions() resets the image_info option.  That is, it deletes
02164 %  all options associated with the image_info structure.
02165 %
02166 %  The format of the ResetImageOptions method is:
02167 %
02168 %      ResetImageOptions(ImageInfo *image_info)
02169 %
02170 %  A description of each parameter follows:
02171 %
02172 %    o image_info: the image info.
02173 %
02174 */
02175 MagickExport void ResetImageOptions(const ImageInfo *image_info)
02176 {
02177   assert(image_info != (ImageInfo *) NULL);
02178   assert(image_info->signature == MagickSignature);
02179   if (image_info->debug != MagickFalse)
02180     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
02181       image_info->filename);
02182   if (image_info->options == (void *) NULL)
02183     return;
02184   ResetSplayTree((SplayTreeInfo *) image_info->options);
02185 }
02186 
02187 /*
02188 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02189 %                                                                             %
02190 %                                                                             %
02191 %                                                                             %
02192 %   R e s e t I m a g e O p t i o n I t e r a t o r                           %
02193 %                                                                             %
02194 %                                                                             %
02195 %                                                                             %
02196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02197 %
02198 %  ResetImageOptionIterator() resets the image_info values iterator.  Use it
02199 %  in conjunction with GetNextImageOption() to iterate over all the values
02200 %  associated with an image option.
02201 %
02202 %  The format of the ResetImageOptionIterator method is:
02203 %
02204 %      ResetImageOptionIterator(ImageInfo *image_info)
02205 %
02206 %  A description of each parameter follows:
02207 %
02208 %    o image_info: the image info.
02209 %
02210 */
02211 MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
02212 {
02213   assert(image_info != (ImageInfo *) NULL);
02214   assert(image_info->signature == MagickSignature);
02215   if (image_info->debug != MagickFalse)
02216     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
02217       image_info->filename);
02218   if (image_info->options == (void *) NULL)
02219     return;
02220   ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
02221 }
02222 
02223 /*
02224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02225 %                                                                             %
02226 %                                                                             %
02227 %                                                                             %
02228 %   S e t I m a g e O p t i o n                                               %
02229 %                                                                             %
02230 %                                                                             %
02231 %                                                                             %
02232 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02233 %
02234 %  SetImageOption() associates an value with an image option.
02235 %
02236 %  The format of the SetImageOption method is:
02237 %
02238 %      MagickBooleanType SetImageOption(ImageInfo *image_info,
02239 %        const char *option,const char *value)
02240 %
02241 %  A description of each parameter follows:
02242 %
02243 %    o image_info: the image info.
02244 %
02245 %    o option: the image option.
02246 %
02247 %    o values: the image option values.
02248 %
02249 */
02250 MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
02251   const char *option,const char *value)
02252 {
02253   MagickBooleanType
02254     status;
02255 
02256   assert(image_info != (ImageInfo *) NULL);
02257   assert(image_info->signature == MagickSignature);
02258   if (image_info->debug != MagickFalse)
02259     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
02260       image_info->filename);
02261   if (LocaleCompare(option,"size") == 0)
02262     (void) CloneString(&image_info->size,value);
02263   if (image_info->options == (void *) NULL)
02264     image_info->options=NewSplayTree(CompareSplayTreeString,
02265       RelinquishMagickMemory,RelinquishMagickMemory);
02266   status=AddValueToSplayTree((SplayTreeInfo *) image_info->options,
02267     ConstantString(option),ConstantString(value));
02268   return(status);
02269 }

Generated on 19 Nov 2009 for MagickCore by  doxygen 1.6.1