]> granicus.if.org Git - imagemagick/blob - MagickCore/option.c
Added wavelet denoise.
[imagemagick] / MagickCore / option.c
1 /*
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %                                                                             %
4 %                                                                             %
5 %                                                                             %
6 %                   OOO   PPPP   TTTTT  IIIII   OOO   N   N                   %
7 %                  O   O  P   P    T      I    O   O  NN  N                   %
8 %                  O   O  PPPP     T      I    O   O  N N N                   %
9 %                  O   O  P        T      I    O   O  N  NN                   %
10 %                   OOO   P        T    IIIII   OOO   N   N                   %
11 %                                                                             %
12 %                                                                             %
13 %                         MagickCore Option Methods                           %
14 %                                                                             %
15 %                              Software Design                                %
16 %                                   Cristy                                    %
17 %                                 March 2000                                  %
18 %                                                                             %
19 %                                                                             %
20 %  Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization      %
21 %  dedicated to making software imaging solutions freely available.           %
22 %                                                                             %
23 %  You may not use this file except in compliance with the License.  You may  %
24 %  obtain a copy of the License at                                            %
25 %                                                                             %
26 %    http://www.imagemagick.org/script/license.php                            %
27 %                                                                             %
28 %  Unless required by applicable law or agreed to in writing, software        %
29 %  distributed under the License is distributed on an "AS IS" BASIS,          %
30 %  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
31 %  See the License for the specific language governing permissions and        %
32 %  limitations under the License.                                             %
33 %                                                                             %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 %
36 %
37 %
38 */
39 \f
40 /*
41   Include declarations.
42 */
43 #include "MagickCore/studio.h"
44 #include "MagickCore/artifact.h"
45 #include "MagickCore/cache.h"
46 #include "MagickCore/color.h"
47 #include "MagickCore/compare.h"
48 #include "MagickCore/constitute.h"
49 #include "MagickCore/distort.h"
50 #include "MagickCore/draw.h"
51 #include "MagickCore/effect.h"
52 #include "MagickCore/exception.h"
53 #include "MagickCore/exception-private.h"
54 #include "MagickCore/fourier.h"
55 #include "MagickCore/fx.h"
56 #include "MagickCore/gem.h"
57 #include "MagickCore/geometry.h"
58 #include "MagickCore/image.h"
59 #include "MagickCore/image-private.h"
60 #include "MagickCore/layer.h"
61 #include "MagickCore/mime-private.h"
62 #include "MagickCore/memory_.h"
63 #include "MagickCore/monitor.h"
64 #include "MagickCore/montage.h"
65 #include "MagickCore/morphology.h"
66 #include "MagickCore/option.h"
67 #include "MagickCore/option-private.h"
68 #include "MagickCore/pixel.h"
69 #include "MagickCore/policy.h"
70 #include "MagickCore/property.h"
71 #include "MagickCore/quantize.h"
72 #include "MagickCore/quantum.h"
73 #include "MagickCore/resample.h"
74 #include "MagickCore/resource_.h"
75 #include "MagickCore/splay-tree.h"
76 #include "MagickCore/statistic.h"
77 #include "MagickCore/string_.h"
78 #include "MagickCore/token.h"
79 #include "MagickCore/utility.h"
80 \f
81 /*
82   ImageMagick options.
83 */
84 static const OptionInfo
85   AlignOptions[] =
86   {
87     { "Undefined", UndefinedAlign, UndefinedOptionFlag, MagickTrue },
88     { "Center", CenterAlign, UndefinedOptionFlag, MagickFalse },
89     { "End", RightAlign, UndefinedOptionFlag, MagickFalse },
90     { "Left", LeftAlign, UndefinedOptionFlag, MagickFalse },
91     { "Middle", CenterAlign, UndefinedOptionFlag, MagickFalse },
92     { "Right", RightAlign, UndefinedOptionFlag, MagickFalse },
93     { "Start", LeftAlign, UndefinedOptionFlag, MagickFalse },
94     { (char *) NULL, UndefinedAlign, UndefinedOptionFlag, MagickFalse }
95   },
96   AlphaChannelOptions[] =
97   {
98     { "Undefined", UndefinedAlphaChannel, UndefinedOptionFlag, MagickTrue },
99     { "Activate", ActivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
100     { "Associate", AssociateAlphaChannel, UndefinedOptionFlag, MagickFalse },
101     { "Background", BackgroundAlphaChannel, UndefinedOptionFlag, MagickFalse },
102     { "Copy", CopyAlphaChannel, UndefinedOptionFlag, MagickFalse },
103     { "Deactivate", DeactivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
104     { "Discrete", DiscreteAlphaChannel, UndefinedOptionFlag, MagickFalse },
105     { "Disassociate", DisassociateAlphaChannel, UndefinedOptionFlag, MagickFalse },
106     { "Extract", ExtractAlphaChannel, UndefinedOptionFlag, MagickFalse },
107     { "Off", OffAlphaChannel, UndefinedOptionFlag, MagickFalse },
108     { "On", OnAlphaChannel, UndefinedOptionFlag, MagickFalse },
109     { "Opaque", OpaqueAlphaChannel, UndefinedOptionFlag, MagickFalse },
110     { "Remove", RemoveAlphaChannel, UndefinedOptionFlag, MagickFalse },
111     { "Set", SetAlphaChannel, UndefinedOptionFlag, MagickFalse },
112     { "Shape", ShapeAlphaChannel, UndefinedOptionFlag, MagickFalse },
113     { "Reset", SetAlphaChannel, DeprecateOptionFlag, MagickTrue },
114     { "Transparent", TransparentAlphaChannel, UndefinedOptionFlag, MagickFalse },
115     { (char *) NULL, UndefinedAlphaChannel, UndefinedOptionFlag, MagickFalse }
116   },
117   BooleanOptions[] =
118   {
119     { "False", MagickFalse, UndefinedOptionFlag, MagickFalse },
120     { "True", MagickTrue, UndefinedOptionFlag, MagickFalse },
121     { "0", MagickFalse, UndefinedOptionFlag, MagickFalse },
122     { "1", MagickTrue, UndefinedOptionFlag, MagickFalse },
123     { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
124   },
125   CacheOptions[] =
126   {
127     { "Disk", DiskCache, UndefinedOptionFlag, MagickFalse },
128     { "Distributed", DistributedCache, UndefinedOptionFlag, MagickFalse },
129     { "Map", MapCache, UndefinedOptionFlag, MagickFalse },
130     { "Memory", MemoryCache, UndefinedOptionFlag, MagickFalse },
131     { "Ping", PingCache, UndefinedOptionFlag, MagickFalse },
132     { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
133   },
134   ChannelOptions[] =
135   {
136     { "Undefined", UndefinedChannel, UndefinedOptionFlag, MagickTrue },
137     /* special */
138     { "All", CompositeChannels, UndefinedOptionFlag, MagickFalse },
139     { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
140     { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
141     /* individual channel */
142     { "A", AlphaChannel, UndefinedOptionFlag, MagickFalse },
143     { "Alpha", AlphaChannel, UndefinedOptionFlag, MagickFalse },
144     { "Black", BlackChannel, UndefinedOptionFlag, MagickFalse },
145     { "B", BlueChannel, UndefinedOptionFlag, MagickFalse },
146     { "Blue", BlueChannel, UndefinedOptionFlag, MagickFalse },
147     { "C", CyanChannel, UndefinedOptionFlag, MagickFalse },
148     { "Cyan", CyanChannel, UndefinedOptionFlag, MagickFalse },
149     { "Gray", GrayChannel, UndefinedOptionFlag, MagickFalse },
150     { "G", GreenChannel, UndefinedOptionFlag, MagickFalse },
151     { "Green", GreenChannel, UndefinedOptionFlag, MagickFalse },
152     { "H", RedChannel, UndefinedOptionFlag, MagickFalse },
153     { "Hue", RedChannel, UndefinedOptionFlag, MagickFalse },
154     { "K", BlackChannel, UndefinedOptionFlag, MagickFalse },
155     { "L", BlueChannel, UndefinedOptionFlag, MagickFalse },
156     { "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
157     { "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
158     { "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
159     { "M", MagentaChannel, UndefinedOptionFlag, MagickFalse },
160     { "Magenta", MagentaChannel, UndefinedOptionFlag, MagickFalse },
161     { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
162     { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
163     { "R", RedChannel, UndefinedOptionFlag, MagickFalse },
164     { "Red", RedChannel, UndefinedOptionFlag, MagickFalse },
165     { "S", GreenChannel, UndefinedOptionFlag, MagickFalse },
166     { "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
167     { "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
168     { "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
169     { (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
170   },
171   ClassOptions[] =
172   {
173     { "Undefined", UndefinedClass, UndefinedOptionFlag, MagickTrue },
174     { "DirectClass", DirectClass, UndefinedOptionFlag, MagickFalse },
175     { "PseudoClass", PseudoClass, UndefinedOptionFlag, MagickFalse },
176     { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
177   },
178   ClipPathOptions[] =
179   {
180     { "Undefined", UndefinedPathUnits, UndefinedOptionFlag, MagickTrue },
181     { "ObjectBoundingBox", ObjectBoundingBox, UndefinedOptionFlag, MagickFalse },
182     { "UserSpace", UserSpace, UndefinedOptionFlag, MagickFalse },
183     { "UserSpaceOnUse", UserSpaceOnUse, UndefinedOptionFlag, MagickFalse },
184     { (char *) NULL, UndefinedPathUnits, UndefinedOptionFlag, MagickFalse }
185   },
186   ColorspaceOptions[] =
187   {
188     { "Undefined", UndefinedColorspace, UndefinedOptionFlag, MagickTrue },
189     { "CIELab", LabColorspace, UndefinedOptionFlag, MagickFalse },
190     { "CMY", CMYColorspace, UndefinedOptionFlag, MagickFalse },
191     { "CMYK", CMYKColorspace, UndefinedOptionFlag, MagickFalse },
192     { "Gray", GRAYColorspace, UndefinedOptionFlag, MagickFalse },
193     { "HCL", HCLColorspace, UndefinedOptionFlag, MagickFalse },
194     { "HCLp", HCLpColorspace, UndefinedOptionFlag, MagickFalse },
195     { "HSB", HSBColorspace, UndefinedOptionFlag, MagickFalse },
196     { "HSI", HSIColorspace, UndefinedOptionFlag, MagickFalse },
197     { "HSL", HSLColorspace, UndefinedOptionFlag, MagickFalse },
198     { "HSV", HSVColorspace, UndefinedOptionFlag, MagickFalse },
199     { "HWB", HWBColorspace, UndefinedOptionFlag, MagickFalse },
200     { "Lab", LabColorspace, UndefinedOptionFlag, MagickFalse },
201     { "LCH", LCHColorspace, UndefinedOptionFlag, MagickFalse },
202     { "LCHab", LCHabColorspace, UndefinedOptionFlag, MagickFalse },
203     { "LCHuv", LCHuvColorspace, UndefinedOptionFlag, MagickFalse },
204     { "LMS", LMSColorspace, UndefinedOptionFlag, MagickFalse },
205     { "Log", LogColorspace, UndefinedOptionFlag, MagickFalse },
206     { "Luv", LuvColorspace, UndefinedOptionFlag, MagickFalse },
207     { "OHTA", OHTAColorspace, UndefinedOptionFlag, MagickFalse },
208     { "Rec601YCbCr", Rec601YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
209     { "Rec709YCbCr", Rec709YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
210     { "RGB", RGBColorspace, UndefinedOptionFlag, MagickFalse },
211     { "scRGB", scRGBColorspace, UndefinedOptionFlag, MagickFalse },
212     { "sRGB", sRGBColorspace, UndefinedOptionFlag, MagickFalse },
213     { "Transparent", TransparentColorspace, UndefinedOptionFlag, MagickFalse },
214     { "xyY", xyYColorspace, UndefinedOptionFlag, MagickFalse },
215     { "XYZ", XYZColorspace, UndefinedOptionFlag, MagickFalse },
216     { "YCbCr", YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
217     { "YDbDr", YDbDrColorspace, UndefinedOptionFlag, MagickFalse },
218     { "YCC", YCCColorspace, UndefinedOptionFlag, MagickFalse },
219     { "YIQ", YIQColorspace, UndefinedOptionFlag, MagickFalse },
220     { "YPbPr", YPbPrColorspace, UndefinedOptionFlag, MagickFalse },
221     { "YUV", YUVColorspace, UndefinedOptionFlag, MagickFalse },
222     { (char *) NULL, UndefinedColorspace, UndefinedOptionFlag, MagickFalse }
223   },
224   ComplexOptions[] =
225   {
226     { "Undefined", UndefinedComplexOperator, UndefinedOptionFlag, MagickTrue },
227     { "Add", AddComplexOperator, UndefinedOptionFlag, MagickFalse },
228     { "Conjugate", ConjugateComplexOperator, UndefinedOptionFlag, MagickFalse },
229     { "Divide", DivideComplexOperator, UndefinedOptionFlag, MagickFalse },
230     { "MagnitudePhase", MagnitudePhaseComplexOperator, UndefinedOptionFlag, MagickFalse },
231     { "Multiply", MultiplyComplexOperator, UndefinedOptionFlag, MagickFalse },
232     { "RealImaginary", RealImaginaryComplexOperator, UndefinedOptionFlag, MagickFalse },
233     { "Subtract", SubtractComplexOperator, UndefinedOptionFlag, MagickFalse },
234     { (char *) NULL, UndefinedComplexOperator, UndefinedOptionFlag, MagickFalse }
235   },
236   CommandOptions[] =
237   {
238     /*
239       Must be ordered lexigraphically.
240     */
241     { "+alpha", 1L, DeprecateOptionFlag, MagickTrue },
242     { "-alpha", 1L, SimpleOperatorFlag, MagickFalse },
243     { "+background", 0L, ImageInfoOptionFlag, MagickFalse },
244     { "-background", 1L, ImageInfoOptionFlag, MagickFalse },
245     { "+format", 0L, ImageInfoOptionFlag, MagickFalse },
246     { "-format", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
247     { "-quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
248     { "+quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
249     { "-regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
250     { "+regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
251     { "+repage", 0L, SimpleOperatorFlag, MagickFalse },
252     { "-repage", 1L, SimpleOperatorFlag, MagickFalse },
253     { "+size", 0L, ImageInfoOptionFlag, MagickFalse },
254     { "-size", 1L, ImageInfoOptionFlag, MagickFalse },
255     { "+virtual-pixel", 0L, ImageInfoOptionFlag, MagickFalse },
256     { "-virtual-pixel", 1L, ImageInfoOptionFlag, MagickFalse },
257     { "+blur", 0L, DeprecateOptionFlag, MagickTrue },
258     { "-blur", 1L, SimpleOperatorFlag, MagickFalse },
259     { "+resize", 1L, DeprecateOptionFlag, MagickTrue },
260     { "-resize", 1L, SimpleOperatorFlag, MagickFalse },
261     { "(", 0L, NoImageOperatorFlag, MagickTrue },
262     { ")", 0L, NoImageOperatorFlag, MagickTrue },
263     { "{", 0L, NoImageOperatorFlag, MagickTrue },
264     { "}", 0L, NoImageOperatorFlag, MagickTrue },
265     { "--", 1L, NoImageOperatorFlag, MagickTrue },
266     { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickTrue },
267     { "-adaptive-blur", 1L, SimpleOperatorFlag, MagickFalse },
268     { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickTrue },
269     { "-adaptive-resize", 1L, SimpleOperatorFlag, MagickFalse },
270     { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickTrue },
271     { "-adaptive-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
272     { "-adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
273     { "+adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
274     { "+affine", 0L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
275     { "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
276     { "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
277     { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
278     { "+alpha-color", 0L, ImageInfoOptionFlag, MagickFalse },
279     { "-alpha-color", 1L, ImageInfoOptionFlag, MagickFalse },
280     { "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
281     { "-annotate", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
282     { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
283     { "+antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
284     { "-append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
285     { "+append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
286     { "+attenuate", 0L, ImageInfoOptionFlag, MagickFalse },
287     { "-attenuate", 1L, ImageInfoOptionFlag, MagickFalse },
288     { "+authenticate", 0L, ImageInfoOptionFlag, MagickFalse },
289     { "-authenticate", 1L, ImageInfoOptionFlag, MagickFalse },
290     { "+auto-gamma", 0L, DeprecateOptionFlag, MagickTrue },
291     { "-auto-gamma", 0L, SimpleOperatorFlag, MagickFalse },
292     { "+auto-level", 0L, DeprecateOptionFlag, MagickTrue },
293     { "-auto-level", 0L, SimpleOperatorFlag, MagickFalse },
294     { "+auto-orient", 0L, DeprecateOptionFlag, MagickTrue },
295     { "-auto-orient", 0L, SimpleOperatorFlag, MagickFalse },
296     { "+average", 0L, DeprecateOptionFlag, MagickTrue },
297     { "-average", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
298     { "+backdrop", 0L, NonMagickOptionFlag | NeverInterpretArgsFlag, MagickFalse },
299     { "-backdrop", 1L, NonMagickOptionFlag | NeverInterpretArgsFlag, MagickFalse },
300     { "+bench", 1L, DeprecateOptionFlag, MagickTrue },
301     { "-bench", 1L, GenesisOptionFlag, MagickFalse },
302     { "+bias", 0L, ImageInfoOptionFlag, MagickFalse },
303     { "-bias", 1L, ImageInfoOptionFlag, MagickFalse },
304     { "-black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
305     { "+black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
306     { "+black-threshold", 0L, DeprecateOptionFlag, MagickTrue },
307     { "-black-threshold", 1L, SimpleOperatorFlag, MagickFalse },
308     { "+blend", 0L, NonMagickOptionFlag, MagickFalse },
309     { "-blend", 1L, NonMagickOptionFlag, MagickFalse },
310     { "+blue-primary", 0L, ImageInfoOptionFlag, MagickFalse },
311     { "-blue-primary", 1L, ImageInfoOptionFlag, MagickFalse },
312     { "-blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
313     { "+blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
314     { "+border", 1L, DeprecateOptionFlag, MagickTrue },
315     { "-border", 1L, SimpleOperatorFlag, MagickFalse },
316     { "+bordercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
317     { "-bordercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
318     { "+borderwidth", 0L, NonMagickOptionFlag, MagickFalse },
319     { "-borderwidth", 1L, NonMagickOptionFlag, MagickFalse },
320     { "+box", 0L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
321     { "-box", 1L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
322     { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickTrue },
323     { "-brightness-contrast", 1L, SimpleOperatorFlag, MagickFalse },
324     { "+cache", 0L, GlobalOptionFlag, MagickFalse },
325     { "-cache", 1L, GlobalOptionFlag, MagickFalse },
326     { "+canny", 1L, DeprecateOptionFlag, MagickTrue },
327     { "-canny", 1L, SimpleOperatorFlag, MagickTrue },
328     { "+caption", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
329     { "-caption", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
330     { "+cdl", 1L, DeprecateOptionFlag, MagickTrue },
331     { "-cdl", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
332     { "+channel", 0L, SimpleOperatorFlag, MagickFalse },
333     { "-channel", 1L, SimpleOperatorFlag, MagickFalse },
334     { "-channel-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
335     { "+charcoal", 1L, DeprecateOptionFlag, MagickTrue },
336     { "-charcoal", 1L, SimpleOperatorFlag, MagickFalse },
337     { "+chop", 1L, DeprecateOptionFlag, MagickTrue },
338     { "-chop", 1L, SimpleOperatorFlag, MagickFalse },
339     { "+clamp", 0L, DeprecateOptionFlag, MagickTrue },
340     { "-clamp", 0L, SimpleOperatorFlag, MagickFalse },
341     { "-clip", 0L, SimpleOperatorFlag, MagickFalse },
342     { "+clip", 0L, SimpleOperatorFlag, MagickFalse },
343     { "+clip-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
344     { "-clip-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
345     { "-clip-path", 1L, SimpleOperatorFlag, MagickFalse },
346     { "+clip-path", 1L, SimpleOperatorFlag, MagickFalse },
347     { "+clone", 0L, NoImageOperatorFlag, MagickFalse },
348     { "-clone", 1L, NoImageOperatorFlag, MagickFalse },
349     { "+clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
350     { "-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
351     { "+coalesce", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
352     { "-coalesce", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
353     { "+colorize", 1L, DeprecateOptionFlag, MagickTrue },
354     { "-colorize", 1L, SimpleOperatorFlag, MagickFalse },
355     { "+colormap", 0L, NonMagickOptionFlag, MagickFalse },
356     { "-colormap", 1L, NonMagickOptionFlag, MagickFalse },
357     { "+color-matrix", 1L, DeprecateOptionFlag, MagickTrue },
358     { "-color-matrix", 1L, SimpleOperatorFlag, MagickFalse },
359     { "+colors", 1L, DeprecateOptionFlag, MagickTrue },
360     { "-colors", 1L, SimpleOperatorFlag, MagickFalse },
361     { "+colorspace", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
362     { "-colorspace", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
363     { "-combine", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
364     { "+combine", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
365     { "+comment", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
366     { "-comment", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
367     { "+compare", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
368     { "-compare", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
369     { "+complex", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
370     { "-complex", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
371     { "+compose", 0L, ImageInfoOptionFlag, MagickFalse },
372     { "-compose", 1L, ImageInfoOptionFlag, MagickFalse },
373     { "+composite", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
374     { "-composite", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
375     { "+compress", 0L, ImageInfoOptionFlag, MagickFalse },
376     { "-compress", 1L, ImageInfoOptionFlag, MagickFalse },
377     { "+concurrent", 0L, DeprecateOptionFlag, MagickTrue },
378     { "-concurrent", 0L, GenesisOptionFlag, MagickFalse },
379     { "+connected-components", 1L, DeprecateOptionFlag, MagickTrue },
380     { "-connected-components", 1L, SimpleOperatorFlag, MagickFalse },
381     { "-contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
382     { "+contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
383     { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickTrue },
384     { "-contrast-stretch", 1L, SimpleOperatorFlag, MagickFalse },
385     { "+convolve", 1L, DeprecateOptionFlag, MagickTrue },
386     { "-convolve", 1L, SimpleOperatorFlag, MagickFalse },
387     { "+copy", 2L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
388     { "-copy", 2L, ListOperatorFlag | FireOptionFlag, MagickFalse },
389     { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
390     { "-crop", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
391     { "+cycle", 1L, DeprecateOptionFlag, MagickTrue },
392     { "-cycle", 1L, SimpleOperatorFlag, MagickFalse },
393     { "+debug", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
394     { "-debug", 1L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
395     { "+decipher", 1L, DeprecateOptionFlag, MagickTrue },
396     { "-decipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
397     { "+deconstruct", 0L, DeprecateOptionFlag, MagickTrue },
398     { "-deconstruct", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
399     { "-define", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
400     { "+define", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
401     { "+delay", 0L, ImageInfoOptionFlag, MagickFalse },
402     { "-delay", 1L, ImageInfoOptionFlag, MagickFalse },
403     { "+delete", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
404     { "-delete", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
405     { "+density", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
406     { "-density", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
407     { "+depth", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
408     { "-depth", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
409     { "+descend", 0L, NonMagickOptionFlag, MagickFalse },
410     { "-descend", 1L, NonMagickOptionFlag, MagickFalse },
411     { "+deskew", 0L, SimpleOperatorFlag, MagickFalse },
412     { "-deskew", 1L, SimpleOperatorFlag, MagickFalse },
413     { "+despeckle", 0L, DeprecateOptionFlag, MagickTrue },
414     { "-despeckle", 0L, SimpleOperatorFlag, MagickFalse },
415     { "+direction", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
416     { "-direction", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
417     { "+displace", 0L, NonMagickOptionFlag, MagickFalse },
418     { "-displace", 1L, NonMagickOptionFlag, MagickFalse },
419     { "-display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
420     { "+display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
421     { "+dispose", 0L, ImageInfoOptionFlag, MagickFalse },
422     { "-dispose", 1L, ImageInfoOptionFlag, MagickFalse },
423     { "+dissimilarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
424     { "-dissimilarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
425     { "+dissolve", 0L, NonMagickOptionFlag, MagickFalse },
426     { "-dissolve", 1L, NonMagickOptionFlag, MagickFalse },
427     { "-distort", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
428     { "+distort", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
429     { "+dither", 0L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
430     { "-dither", 1L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
431     { "+draw", 0L, DeprecateOptionFlag, MagickTrue },
432     { "-draw", 1L, SimpleOperatorFlag, MagickFalse },
433     { "+duplicate", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
434     { "-duplicate", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
435     { "-duration", 1L, GenesisOptionFlag, MagickFalse },
436     { "+duration", 1L, GenesisOptionFlag, MagickFalse },
437     { "+edge", 1L, DeprecateOptionFlag, MagickTrue },
438     { "-edge", 1L, SimpleOperatorFlag, MagickFalse },
439     { "+emboss", 1L, DeprecateOptionFlag, MagickTrue },
440     { "-emboss", 1L, SimpleOperatorFlag, MagickFalse },
441     { "+encipher", 1L, DeprecateOptionFlag, MagickTrue },
442     { "-encipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
443     { "+encoding", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
444     { "-encoding", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
445     { "+endian", 0L, ImageInfoOptionFlag, MagickFalse },
446     { "-endian", 1L, ImageInfoOptionFlag, MagickFalse },
447     { "+enhance", 0L, DeprecateOptionFlag, MagickTrue },
448     { "-enhance", 0L, SimpleOperatorFlag, MagickFalse },
449     { "+equalize", 0L, DeprecateOptionFlag, MagickTrue },
450     { "-equalize", 0L, SimpleOperatorFlag, MagickFalse },
451     { "+evaluate", 2L, DeprecateOptionFlag, MagickTrue },
452     { "-evaluate", 2L, SimpleOperatorFlag, MagickFalse },
453     { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
454     { "-evaluate-sequence", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
455     { "-exit", 0L, SpecialOptionFlag, MagickFalse },
456     { "+extent", 1L, DeprecateOptionFlag, MagickTrue },
457     { "-extent", 1L, SimpleOperatorFlag, MagickFalse },
458     { "+extract", 0L, ImageInfoOptionFlag, MagickFalse },
459     { "-extract", 1L, ImageInfoOptionFlag, MagickFalse },
460     { "+family", 0L, DeprecateOptionFlag, MagickTrue },
461     { "-family", 1L, DrawInfoOptionFlag, MagickFalse },
462     { "+features", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
463     { "-features", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
464     { "-fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
465     { "+fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
466     { "+fill", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
467     { "-fill", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
468     { "+filter", 0L, ImageInfoOptionFlag, MagickFalse },
469     { "-filter", 1L, ImageInfoOptionFlag, MagickFalse },
470     { "+flatten", 0L, DeprecateOptionFlag, MagickTrue },
471     { "-flatten", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
472     { "+flip", 0L, DeprecateOptionFlag, MagickTrue },
473     { "-flip", 0L, SimpleOperatorFlag, MagickFalse },
474     { "-floodfill", 2L, SimpleOperatorFlag, MagickFalse },
475     { "+floodfill", 2L, SimpleOperatorFlag, MagickFalse },
476     { "+flop", 0L, DeprecateOptionFlag, MagickTrue },
477     { "-flop", 0L, SimpleOperatorFlag, MagickFalse },
478     { "+font", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
479     { "-font", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
480     { "+foreground", 0L, NonMagickOptionFlag, MagickFalse },
481     { "-foreground", 1L, NonMagickOptionFlag, MagickFalse },
482     { "+frame", 1L, DeprecateOptionFlag, MagickTrue },
483     { "-frame", 1L, SimpleOperatorFlag, MagickFalse },
484     { "+function", 2L, DeprecateOptionFlag, MagickTrue },
485     { "-function", 2L,SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
486     { "+fuzz", 0L, ImageInfoOptionFlag, MagickFalse },
487     { "-fuzz", 1L, ImageInfoOptionFlag, MagickFalse },
488     { "+fx", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
489     { "-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
490     { "-gamma", 1L, SimpleOperatorFlag, MagickFalse },
491     { "+gamma", 1L, SimpleOperatorFlag, MagickFalse },
492     { "+gaussian", 1L, DeprecateOptionFlag, MagickTrue },
493     { "-gaussian", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
494     { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickTrue },
495     { "-gaussian-blur", 1L, SimpleOperatorFlag, MagickFalse },
496     { "+geometry", 0L, SimpleOperatorFlag, MagickFalse },
497     { "-geometry", 1L, SimpleOperatorFlag, MagickFalse },
498     { "+gravity", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
499     { "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
500     { "+grayscale", 1L, SimpleOperatorFlag, MagickTrue },
501     { "-grayscale", 1L, SimpleOperatorFlag, MagickFalse },
502     { "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse },
503     { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
504     { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
505     { "-hald-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
506     { "+highlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
507     { "-highlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
508     { "+hough-lines", 1L, DeprecateOptionFlag, MagickTrue },
509     { "-hough-lines", 1L, SimpleOperatorFlag, MagickTrue },
510     { "+iconGeometry", 0L, NonMagickOptionFlag, MagickFalse },
511     { "-iconGeometry", 1L, NonMagickOptionFlag, MagickFalse },
512     { "-iconic", 0L, NonMagickOptionFlag, MagickFalse },
513     { "+iconic", 0L, NonMagickOptionFlag, MagickFalse },
514     { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
515     { "-identify", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
516     { "-ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
517     { "+ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
518     { "-immutable", 0L, NonMagickOptionFlag, MagickFalse },
519     { "+immutable", 0L, NonMagickOptionFlag, MagickFalse },
520     { "+implode", 0L, DeprecateOptionFlag, MagickTrue },
521     { "-implode", 1L, SimpleOperatorFlag, MagickFalse },
522     { "+insert", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
523     { "-insert", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
524     { "+intensity", 0L, ImageInfoOptionFlag, MagickFalse },
525     { "-intensity", 1L, ImageInfoOptionFlag, MagickFalse },
526     { "+intent", 0L, ImageInfoOptionFlag, MagickFalse },
527     { "-intent", 1L, ImageInfoOptionFlag, MagickFalse },
528     { "+interlace", 0L, ImageInfoOptionFlag, MagickFalse },
529     { "-interlace", 1L, ImageInfoOptionFlag, MagickFalse },
530     { "+interline-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
531     { "-interline-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
532     { "+interpolate", 0L, ImageInfoOptionFlag, MagickFalse },
533     { "-interpolate", 1L, ImageInfoOptionFlag, MagickFalse },
534     { "+interpolative-resize", 1L, DeprecateOptionFlag, MagickTrue },
535     { "-interpolative-resize", 1L, SimpleOperatorFlag, MagickFalse },
536     { "+interword-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
537     { "-interword-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
538     { "+kerning", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
539     { "-kerning", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
540     { "+kuwahara", 0L, DeprecateOptionFlag, MagickTrue },
541     { "-kuwahara", 1L, SimpleOperatorFlag, MagickFalse },
542     { "+label", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
543     { "-label", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
544     { "+lat", 1L, DeprecateOptionFlag, MagickTrue },
545     { "-lat", 1L, SimpleOperatorFlag, MagickFalse },
546     { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
547     { "-layers", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
548     { "-level", 1L, SimpleOperatorFlag, MagickFalse },
549     { "+level", 1L, SimpleOperatorFlag, MagickFalse },
550     { "-level-colors", 1L, SimpleOperatorFlag, MagickFalse },
551     { "+level-colors", 1L, SimpleOperatorFlag, MagickFalse },
552     { "+limit", 0L, DeprecateOptionFlag, MagickTrue },
553     { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
554     { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue },
555     { "-linear-stretch", 1L, SimpleOperatorFlag, MagickFalse },
556     { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue },
557     { "-liquid-rescale", 1L, SimpleOperatorFlag, MagickFalse },
558     { "+list", 0L, DeprecateOptionFlag, MagickTrue },
559     { "-list", 1L, NoImageOperatorFlag, MagickFalse },
560     { "+local-contrast", 0L, DeprecateOptionFlag, MagickTrue },
561     { "-local-contrast", 1L, SimpleOperatorFlag, MagickFalse },
562     { "+log", 0L, DeprecateOptionFlag, MagickFalse },
563     { "-log", 1L, GlobalOptionFlag, MagickFalse },
564     { "+loop", 0L, ImageInfoOptionFlag, MagickFalse },
565     { "-loop", 1L, ImageInfoOptionFlag, MagickFalse },
566     { "+lowlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
567     { "-lowlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
568     { "+magnify", 0L, DeprecateOptionFlag, MagickTrue },
569     { "-magnify", 0L, SimpleOperatorFlag, MagickFalse },
570     { "+map", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
571     { "-map", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
572     { "+mask", 0L, DeprecateOptionFlag | NeverInterpretArgsFlag, MagickFalse },
573     { "-mask", 1L, DeprecateOptionFlag | NeverInterpretArgsFlag, MagickFalse },
574     { "-matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
575     { "+matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
576     { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
577     { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
578     { "+mean-shift", 1L, DeprecateOptionFlag, MagickTrue },
579     { "-mean-shift", 1L, SimpleOperatorFlag, MagickTrue },
580     { "+median", 1L, DeprecateOptionFlag, MagickTrue },
581     { "-median", 1L, ReplacedOptionFlag | SimpleOperatorFlag | FireOptionFlag, MagickTrue },
582     { "+metric", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse },
583     { "-metric", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
584     { "-minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
585     { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
586     { "+mode", 1L, NonMagickOptionFlag, MagickFalse },
587     { "-mode", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
588     { "+modulate", 1L, DeprecateOptionFlag, MagickTrue },
589     { "-modulate", 1L, SimpleOperatorFlag, MagickFalse },
590     { "-moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
591     { "+moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
592     { "-monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
593     { "+monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
594     { "+monochrome", 0L, ImageInfoOptionFlag, MagickFalse },
595     { "-monochrome", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
596     { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
597     { "-morph", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
598     { "+morphology", 2L, DeprecateOptionFlag, MagickTrue },
599     { "-morphology", 2L, SimpleOperatorFlag, MagickFalse },
600     { "+mosaic", 0L, DeprecateOptionFlag, MagickTrue },
601     { "-mosaic", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
602     { "+motion-blur", 1L, DeprecateOptionFlag, MagickTrue },
603     { "-motion-blur", 1L, SimpleOperatorFlag, MagickFalse },
604     { "+name", 0L, NonMagickOptionFlag, MagickFalse },
605     { "-name", 1L, NonMagickOptionFlag, MagickFalse },
606     { "+negate", 0L, SimpleOperatorFlag, MagickFalse },
607     { "-negate", 0L, SimpleOperatorFlag, MagickFalse },
608     { "-noise", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickFalse },
609     { "+noise", 1L, SimpleOperatorFlag, MagickFalse },
610     { "-noop", 0L, NoImageOperatorFlag, MagickFalse },
611     { "+normalize", 0L, DeprecateOptionFlag, MagickTrue },
612     { "-normalize", 0L, SimpleOperatorFlag, MagickFalse },
613     { "-opaque", 1L, SimpleOperatorFlag, MagickFalse },
614     { "+opaque", 1L, SimpleOperatorFlag, MagickFalse },
615     { "+ordered-dither", 0L, DeprecateOptionFlag, MagickTrue },
616     { "-ordered-dither", 1L, SimpleOperatorFlag, MagickFalse },
617     { "+orient", 0L, ImageInfoOptionFlag, MagickFalse },
618     { "-orient", 1L, ImageInfoOptionFlag, MagickFalse },
619     { "+page", 0L, ImageInfoOptionFlag, MagickFalse },
620     { "-page", 1L, ImageInfoOptionFlag, MagickFalse },
621     { "+paint", 0L, DeprecateOptionFlag, MagickTrue },
622     { "-paint", 1L, SimpleOperatorFlag, MagickFalse },
623     { "+path", 0L, NonMagickOptionFlag, MagickFalse },
624     { "-path", 1L, NonMagickOptionFlag, MagickFalse },
625     { "+pause", 0L, NonMagickOptionFlag, MagickFalse },
626     { "-pause", 1L, NonMagickOptionFlag, MagickFalse },
627     { "-ping", 0L, ImageInfoOptionFlag, MagickFalse },
628     { "+ping", 0L, ImageInfoOptionFlag, MagickFalse },
629     { "+pointsize", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
630     { "-pointsize", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
631     { "+polaroid", 0L, SimpleOperatorFlag, MagickFalse },
632     { "-polaroid", 1L, SimpleOperatorFlag, MagickFalse },
633     { "+poly", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
634     { "-poly", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
635     { "+posterize", 1L, DeprecateOptionFlag, MagickTrue },
636     { "-posterize", 1L, SimpleOperatorFlag, MagickFalse },
637     { "+precision", 0L, ImageInfoOptionFlag, MagickFalse },
638     { "-precision", 1L, ImageInfoOptionFlag, MagickFalse },
639     { "+preview", 0L, DeprecateOptionFlag, MagickTrue },
640     { "-preview", 1L, GlobalOptionFlag, MagickFalse },
641     { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
642     { "-print", 1L, NoImageOperatorFlag | AlwaysInterpretArgsFlag | FireOptionFlag, MagickFalse },
643     { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
644     { "-process", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
645     { "+profile", 1L, SimpleOperatorFlag, MagickFalse },
646     { "-profile", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
647     { "+quality", 0L, ImageInfoOptionFlag, MagickFalse },
648     { "-quality", 1L, ImageInfoOptionFlag, MagickFalse },
649     { "+quantize", 0L, QuantizeInfoOptionFlag, MagickFalse },
650     { "-quantize", 1L, QuantizeInfoOptionFlag, MagickFalse },
651     { "-raise", 1L, SimpleOperatorFlag, MagickFalse },
652     { "+raise", 1L, SimpleOperatorFlag, MagickFalse },
653     { "+random-threshold", 1L, DeprecateOptionFlag, MagickTrue },
654     { "-random-threshold", 1L, SimpleOperatorFlag, MagickFalse },
655     { "-read", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
656     { "+read-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
657     { "-read-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
658     { "+recolor", 1L, DeprecateOptionFlag, MagickTrue },
659     { "-recolor", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
660     { "+red-primary", 0L, ImageInfoOptionFlag, MagickFalse },
661     { "-red-primary", 1L, ImageInfoOptionFlag, MagickFalse },
662     { "+region", 0L, NoImageOperatorFlag, MagickFalse },
663     { "-region", 1L, NoImageOperatorFlag, MagickFalse },
664     { "+remap", 0L, ListOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
665     { "-remap", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
666     { "+remote", 0L, NonMagickOptionFlag, MagickFalse },
667     { "-remote", 1L, NonMagickOptionFlag, MagickFalse },
668     { "-render", 0L, DrawInfoOptionFlag, MagickFalse },
669     { "+render", 0L, DrawInfoOptionFlag, MagickFalse },
670     { "+resample", 1L, DeprecateOptionFlag, MagickTrue },
671     { "-resample", 1L, SimpleOperatorFlag, MagickFalse },
672     { "-respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
673     { "+respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
674     { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
675     { "-reverse", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
676     { "+roll", 1L, DeprecateOptionFlag, MagickTrue },
677     { "-roll", 1L, SimpleOperatorFlag, MagickFalse },
678     { "+rotate", 1L, DeprecateOptionFlag, MagickTrue },
679     { "-rotate", 1L, SimpleOperatorFlag, MagickFalse },
680     { "-rotational-blur", 1L, SimpleOperatorFlag, MagickFalse },
681     { "+sample", 1L, DeprecateOptionFlag, MagickTrue },
682     { "-sample", 1L, SimpleOperatorFlag, MagickFalse },
683     { "+sampling-factor", 0L, ImageInfoOptionFlag, MagickFalse },
684     { "-sampling-factor", 1L, ImageInfoOptionFlag, MagickFalse },
685     { "-sans0", 0L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
686     { "+sans0", 0L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'noop' */
687     { "+sans1", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
688     { "-sans1", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'sans' */
689     { "-sans", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
690     { "+sans", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
691     { "-sans2", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
692     { "+sans2", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
693     { "+scale", 1L, DeprecateOptionFlag, MagickTrue },
694     { "-scale", 1L, SimpleOperatorFlag, MagickFalse },
695     { "+scene", 0L, ImageInfoOptionFlag, MagickFalse },
696     { "-scene", 1L, ImageInfoOptionFlag, MagickFalse },
697     { "+scenes", 0L, NonMagickOptionFlag, MagickFalse },
698     { "-scenes", 1L, NonMagickOptionFlag, MagickFalse },
699     { "+screen", 0L, NonMagickOptionFlag, MagickFalse },
700     { "-screen", 1L, NonMagickOptionFlag, MagickFalse },
701     { "-script", 1L, SpecialOptionFlag | NeverInterpretArgsFlag, MagickFalse },
702     { "+seed", 0L, GlobalOptionFlag, MagickFalse },
703     { "-seed", 1L, GlobalOptionFlag, MagickFalse },
704     { "+segment", 1L, DeprecateOptionFlag, MagickTrue },
705     { "-segment", 1L, SimpleOperatorFlag, MagickFalse },
706     { "+selective-blur", 1L, DeprecateOptionFlag, MagickTrue },
707     { "-selective-blur", 1L, SimpleOperatorFlag, MagickFalse },
708     { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
709     { "-separate", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
710     { "+sepia-tone", 1L, DeprecateOptionFlag, MagickTrue },
711     { "-sepia-tone", 1L, SimpleOperatorFlag, MagickFalse },
712     { "+set", 1L, NoImageOperatorFlag, MagickFalse },
713     { "-set", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
714     { "+shade", 0L, DeprecateOptionFlag, MagickTrue },
715     { "-shade", 1L, SimpleOperatorFlag, MagickFalse },
716     { "+shadow", 1L, DeprecateOptionFlag, MagickTrue },
717     { "-shadow", 1L, SimpleOperatorFlag, MagickFalse },
718     { "+shared-memory", 0L, NonMagickOptionFlag, MagickFalse },
719     { "-shared-memory", 1L, NonMagickOptionFlag, MagickFalse },
720     { "+sharpen", 1L, DeprecateOptionFlag, MagickTrue },
721     { "-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
722     { "+shave", 1L, DeprecateOptionFlag, MagickTrue },
723     { "-shave", 1L, SimpleOperatorFlag, MagickFalse },
724     { "+shear", 1L, DeprecateOptionFlag, MagickTrue },
725     { "-shear", 1L, SimpleOperatorFlag, MagickFalse },
726     { "-sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
727     { "+sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
728     { "+silent", 0L, NonMagickOptionFlag, MagickFalse },
729     { "-silent", 1L, NonMagickOptionFlag, MagickFalse },
730     { "+similarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
731     { "-similarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
732     { "+sketch", 1L, DeprecateOptionFlag, MagickTrue },
733     { "-sketch", 1L, SimpleOperatorFlag, MagickFalse },
734     { "-smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
735     { "+smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
736     { "+snaps", 0L, NonMagickOptionFlag, MagickFalse },
737     { "-snaps", 1L, NonMagickOptionFlag, MagickFalse },
738     { "+solarize", 1L, DeprecateOptionFlag, MagickTrue },
739     { "-solarize", 1L, SimpleOperatorFlag, MagickFalse },
740     { "+sparse-color", 1L, DeprecateOptionFlag, MagickTrue },
741     { "-sparse-color", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
742     { "+splice", 1L, DeprecateOptionFlag, MagickTrue },
743     { "-splice", 1L, SimpleOperatorFlag, MagickFalse },
744     { "+spread", 1L, DeprecateOptionFlag, MagickTrue },
745     { "-spread", 1L, SimpleOperatorFlag, MagickFalse },
746     { "+statistic", 2L, DeprecateOptionFlag, MagickTrue },
747     { "-statistic", 2L, SimpleOperatorFlag, MagickFalse },
748     { "+stegano", 0L, NonMagickOptionFlag, MagickFalse },
749     { "-stegano", 1L, NonMagickOptionFlag, MagickFalse },
750     { "+stereo", 0L, DeprecateOptionFlag, MagickTrue },
751     { "-stereo", 1L, NonMagickOptionFlag, MagickFalse },
752     { "+stretch", 1L, DeprecateOptionFlag, MagickTrue },
753     { "-stretch", 1L, SimpleOperatorFlag, MagickFalse },
754     { "+strip", 0L, DeprecateOptionFlag, MagickTrue },
755     { "-strip", 0L, SimpleOperatorFlag, MagickFalse },
756     { "+stroke", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
757     { "-stroke", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
758     { "-strokewidth", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
759     { "+strokewidth", 1L, ImageInfoOptionFlag, MagickFalse },
760     { "+style", 0L, DrawInfoOptionFlag, MagickFalse },
761     { "-style", 1L, DrawInfoOptionFlag, MagickFalse },
762     { "-subimage", 0L, ListOperatorFlag, MagickFalse },
763     { "-subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
764     { "+subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
765     { "+swap", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
766     { "-swap", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
767     { "+swirl", 1L, DeprecateOptionFlag, MagickTrue },
768     { "-swirl", 1L, SimpleOperatorFlag, MagickFalse },
769     { "-synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
770     { "+synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
771     { "-taint", 0L, ImageInfoOptionFlag, MagickFalse },
772     { "+taint", 0L, ImageInfoOptionFlag, MagickFalse },
773     { "+text-font", 0L, NonMagickOptionFlag, MagickFalse },
774     { "-text-font", 1L, NonMagickOptionFlag, MagickFalse },
775     { "+texture", 0L, ImageInfoOptionFlag, MagickFalse },
776     { "-texture", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
777     { "+threshold", 0L, SimpleOperatorFlag, MagickFalse },
778     { "-threshold", 1L, SimpleOperatorFlag, MagickFalse },
779     { "+thumbnail", 1L, DeprecateOptionFlag, MagickTrue },
780     { "-thumbnail", 1L, SimpleOperatorFlag, MagickFalse },
781     { "+tile", 0L, DrawInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
782     { "-tile", 1L, DrawInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
783     { "+tile-offset", 0L, ImageInfoOptionFlag, MagickFalse },
784     { "-tile-offset", 1L, ImageInfoOptionFlag, MagickFalse },
785     { "-tint", 1L, SimpleOperatorFlag, MagickFalse },
786     { "+tint", 1L, SimpleOperatorFlag, MagickFalse },
787     { "+title", 0L, NonMagickOptionFlag, MagickFalse },
788     { "-title", 1L, NonMagickOptionFlag, MagickFalse },
789     { "+transform", 0L, DeprecateOptionFlag, MagickTrue },
790     { "-transform", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
791     { "-transparent", 1L, SimpleOperatorFlag, MagickFalse },
792     { "+transparent", 1L, SimpleOperatorFlag, MagickFalse },
793     { "+transparent-color", 0L, ImageInfoOptionFlag, MagickFalse },
794     { "-transparent-color", 1L, ImageInfoOptionFlag, MagickFalse },
795     { "+transpose", 0L, DeprecateOptionFlag, MagickTrue },
796     { "-transpose", 0L, SimpleOperatorFlag, MagickFalse },
797     { "+transverse", 0L, DeprecateOptionFlag, MagickTrue },
798     { "-transverse", 0L, SimpleOperatorFlag, MagickFalse },
799     { "+treedepth", 1L, DeprecateOptionFlag, MagickTrue },
800     { "-treedepth", 1L, QuantizeInfoOptionFlag, MagickFalse },
801     { "+trim", 0L, DeprecateOptionFlag, MagickTrue },
802     { "-trim", 0L, SimpleOperatorFlag, MagickFalse },
803     { "+type", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
804     { "-type", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
805     { "+undercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
806     { "-undercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
807     { "-unique", 0L, SimpleOperatorFlag, MagickFalse },
808     { "+unique", 0L, SimpleOperatorFlag, MagickFalse },
809     { "+unique-colors", 0L, DeprecateOptionFlag, MagickTrue },
810     { "-unique-colors", 0L, SimpleOperatorFlag, MagickFalse },
811     { "+units", 0L, ImageInfoOptionFlag, MagickFalse },
812     { "-units", 1L, ImageInfoOptionFlag, MagickFalse },
813     { "+unsharp", 1L, DeprecateOptionFlag, MagickTrue },
814     { "-unsharp", 1L, SimpleOperatorFlag, MagickFalse },
815     { "+update", 0L, NonMagickOptionFlag, MagickFalse },
816     { "-update", 1L, NonMagickOptionFlag, MagickFalse },
817     { "+use-pixmap", 0L, NonMagickOptionFlag, MagickFalse },
818     { "-use-pixmap", 1L, NonMagickOptionFlag, MagickFalse },
819     { "-verbose", 0L, ImageInfoOptionFlag, MagickFalse },
820     { "+verbose", 0L, ImageInfoOptionFlag, MagickFalse },
821     { "+version", 0L, DeprecateOptionFlag, MagickTrue },
822     { "-version", 0L, NoImageOperatorFlag, MagickFalse },
823     { "+view", 0L, ImageInfoOptionFlag, MagickFalse },
824     { "-view", 1L, ImageInfoOptionFlag, MagickFalse },
825     { "+vignette", 1L, DeprecateOptionFlag, MagickTrue },
826     { "-vignette", 1L, SimpleOperatorFlag, MagickFalse },
827     { "+visual", 0L, NonMagickOptionFlag, MagickFalse },
828     { "-visual", 1L, NonMagickOptionFlag, MagickFalse },
829     { "+watermark", 0L, NonMagickOptionFlag, MagickFalse },
830     { "-watermark", 1L, NonMagickOptionFlag, MagickFalse },
831     { "+wave", 1L, DeprecateOptionFlag, MagickTrue },
832     { "-wave", 1L, SimpleOperatorFlag, MagickFalse },
833     { "+wavelet-denoise", 0L, DeprecateOptionFlag, MagickTrue },
834     { "-wavelet-denoise", 1L, SimpleOperatorFlag, MagickFalse },
835     { "+weight", 1L, DeprecateOptionFlag, MagickTrue },
836     { "-weight", 1L, DrawInfoOptionFlag, MagickFalse },
837     { "+white-point", 0L, ImageInfoOptionFlag, MagickFalse },
838     { "-white-point", 1L, ImageInfoOptionFlag, MagickFalse },
839     { "+white-threshold", 1L, DeprecateOptionFlag, MagickTrue },
840     { "-white-threshold", 1L, SimpleOperatorFlag, MagickFalse },
841     { "+window", 0L, NonMagickOptionFlag, MagickFalse },
842     { "-window", 1L, NonMagickOptionFlag, MagickFalse },
843     { "+window-group", 0L, NonMagickOptionFlag, MagickFalse },
844     { "-window-group", 1L, NonMagickOptionFlag, MagickFalse },
845     { "-write", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
846     { "+write", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
847     { "+write-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
848     { "-write-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
849     { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
850   },
851   ComplianceOptions[] =
852   {
853     { "Undefined", UndefinedCompliance, UndefinedOptionFlag, MagickTrue },
854     { "CSS", CSSCompliance, UndefinedOptionFlag, MagickFalse },
855     { "No", NoCompliance, UndefinedOptionFlag, MagickFalse },
856     { "SVG", SVGCompliance, UndefinedOptionFlag, MagickFalse },
857     { "X11", X11Compliance, UndefinedOptionFlag, MagickFalse },
858     { "XPM", XPMCompliance, UndefinedOptionFlag, MagickFalse },
859     { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
860   },
861   ComposeOptions[] =
862   {
863     { "Undefined", UndefinedCompositeOp, UndefinedOptionFlag, MagickTrue },
864     { "Atop", AtopCompositeOp, UndefinedOptionFlag, MagickFalse },
865     { "Blend", BlendCompositeOp, UndefinedOptionFlag, MagickFalse },
866     { "Blur", BlurCompositeOp, UndefinedOptionFlag, MagickFalse },
867     { "Bumpmap", BumpmapCompositeOp, UndefinedOptionFlag, MagickFalse },
868     { "ChangeMask", ChangeMaskCompositeOp, UndefinedOptionFlag, MagickFalse },
869     { "Clear", ClearCompositeOp, UndefinedOptionFlag, MagickFalse },
870     { "ColorBurn", ColorBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
871     { "ColorDodge", ColorDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
872     { "Colorize", ColorizeCompositeOp, UndefinedOptionFlag, MagickFalse },
873     { "CopyAlpha", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickFalse },
874     { "CopyBlack", CopyBlackCompositeOp, UndefinedOptionFlag, MagickFalse },
875     { "CopyBlue", CopyBlueCompositeOp, UndefinedOptionFlag, MagickFalse },
876     { "CopyCyan", CopyCyanCompositeOp, UndefinedOptionFlag, MagickFalse },
877     { "CopyGreen", CopyGreenCompositeOp, UndefinedOptionFlag, MagickFalse },
878     { "Copy", CopyCompositeOp, UndefinedOptionFlag, MagickFalse },
879     { "CopyMagenta", CopyMagentaCompositeOp, UndefinedOptionFlag, MagickFalse },
880     { "CopyRed", CopyRedCompositeOp, UndefinedOptionFlag, MagickFalse },
881     { "CopyYellow", CopyYellowCompositeOp, UndefinedOptionFlag, MagickFalse },
882     { "Darken", DarkenCompositeOp, UndefinedOptionFlag, MagickFalse },
883     { "DarkenIntensity", DarkenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
884     { "DivideDst", DivideDstCompositeOp, UndefinedOptionFlag, MagickFalse },
885     { "DivideSrc", DivideSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
886     { "Dst", DstCompositeOp, UndefinedOptionFlag, MagickFalse },
887     { "Difference", DifferenceCompositeOp, UndefinedOptionFlag, MagickFalse },
888     { "Displace", DisplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
889     { "Dissolve", DissolveCompositeOp, UndefinedOptionFlag, MagickFalse },
890     { "Distort", DistortCompositeOp, UndefinedOptionFlag, MagickFalse },
891     { "DstAtop", DstAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
892     { "DstIn", DstInCompositeOp, UndefinedOptionFlag, MagickFalse },
893     { "DstOut", DstOutCompositeOp, UndefinedOptionFlag, MagickFalse },
894     { "DstOver", DstOverCompositeOp, UndefinedOptionFlag, MagickFalse },
895     { "Exclusion", ExclusionCompositeOp, UndefinedOptionFlag, MagickFalse },
896     { "HardLight", HardLightCompositeOp, UndefinedOptionFlag, MagickFalse },
897     { "HardMix", HardMixCompositeOp, UndefinedOptionFlag, MagickFalse },
898     { "Hue", HueCompositeOp, UndefinedOptionFlag, MagickFalse },
899     { "In", InCompositeOp, UndefinedOptionFlag, MagickFalse },
900     { "Intensity", IntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
901     { "Lighten", LightenCompositeOp, UndefinedOptionFlag, MagickFalse },
902     { "LightenIntensity", LightenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
903     { "LinearBurn", LinearBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
904     { "LinearDodge", LinearDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
905     { "LinearLight", LinearLightCompositeOp, UndefinedOptionFlag, MagickFalse },
906     { "Luminize", LuminizeCompositeOp, UndefinedOptionFlag, MagickFalse },
907     { "Mathematics", MathematicsCompositeOp, UndefinedOptionFlag, MagickFalse },
908     { "MinusDst", MinusDstCompositeOp, UndefinedOptionFlag, MagickFalse },
909     { "MinusSrc", MinusSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
910     { "Modulate", ModulateCompositeOp, UndefinedOptionFlag, MagickFalse },
911     { "ModulusAdd", ModulusAddCompositeOp, UndefinedOptionFlag, MagickFalse },
912     { "ModulusSubtract", ModulusSubtractCompositeOp, UndefinedOptionFlag, MagickFalse },
913     { "Multiply", MultiplyCompositeOp, UndefinedOptionFlag, MagickFalse },
914     { "None", NoCompositeOp, UndefinedOptionFlag, MagickFalse },
915     { "Out", OutCompositeOp, UndefinedOptionFlag, MagickFalse },
916     { "Overlay", OverlayCompositeOp, UndefinedOptionFlag, MagickFalse },
917     { "Over", OverCompositeOp, UndefinedOptionFlag, MagickFalse },
918     { "PegtopLight", PegtopLightCompositeOp, UndefinedOptionFlag, MagickFalse },
919     { "PinLight", PinLightCompositeOp, UndefinedOptionFlag, MagickFalse },
920     { "Plus", PlusCompositeOp, UndefinedOptionFlag, MagickFalse },
921     { "Replace", ReplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
922     { "Saturate", SaturateCompositeOp, UndefinedOptionFlag, MagickFalse },
923     { "Screen", ScreenCompositeOp, UndefinedOptionFlag, MagickFalse },
924     { "SoftLight", SoftLightCompositeOp, UndefinedOptionFlag, MagickFalse },
925     { "Src", SrcCompositeOp, UndefinedOptionFlag, MagickFalse },
926     { "SrcAtop", SrcAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
927     { "SrcIn", SrcInCompositeOp, UndefinedOptionFlag, MagickFalse },
928     { "SrcOut", SrcOutCompositeOp, UndefinedOptionFlag, MagickFalse },
929     { "SrcOver", SrcOverCompositeOp, UndefinedOptionFlag, MagickFalse },
930     { "VividLight", VividLightCompositeOp, UndefinedOptionFlag, MagickFalse },
931     { "Xor", XorCompositeOp, UndefinedOptionFlag, MagickFalse },
932     { "Divide", DivideDstCompositeOp, DeprecateOptionFlag, MagickTrue },
933     { "Minus", MinusDstCompositeOp, DeprecateOptionFlag, MagickTrue },
934     { "Subtract", ModulusSubtractCompositeOp, DeprecateOptionFlag, MagickTrue },
935     { "Add", ModulusAddCompositeOp, DeprecateOptionFlag, MagickTrue },
936     { "Threshold", ThresholdCompositeOp, DeprecateOptionFlag, MagickTrue },
937     { "CopyOpacity", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickTrue },
938     { (char *) NULL, UndefinedCompositeOp, UndefinedOptionFlag, MagickFalse }
939   },
940   CompressOptions[] =
941   {
942     { "Undefined", UndefinedCompression, UndefinedOptionFlag, MagickTrue },
943     { "B44", B44Compression, UndefinedOptionFlag, MagickFalse },
944     { "B44A", B44ACompression, UndefinedOptionFlag, MagickFalse },
945     { "BZip", BZipCompression, UndefinedOptionFlag, MagickFalse },
946     { "DXT1", DXT1Compression, UndefinedOptionFlag, MagickFalse },
947     { "DXT3", DXT3Compression, UndefinedOptionFlag, MagickFalse },
948     { "DXT5", DXT5Compression, UndefinedOptionFlag, MagickFalse },
949     { "Fax", FaxCompression, UndefinedOptionFlag, MagickFalse },
950     { "Group4", Group4Compression, UndefinedOptionFlag, MagickFalse },
951     { "JBIG1", JBIG1Compression, UndefinedOptionFlag, MagickFalse },
952     { "JBIG2", JBIG2Compression, UndefinedOptionFlag, MagickFalse },
953     { "JPEG", JPEGCompression, UndefinedOptionFlag, MagickFalse },
954     { "JPEG2000", JPEG2000Compression, UndefinedOptionFlag, MagickFalse },
955     { "Lossless", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
956     { "LosslessJPEG", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
957     { "LZMA", LZMACompression, UndefinedOptionFlag, MagickFalse },
958     { "LZW", LZWCompression, UndefinedOptionFlag, MagickFalse },
959     { "None", NoCompression, UndefinedOptionFlag, MagickFalse },
960     { "Piz", PizCompression, UndefinedOptionFlag, MagickFalse },
961     { "Pxr24", Pxr24Compression, UndefinedOptionFlag, MagickFalse },
962     { "RLE", RLECompression, UndefinedOptionFlag, MagickFalse },
963     { "Zip", ZipCompression, UndefinedOptionFlag, MagickFalse },
964     { "RunlengthEncoded", RLECompression, UndefinedOptionFlag, MagickFalse },
965     { "ZipS", ZipSCompression, UndefinedOptionFlag, MagickFalse },
966     { (char *) NULL, UndefinedCompression, UndefinedOptionFlag, MagickFalse }
967   },
968   DataTypeOptions[] =
969   {
970     { "Undefined", UndefinedData, UndefinedOptionFlag, MagickTrue },
971     { "Byte", ByteData, UndefinedOptionFlag, MagickFalse },
972     { "Long", LongData, UndefinedOptionFlag, MagickFalse },
973     { "Short", ShortData, UndefinedOptionFlag, MagickFalse },
974     { "String", StringData, UndefinedOptionFlag, MagickFalse },
975     { (char *) NULL, UndefinedData, UndefinedOptionFlag, MagickFalse }
976   },
977   DecorateOptions[] =
978   {
979     { "Undefined", UndefinedDecoration, UndefinedOptionFlag, MagickTrue },
980     { "LineThrough", LineThroughDecoration, UndefinedOptionFlag, MagickFalse },
981     { "None", NoDecoration, UndefinedOptionFlag, MagickFalse },
982     { "Overline", OverlineDecoration, UndefinedOptionFlag, MagickFalse },
983     { "Underline", UnderlineDecoration, UndefinedOptionFlag, MagickFalse },
984     { (char *) NULL, UndefinedDecoration, UndefinedOptionFlag, MagickFalse }
985   },
986   DirectionOptions[] =
987   {
988     { "Undefined", UndefinedDirection, UndefinedOptionFlag, MagickTrue },
989     { "right-to-left", RightToLeftDirection, UndefinedOptionFlag, MagickFalse },
990     { "left-to-right", LeftToRightDirection, UndefinedOptionFlag, MagickFalse },
991     { (char *) NULL, UndefinedDirection, UndefinedOptionFlag, MagickFalse }
992   },
993   DisposeOptions[] =
994   {
995     { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
996     { "Background", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
997     { "None", NoneDispose, UndefinedOptionFlag, MagickFalse },
998     { "Previous", PreviousDispose, UndefinedOptionFlag, MagickFalse },
999     { "0", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
1000     { "1", NoneDispose, UndefinedOptionFlag, MagickFalse },
1001     { "2", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
1002     { "3", PreviousDispose, UndefinedOptionFlag, MagickFalse },
1003     { (char *) NULL, UndefinedDispose, UndefinedOptionFlag, MagickFalse }
1004   },
1005   DistortOptions[] =
1006   {
1007     { "Affine", AffineDistortion, UndefinedOptionFlag, MagickFalse },
1008     { "AffineProjection", AffineProjectionDistortion, UndefinedOptionFlag, MagickFalse },
1009     { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
1010     { "SRT", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
1011     { "Perspective", PerspectiveDistortion, UndefinedOptionFlag, MagickFalse },
1012     { "PerspectiveProjection", PerspectiveProjectionDistortion, UndefinedOptionFlag, MagickFalse },
1013     { "Bilinear", BilinearForwardDistortion, UndefinedOptionFlag, MagickTrue },
1014     { "BilinearForward", BilinearForwardDistortion, UndefinedOptionFlag, MagickFalse },
1015     { "BilinearReverse", BilinearReverseDistortion, UndefinedOptionFlag, MagickFalse },
1016     { "Polynomial", PolynomialDistortion, UndefinedOptionFlag, MagickFalse },
1017     { "Arc", ArcDistortion, UndefinedOptionFlag, MagickFalse },
1018     { "Polar", PolarDistortion, UndefinedOptionFlag, MagickFalse },
1019     { "DePolar", DePolarDistortion, UndefinedOptionFlag, MagickFalse },
1020     { "Barrel", BarrelDistortion, UndefinedOptionFlag, MagickFalse },
1021     { "Cylinder2Plane", Cylinder2PlaneDistortion, UndefinedOptionFlag, MagickTrue },
1022     { "Plane2Cylinder", Plane2CylinderDistortion, UndefinedOptionFlag, MagickTrue },
1023     { "BarrelInverse", BarrelInverseDistortion, UndefinedOptionFlag, MagickFalse },
1024     { "Shepards", ShepardsDistortion, UndefinedOptionFlag, MagickFalse },
1025     { "Resize", ResizeDistortion, UndefinedOptionFlag, MagickFalse },
1026     { (char *) NULL, UndefinedDistortion, UndefinedOptionFlag, MagickFalse }
1027   },
1028   DitherOptions[] =
1029   {
1030     { "Undefined", UndefinedDitherMethod, UndefinedOptionFlag, MagickTrue },
1031     { "None", NoDitherMethod, UndefinedOptionFlag, MagickFalse },
1032     { "FloydSteinberg", FloydSteinbergDitherMethod, UndefinedOptionFlag, MagickFalse },
1033     { "Riemersma", RiemersmaDitherMethod, UndefinedOptionFlag, MagickFalse },
1034     { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
1035   },
1036   EndianOptions[] =
1037   {
1038     { "Undefined", UndefinedEndian, UndefinedOptionFlag, MagickTrue },
1039     { "LSB", LSBEndian, UndefinedOptionFlag, MagickFalse },
1040     { "MSB", MSBEndian, UndefinedOptionFlag, MagickFalse },
1041     { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
1042   },
1043   EvaluateOptions[] =
1044   {
1045     { "Undefined", UndefinedEvaluateOperator, UndefinedOptionFlag, MagickTrue },
1046     { "Abs", AbsEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1047     { "Add", AddEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1048     { "AddModulus", AddModulusEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1049     { "And", AndEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1050     { "Cos", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1051     { "Cosine", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1052     { "Divide", DivideEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1053     { "Exp", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1054     { "Exponential", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1055     { "GaussianNoise", GaussianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1056     { "ImpulseNoise", ImpulseNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1057     { "LaplacianNoise", LaplacianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1058     { "LeftShift", LeftShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1059     { "Log", LogEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1060     { "Max", MaxEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1061     { "Mean", MeanEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1062     { "Median", MedianEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1063     { "Min", MinEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1064     { "MultiplicativeNoise", MultiplicativeNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1065     { "Multiply", MultiplyEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1066     { "Or", OrEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1067     { "PoissonNoise", PoissonNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1068     { "Pow", PowEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1069     { "RightShift", RightShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1070     { "RMS", RootMeanSquareEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1071     { "RootMeanSquare", RootMeanSquareEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1072     { "Set", SetEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1073     { "Sin", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1074     { "Sine", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1075     { "Subtract", SubtractEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1076     { "Sum", SumEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1077     { "Threshold", ThresholdEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1078     { "ThresholdBlack", ThresholdBlackEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1079     { "ThresholdWhite", ThresholdWhiteEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1080     { "UniformNoise", UniformNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1081     { "Xor", XorEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1082     { (char *) NULL, UndefinedEvaluateOperator, UndefinedOptionFlag, MagickFalse }
1083   },
1084   FillRuleOptions[] =
1085   {
1086     { "Undefined", UndefinedRule, UndefinedOptionFlag, MagickTrue },
1087     { "Evenodd", EvenOddRule, UndefinedOptionFlag, MagickFalse },
1088     { "NonZero", NonZeroRule, UndefinedOptionFlag, MagickFalse },
1089     { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
1090   },
1091   FilterOptions[] =
1092   {
1093     { "Undefined", UndefinedFilter, UndefinedOptionFlag, MagickTrue },
1094     { "Bartlett", BartlettFilter, UndefinedOptionFlag, MagickFalse },
1095     { "Blackman", BlackmanFilter, UndefinedOptionFlag, MagickFalse },
1096     { "Bohman", BohmanFilter, UndefinedOptionFlag, MagickFalse },
1097     { "Box", BoxFilter, UndefinedOptionFlag, MagickFalse },
1098     { "Catrom", CatromFilter, UndefinedOptionFlag, MagickFalse },
1099     { "Cosine", CosineFilter, UndefinedOptionFlag, MagickFalse },
1100     { "Cubic", CubicFilter, UndefinedOptionFlag, MagickFalse },
1101     { "Gaussian", GaussianFilter, UndefinedOptionFlag, MagickFalse },
1102     { "Hamming", HammingFilter, UndefinedOptionFlag, MagickFalse },
1103     { "Hann", HannFilter, UndefinedOptionFlag, MagickFalse },
1104     { "Hanning", HannFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1105     { "Hermite", HermiteFilter, UndefinedOptionFlag, MagickFalse },
1106     { "Jinc", JincFilter, UndefinedOptionFlag, MagickFalse },
1107     { "Kaiser", KaiserFilter, UndefinedOptionFlag, MagickFalse },
1108     { "Lagrange", LagrangeFilter, UndefinedOptionFlag, MagickFalse },
1109     { "Lanczos", LanczosFilter, UndefinedOptionFlag, MagickFalse },
1110     { "Lanczos2", Lanczos2Filter, UndefinedOptionFlag, MagickFalse },
1111     { "Lanczos2Sharp", Lanczos2SharpFilter, UndefinedOptionFlag, MagickFalse },
1112     { "LanczosRadius", LanczosRadiusFilter, UndefinedOptionFlag, MagickFalse },
1113     { "LanczosSharp", LanczosSharpFilter, UndefinedOptionFlag, MagickFalse },
1114     { "Mitchell", MitchellFilter, UndefinedOptionFlag, MagickFalse },
1115     { "Parzen", ParzenFilter, UndefinedOptionFlag, MagickFalse },
1116     { "Point", PointFilter, UndefinedOptionFlag, MagickFalse },
1117     { "Quadratic", QuadraticFilter, UndefinedOptionFlag, MagickFalse },
1118     { "Robidoux", RobidouxFilter, UndefinedOptionFlag, MagickFalse },
1119     { "RobidouxSharp", RobidouxSharpFilter, UndefinedOptionFlag, MagickFalse },
1120     { "Sinc", SincFilter, UndefinedOptionFlag, MagickFalse },
1121     { "SincFast", SincFastFilter, UndefinedOptionFlag, MagickFalse },
1122     { "Spline", SplineFilter, UndefinedOptionFlag, MagickFalse },
1123     { "Triangle", TriangleFilter, UndefinedOptionFlag, MagickFalse },
1124     { "Welch", WelchFilter, UndefinedOptionFlag, MagickFalse },
1125     { "Welsh", WelchFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1126     { (char *) NULL, UndefinedFilter, UndefinedOptionFlag, MagickFalse }
1127   },
1128   FunctionOptions[] =
1129   {
1130     { "Undefined", UndefinedFunction, UndefinedOptionFlag, MagickTrue },
1131     { "Polynomial", PolynomialFunction, UndefinedOptionFlag, MagickFalse },
1132     { "Sinusoid", SinusoidFunction, UndefinedOptionFlag, MagickFalse },
1133     { "ArcSin", ArcsinFunction, UndefinedOptionFlag, MagickFalse },
1134     { "ArcTan", ArctanFunction, UndefinedOptionFlag, MagickFalse },
1135     { (char *) NULL, UndefinedFunction, UndefinedOptionFlag, MagickFalse }
1136   },
1137   GradientOptions[] =
1138   {
1139     { "Undefined", UndefinedGradient, UndefinedOptionFlag, MagickTrue },
1140     { "Linear", LinearGradient, UndefinedOptionFlag, MagickFalse },
1141     { "Radial", RadialGradient, UndefinedOptionFlag, MagickFalse },
1142     { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
1143   },
1144   GravityOptions[] =
1145   {
1146     { "Undefined", UndefinedGravity, UndefinedOptionFlag, MagickTrue },
1147     { "None", UndefinedGravity, UndefinedOptionFlag, MagickFalse },
1148     { "Center", CenterGravity, UndefinedOptionFlag, MagickFalse },
1149     { "East", EastGravity, UndefinedOptionFlag, MagickFalse },
1150     { "Forget", ForgetGravity, UndefinedOptionFlag, MagickFalse },
1151     { "NorthEast", NorthEastGravity, UndefinedOptionFlag, MagickFalse },
1152     { "North", NorthGravity, UndefinedOptionFlag, MagickFalse },
1153     { "NorthWest", NorthWestGravity, UndefinedOptionFlag, MagickFalse },
1154     { "SouthEast", SouthEastGravity, UndefinedOptionFlag, MagickFalse },
1155     { "South", SouthGravity, UndefinedOptionFlag, MagickFalse },
1156     { "SouthWest", SouthWestGravity, UndefinedOptionFlag, MagickFalse },
1157     { "West", WestGravity, UndefinedOptionFlag, MagickFalse },
1158     { (char *) NULL, UndefinedGravity, UndefinedOptionFlag, MagickFalse }
1159   },
1160   IntentOptions[] =
1161   {
1162     { "Undefined", UndefinedIntent, UndefinedOptionFlag, MagickTrue },
1163     { "Absolute", AbsoluteIntent, UndefinedOptionFlag, MagickFalse },
1164     { "Perceptual", PerceptualIntent, UndefinedOptionFlag, MagickFalse },
1165     { "Relative", RelativeIntent, UndefinedOptionFlag, MagickFalse },
1166     { "Saturation", SaturationIntent, UndefinedOptionFlag, MagickFalse },
1167     { (char *) NULL, UndefinedIntent, UndefinedOptionFlag, MagickFalse }
1168   },
1169   InterlaceOptions[] =
1170   {
1171     { "Undefined", UndefinedInterlace, UndefinedOptionFlag, MagickTrue },
1172     { "Line", LineInterlace, UndefinedOptionFlag, MagickFalse },
1173     { "None", NoInterlace, UndefinedOptionFlag, MagickFalse },
1174     { "Plane", PlaneInterlace, UndefinedOptionFlag, MagickFalse },
1175     { "Partition", PartitionInterlace, UndefinedOptionFlag, MagickFalse },
1176     { "GIF", GIFInterlace, UndefinedOptionFlag, MagickFalse },
1177     { "JPEG", JPEGInterlace, UndefinedOptionFlag, MagickFalse },
1178     { "PNG", PNGInterlace, UndefinedOptionFlag, MagickFalse },
1179     { (char *) NULL, UndefinedInterlace, UndefinedOptionFlag, MagickFalse }
1180   },
1181   InterpolateOptions[] =
1182   {
1183     { "Undefined", UndefinedInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1184     { "Average", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1185     { "Average4", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1186     { "Average9", Average9InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1187     { "Average16", Average16InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1188     { "Background", BackgroundInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1189     { "Bilinear", BilinearInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1190     { "Blend", BlendInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1191     { "Catrom", CatromInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1192     { "Integer", IntegerInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1193     { "Mesh", MeshInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1194     { "Nearest", NearestInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1195     { "NearestNeighbor", NearestInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1196     { "Spline", SplineInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1197 /*  { "Filter", FilterInterpolatePixel, UndefinedOptionFlag, MagickFalse }, */
1198     { (char *) NULL, UndefinedInterpolatePixel, UndefinedOptionFlag, MagickFalse }
1199   },
1200   KernelOptions[] =
1201   {
1202     { "Undefined", UndefinedKernel, UndefinedOptionFlag, MagickTrue },
1203     { "Unity", UnityKernel, UndefinedOptionFlag, MagickFalse },
1204     { "Gaussian", GaussianKernel, UndefinedOptionFlag, MagickFalse },
1205     { "DoG", DoGKernel, UndefinedOptionFlag, MagickFalse },
1206     { "LoG", LoGKernel, UndefinedOptionFlag, MagickFalse },
1207     { "Blur", BlurKernel, UndefinedOptionFlag, MagickFalse },
1208     { "Comet", CometKernel, UndefinedOptionFlag, MagickFalse },
1209     { "Binomial", BinomialKernel, UndefinedOptionFlag, MagickFalse },
1210     { "Laplacian", LaplacianKernel, UndefinedOptionFlag, MagickFalse },
1211     { "Sobel", SobelKernel, UndefinedOptionFlag, MagickFalse },
1212     { "FreiChen", FreiChenKernel, UndefinedOptionFlag, MagickFalse },
1213     { "Roberts", RobertsKernel, UndefinedOptionFlag, MagickFalse },
1214     { "Prewitt", PrewittKernel, UndefinedOptionFlag, MagickFalse },
1215     { "Compass", CompassKernel, UndefinedOptionFlag, MagickFalse },
1216     { "Kirsch", KirschKernel, UndefinedOptionFlag, MagickFalse },
1217     { "Diamond", DiamondKernel, UndefinedOptionFlag, MagickFalse },
1218     { "Square", SquareKernel, UndefinedOptionFlag, MagickFalse },
1219     { "Rectangle", RectangleKernel, UndefinedOptionFlag, MagickFalse },
1220     { "Disk", DiskKernel, UndefinedOptionFlag, MagickFalse },
1221     { "Octagon", OctagonKernel, UndefinedOptionFlag, MagickFalse },
1222     { "Plus", PlusKernel, UndefinedOptionFlag, MagickFalse },
1223     { "Cross", CrossKernel, UndefinedOptionFlag, MagickFalse },
1224     { "Ring", RingKernel, UndefinedOptionFlag, MagickFalse },
1225     { "Peaks", PeaksKernel, UndefinedOptionFlag, MagickFalse },
1226     { "Edges", EdgesKernel, UndefinedOptionFlag, MagickFalse },
1227     { "Corners", CornersKernel, UndefinedOptionFlag, MagickFalse },
1228     { "Diagonals", DiagonalsKernel, UndefinedOptionFlag, MagickFalse },
1229     { "LineEnds", LineEndsKernel, UndefinedOptionFlag, MagickFalse },
1230     { "LineJunctions", LineJunctionsKernel, UndefinedOptionFlag, MagickFalse },
1231     { "Ridges", RidgesKernel, UndefinedOptionFlag, MagickFalse },
1232     { "ConvexHull", ConvexHullKernel, UndefinedOptionFlag, MagickFalse },
1233     { "ThinSe", ThinSEKernel, UndefinedOptionFlag, MagickFalse },
1234     { "Skeleton", SkeletonKernel, UndefinedOptionFlag, MagickFalse },
1235     { "Chebyshev", ChebyshevKernel, UndefinedOptionFlag, MagickFalse },
1236     { "Manhattan", ManhattanKernel, UndefinedOptionFlag, MagickFalse },
1237     { "Octagonal", OctagonalKernel, UndefinedOptionFlag, MagickFalse },
1238     { "Euclidean", EuclideanKernel, UndefinedOptionFlag, MagickFalse },
1239     { "User Defined", UserDefinedKernel, UndefinedOptionFlag, MagickTrue },
1240     { (char *) NULL, UndefinedKernel, UndefinedOptionFlag, MagickFalse }
1241   },
1242   LayerOptions[] =
1243   {
1244     { "Undefined", UndefinedLayer, UndefinedOptionFlag, MagickTrue },
1245     { "Coalesce", CoalesceLayer, UndefinedOptionFlag, MagickFalse },
1246     { "CompareAny", CompareAnyLayer, UndefinedOptionFlag, MagickFalse },
1247     { "CompareClear", CompareClearLayer, UndefinedOptionFlag, MagickFalse },
1248     { "CompareOverlay", CompareOverlayLayer, UndefinedOptionFlag, MagickFalse },
1249     { "Dispose", DisposeLayer, UndefinedOptionFlag, MagickFalse },
1250     { "Optimize", OptimizeLayer, UndefinedOptionFlag, MagickFalse },
1251     { "OptimizeFrame", OptimizeImageLayer, UndefinedOptionFlag, MagickFalse },
1252     { "OptimizePlus", OptimizePlusLayer, UndefinedOptionFlag, MagickFalse },
1253     { "OptimizeTransparency", OptimizeTransLayer, UndefinedOptionFlag, MagickFalse },
1254     { "RemoveDups", RemoveDupsLayer, UndefinedOptionFlag, MagickFalse },
1255     { "RemoveZero", RemoveZeroLayer, UndefinedOptionFlag, MagickFalse },
1256     { "Composite", CompositeLayer, UndefinedOptionFlag, MagickFalse },
1257     { "Merge", MergeLayer, UndefinedOptionFlag, MagickFalse },
1258     { "Flatten", FlattenLayer, UndefinedOptionFlag, MagickFalse },
1259     { "Mosaic", MosaicLayer, UndefinedOptionFlag, MagickFalse },
1260     { "TrimBounds", TrimBoundsLayer, UndefinedOptionFlag, MagickFalse },
1261     { (char *) NULL, UndefinedLayer, UndefinedOptionFlag, MagickFalse }
1262   },
1263   LineCapOptions[] =
1264   {
1265     { "Undefined", UndefinedCap, UndefinedOptionFlag, MagickTrue },
1266     { "Butt", ButtCap, UndefinedOptionFlag, MagickFalse },
1267     { "Round", RoundCap, UndefinedOptionFlag, MagickFalse },
1268     { "Square", SquareCap, UndefinedOptionFlag, MagickFalse },
1269     { (char *) NULL, UndefinedCap, UndefinedOptionFlag, MagickFalse }
1270   },
1271   LineJoinOptions[] =
1272   {
1273     { "Undefined", UndefinedJoin, UndefinedOptionFlag, MagickTrue },
1274     { "Bevel", BevelJoin, UndefinedOptionFlag, MagickFalse },
1275     { "Miter", MiterJoin, UndefinedOptionFlag, MagickFalse },
1276     { "Round", RoundJoin, UndefinedOptionFlag, MagickFalse },
1277     { (char *) NULL, UndefinedJoin, UndefinedOptionFlag, MagickFalse }
1278   },
1279   ListOptions[] =
1280   {
1281     { "Align", MagickAlignOptions, UndefinedOptionFlag, MagickFalse },
1282     { "Alpha", MagickAlphaChannelOptions, UndefinedOptionFlag, MagickFalse },
1283     { "Boolean", MagickBooleanOptions, UndefinedOptionFlag, MagickFalse },
1284     { "Cache", MagickCacheOptions, UndefinedOptionFlag, MagickFalse },
1285     { "Channel", MagickChannelOptions, UndefinedOptionFlag, MagickFalse },
1286     { "Class", MagickClassOptions, UndefinedOptionFlag, MagickFalse },
1287     { "ClipPath", MagickClipPathOptions, UndefinedOptionFlag, MagickFalse },
1288     { "Coder", MagickCoderOptions, UndefinedOptionFlag, MagickFalse },
1289     { "Color", MagickColorOptions, UndefinedOptionFlag, MagickFalse },
1290     { "Colorspace", MagickColorspaceOptions, UndefinedOptionFlag, MagickFalse },
1291     { "Command", MagickCommandOptions, UndefinedOptionFlag, MagickFalse },
1292     { "Compliance", MagickComplianceOptions, UndefinedOptionFlag, MagickFalse },
1293     { "Complex", MagickComplexOptions, UndefinedOptionFlag, MagickFalse },
1294     { "Compose", MagickComposeOptions, UndefinedOptionFlag, MagickFalse },
1295     { "Compress", MagickCompressOptions, UndefinedOptionFlag, MagickFalse },
1296     { "Configure", MagickConfigureOptions, UndefinedOptionFlag, MagickFalse },
1297     { "DataType", MagickDataTypeOptions, UndefinedOptionFlag, MagickFalse },
1298     { "Debug", MagickDebugOptions, UndefinedOptionFlag, MagickFalse },
1299     { "Decoration", MagickDecorateOptions, UndefinedOptionFlag, MagickFalse },
1300     { "Delegate", MagickDelegateOptions, UndefinedOptionFlag, MagickFalse },
1301     { "Direction", MagickDirectionOptions, UndefinedOptionFlag, MagickFalse },
1302     { "Dispose", MagickDisposeOptions, UndefinedOptionFlag, MagickFalse },
1303     { "Distort", MagickDistortOptions, UndefinedOptionFlag, MagickFalse },
1304     { "Dither", MagickDitherOptions, UndefinedOptionFlag, MagickFalse },
1305     { "Endian", MagickEndianOptions, UndefinedOptionFlag, MagickFalse },
1306     { "Evaluate", MagickEvaluateOptions, UndefinedOptionFlag, MagickFalse },
1307     { "FillRule", MagickFillRuleOptions, UndefinedOptionFlag, MagickFalse },
1308     { "Filter", MagickFilterOptions, UndefinedOptionFlag, MagickFalse },
1309     { "Font", MagickFontOptions, UndefinedOptionFlag, MagickFalse },
1310     { "Format", MagickFormatOptions, UndefinedOptionFlag, MagickFalse },
1311     { "Function", MagickFunctionOptions, UndefinedOptionFlag, MagickFalse },
1312     { "Gradient", MagickGradientOptions, UndefinedOptionFlag, MagickFalse },
1313     { "Gravity", MagickGravityOptions, UndefinedOptionFlag, MagickFalse },
1314     { "Intensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
1315     { "Intent", MagickIntentOptions, UndefinedOptionFlag, MagickFalse },
1316     { "Interlace", MagickInterlaceOptions, UndefinedOptionFlag, MagickFalse },
1317     { "Interpolate", MagickInterpolateOptions, UndefinedOptionFlag, MagickFalse },
1318     { "Kernel", MagickKernelOptions, UndefinedOptionFlag, MagickFalse },
1319     { "Layers", MagickLayerOptions, UndefinedOptionFlag, MagickFalse },
1320     { "LineCap", MagickLineCapOptions, UndefinedOptionFlag, MagickFalse },
1321     { "LineJoin", MagickLineJoinOptions, UndefinedOptionFlag, MagickFalse },
1322     { "List", MagickListOptions, UndefinedOptionFlag, MagickFalse },
1323     { "Locale", MagickLocaleOptions, UndefinedOptionFlag, MagickFalse },
1324     { "LogEvent", MagickLogEventOptions, UndefinedOptionFlag, MagickFalse },
1325     { "Log", MagickLogOptions, UndefinedOptionFlag, MagickFalse },
1326     { "Magic", MagickMagicOptions, UndefinedOptionFlag, MagickFalse },
1327     { "Method", MagickMethodOptions, UndefinedOptionFlag, MagickFalse },
1328     { "Metric", MagickMetricOptions, UndefinedOptionFlag, MagickFalse },
1329     { "Mime", MagickMimeOptions, UndefinedOptionFlag, MagickFalse },
1330     { "Mode", MagickModeOptions, UndefinedOptionFlag, MagickFalse },
1331     { "Morphology", MagickMorphologyOptions, UndefinedOptionFlag, MagickFalse },
1332     { "Module", MagickModuleOptions, UndefinedOptionFlag, MagickFalse },
1333     { "Noise", MagickNoiseOptions, UndefinedOptionFlag, MagickFalse },
1334     { "Orientation", MagickOrientationOptions, UndefinedOptionFlag, MagickFalse },
1335     { "PixelChannel", MagickPixelChannelOptions, UndefinedOptionFlag, MagickFalse },
1336     { "PixelIntensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
1337     { "PixelMask", MagickPixelMaskOptions, UndefinedOptionFlag, MagickFalse },
1338     { "PixelTrait", MagickPixelTraitOptions, UndefinedOptionFlag, MagickFalse },
1339     { "Policy", MagickPolicyOptions, UndefinedOptionFlag, MagickFalse },
1340     { "PolicyDomain", MagickPolicyDomainOptions, UndefinedOptionFlag, MagickFalse },
1341     { "PolicyRights", MagickPolicyRightsOptions, UndefinedOptionFlag, MagickFalse },
1342     { "Preview", MagickPreviewOptions, UndefinedOptionFlag, MagickFalse },
1343     { "Primitive", MagickPrimitiveOptions, UndefinedOptionFlag, MagickFalse },
1344     { "QuantumFormat", MagickQuantumFormatOptions, UndefinedOptionFlag, MagickFalse },
1345     { "Resource", MagickResourceOptions, UndefinedOptionFlag, MagickFalse },
1346     { "SparseColor", MagickSparseColorOptions, UndefinedOptionFlag, MagickFalse },
1347     { "Statistic", MagickStatisticOptions, UndefinedOptionFlag, MagickFalse },
1348     { "Storage", MagickStorageOptions, UndefinedOptionFlag, MagickFalse },
1349     { "Stretch", MagickStretchOptions, UndefinedOptionFlag, MagickFalse },
1350     { "Style", MagickStyleOptions, UndefinedOptionFlag, MagickFalse },
1351     { "Threshold", MagickThresholdOptions, UndefinedOptionFlag, MagickFalse },
1352     { "Type", MagickTypeOptions, UndefinedOptionFlag, MagickFalse },
1353     { "Units", MagickResolutionOptions, UndefinedOptionFlag, MagickFalse },
1354     { "Undefined", MagickUndefinedOptions, UndefinedOptionFlag, MagickTrue },
1355     { "Validate", MagickValidateOptions, UndefinedOptionFlag, MagickFalse },
1356     { "VirtualPixel", MagickVirtualPixelOptions, UndefinedOptionFlag, MagickFalse },
1357     { "Weight", MagickWeightOptions, UndefinedOptionFlag, MagickFalse },
1358     { (char *) NULL, MagickUndefinedOptions, UndefinedOptionFlag, MagickFalse }
1359   },
1360   LogEventOptions[] =
1361   {
1362     { "Undefined", UndefinedEvents, UndefinedOptionFlag, MagickTrue },
1363     { "All", (AllEvents &~ TraceEvent), UndefinedOptionFlag, MagickFalse },
1364     { "Accelerate", AccelerateEvent, UndefinedOptionFlag, MagickFalse },
1365     { "Annotate", AnnotateEvent, UndefinedOptionFlag, MagickFalse },
1366     { "Blob", BlobEvent, UndefinedOptionFlag, MagickFalse },
1367     { "Cache", CacheEvent, UndefinedOptionFlag, MagickFalse },
1368     { "Coder", CoderEvent, UndefinedOptionFlag, MagickFalse },
1369     { "Command", CommandEvent, UndefinedOptionFlag, MagickFalse },
1370     { "Configure", ConfigureEvent, UndefinedOptionFlag, MagickFalse },
1371     { "Deprecate", DeprecateEvent, UndefinedOptionFlag, MagickFalse },
1372     { "Draw", DrawEvent, UndefinedOptionFlag, MagickFalse },
1373     { "Exception", ExceptionEvent, UndefinedOptionFlag, MagickFalse },
1374     { "Locale", LocaleEvent, UndefinedOptionFlag, MagickFalse },
1375     { "Module", ModuleEvent, UndefinedOptionFlag, MagickFalse },
1376     { "None", NoEvents, UndefinedOptionFlag, MagickFalse },
1377     { "Pixel", PixelEvent, UndefinedOptionFlag, MagickFalse },
1378     { "Policy", PolicyEvent, UndefinedOptionFlag, MagickFalse },
1379     { "Resource", ResourceEvent, UndefinedOptionFlag, MagickFalse },
1380     { "Trace", TraceEvent, UndefinedOptionFlag, MagickFalse },
1381     { "Transform", TransformEvent, UndefinedOptionFlag, MagickFalse },
1382     { "User", UserEvent, UndefinedOptionFlag, MagickFalse },
1383     { "Wand", WandEvent, UndefinedOptionFlag, MagickFalse },
1384     { "X11", X11Event, UndefinedOptionFlag, MagickFalse },
1385     { (char *) NULL, UndefinedEvents, UndefinedOptionFlag, MagickFalse }
1386   },
1387   MetricOptions[] =
1388   {
1389     { "Undefined", UndefinedErrorMetric, UndefinedOptionFlag, MagickTrue },
1390     { "AE", AbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1391     { "Fuzz", FuzzErrorMetric, UndefinedOptionFlag, MagickFalse },
1392     { "MAE", MeanAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1393     { "MEPP", MeanErrorPerPixelErrorMetric, UndefinedOptionFlag, MagickFalse },
1394     { "MSE", MeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1395     { "NCC", NormalizedCrossCorrelationErrorMetric, UndefinedOptionFlag, MagickFalse },
1396     { "PAE", PeakAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1397     { "PHASh", PerceptualHashErrorMetric, UndefinedOptionFlag, MagickFalse },
1398     { "PSNR", PeakSignalToNoiseRatioErrorMetric, UndefinedOptionFlag, MagickFalse },
1399     { "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1400     { (char *) NULL, UndefinedErrorMetric, UndefinedOptionFlag, MagickFalse }
1401   },
1402   MethodOptions[] =
1403   {
1404     { "Undefined", UndefinedMethod, UndefinedOptionFlag, MagickTrue },
1405     { "FillToBorder", FillToBorderMethod, UndefinedOptionFlag, MagickFalse },
1406     { "Floodfill", FloodfillMethod, UndefinedOptionFlag, MagickFalse },
1407     { "Point", PointMethod, UndefinedOptionFlag, MagickFalse },
1408     { "Replace", ReplaceMethod, UndefinedOptionFlag, MagickFalse },
1409     { "Reset", ResetMethod, UndefinedOptionFlag, MagickFalse },
1410     { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1411   },
1412   ModeOptions[] =
1413   {
1414     { "Undefined", UndefinedMode, UndefinedOptionFlag, MagickTrue },
1415     { "Concatenate", ConcatenateMode, UndefinedOptionFlag, MagickFalse },
1416     { "Frame", FrameMode, UndefinedOptionFlag, MagickFalse },
1417     { "Unframe", UnframeMode, UndefinedOptionFlag, MagickFalse },
1418     { (char *) NULL, UndefinedMode, UndefinedOptionFlag, MagickFalse }
1419   },
1420   MorphologyOptions[] =
1421   {
1422     { "Undefined", UndefinedMorphology, UndefinedOptionFlag, MagickTrue },
1423     { "Correlate", CorrelateMorphology, UndefinedOptionFlag, MagickFalse },
1424     { "Convolve", ConvolveMorphology, UndefinedOptionFlag, MagickFalse },
1425     { "Dilate", DilateMorphology, UndefinedOptionFlag, MagickFalse },
1426     { "Erode", ErodeMorphology, UndefinedOptionFlag, MagickFalse },
1427     { "Close", CloseMorphology, UndefinedOptionFlag, MagickFalse },
1428     { "Open", OpenMorphology, UndefinedOptionFlag, MagickFalse },
1429     { "DilateIntensity", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1430     { "ErodeIntensity", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1431     { "CloseIntensity", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1432     { "OpenIntensity", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1433     { "DilateI", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1434     { "ErodeI", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1435     { "CloseI", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1436     { "OpenI", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1437     { "Smooth", SmoothMorphology, UndefinedOptionFlag, MagickFalse },
1438     { "EdgeOut", EdgeOutMorphology, UndefinedOptionFlag, MagickFalse },
1439     { "EdgeIn", EdgeInMorphology, UndefinedOptionFlag, MagickFalse },
1440     { "Edge", EdgeMorphology, UndefinedOptionFlag, MagickFalse },
1441     { "TopHat", TopHatMorphology, UndefinedOptionFlag, MagickFalse },
1442     { "BottomHat", BottomHatMorphology, UndefinedOptionFlag, MagickFalse },
1443     { "Hmt", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1444     { "HitNMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1445     { "HitAndMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1446     { "Thinning", ThinningMorphology, UndefinedOptionFlag, MagickFalse },
1447     { "Thicken", ThickenMorphology, UndefinedOptionFlag, MagickFalse },
1448     { "Distance", DistanceMorphology, UndefinedOptionFlag, MagickFalse },
1449     { "IterativeDistance", IterativeDistanceMorphology, UndefinedOptionFlag, MagickFalse },
1450     { "Voronoi", VoronoiMorphology, UndefinedOptionFlag, MagickTrue },
1451     { (char *) NULL, UndefinedMorphology, UndefinedOptionFlag, MagickFalse }
1452   },
1453   NoiseOptions[] =
1454   {
1455     { "Undefined", UndefinedNoise, UndefinedOptionFlag, MagickTrue },
1456     { "Gaussian", GaussianNoise, UndefinedOptionFlag, MagickFalse },
1457     { "Impulse", ImpulseNoise, UndefinedOptionFlag, MagickFalse },
1458     { "Laplacian", LaplacianNoise, UndefinedOptionFlag, MagickFalse },
1459     { "Multiplicative", MultiplicativeGaussianNoise, UndefinedOptionFlag, MagickFalse },
1460     { "Poisson", PoissonNoise, UndefinedOptionFlag, MagickFalse },
1461     { "Random", RandomNoise, UndefinedOptionFlag, MagickFalse },
1462     { "Uniform", UniformNoise, UndefinedOptionFlag, MagickFalse },
1463     { (char *) NULL, UndefinedNoise, UndefinedOptionFlag, MagickFalse }
1464   },
1465   OrientationOptions[] =
1466   {
1467     { "Undefined", UndefinedOrientation, UndefinedOptionFlag, MagickTrue },
1468     { "TopLeft", TopLeftOrientation, UndefinedOptionFlag, MagickFalse },
1469     { "TopRight", TopRightOrientation, UndefinedOptionFlag, MagickFalse },
1470     { "BottomRight", BottomRightOrientation, UndefinedOptionFlag, MagickFalse },
1471     { "BottomLeft", BottomLeftOrientation, UndefinedOptionFlag, MagickFalse },
1472     { "LeftTop", LeftTopOrientation, UndefinedOptionFlag, MagickFalse },
1473     { "RightTop", RightTopOrientation, UndefinedOptionFlag, MagickFalse },
1474     { "RightBottom", RightBottomOrientation, UndefinedOptionFlag, MagickFalse },
1475     { "LeftBottom", LeftBottomOrientation, UndefinedOptionFlag, MagickFalse },
1476     { (char *) NULL, UndefinedOrientation, UndefinedOptionFlag, MagickFalse }
1477   },
1478   PixelChannelOptions[] =
1479   {
1480     { "Undefined", UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse },
1481     { "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
1482     { "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
1483     { "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1484     { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1485     { "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1486     { "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1487     { "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
1488     { "Composite", CompositePixelChannel, UndefinedOptionFlag, MagickFalse },
1489     { "C", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1490     { "Cr", CrPixelChannel, UndefinedOptionFlag, MagickFalse },
1491     { "Cyan", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1492     { "Gray", GrayPixelChannel, UndefinedOptionFlag, MagickFalse },
1493     { "G", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1494     { "Green", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1495     { "Index", IndexPixelChannel, UndefinedOptionFlag, MagickFalse },
1496     { "Intensity", IntensityPixelChannel, UndefinedOptionFlag, MagickFalse },
1497     { "K", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1498     { "M", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
1499     { "Magenta", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
1500     { "R", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1501     { "ReadMask", ReadMaskPixelChannel, UndefinedOptionFlag, MagickFalse },
1502     { "Red", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1503     { "Sync", SyncPixelChannel, UndefinedOptionFlag, MagickFalse },
1504     { "WriteMask", WriteMaskPixelChannel, UndefinedOptionFlag, MagickFalse },
1505     { "Y", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1506     { "Yellow", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1507     { (char *) NULL, UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse }
1508   },
1509   PixelIntensityOptions[] =
1510   {
1511     { "Undefined", UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1512     { "Average", AveragePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1513     { "Brightness", BrightnessPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1514     { "Lightness", LightnessPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1515     { "Mean", AveragePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1516     { "MS", MSPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1517     { "Rec601Luma", Rec601LumaPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1518     { "Rec601Luminance", Rec601LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1519     { "Rec709Luma", Rec709LumaPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1520     { "Rec709Luminance", Rec709LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1521     { "RMS", RMSPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1522     { (char *) NULL, UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickFalse }
1523   },
1524   PixelMaskOptions[] =
1525   {
1526     { "Undefined", UndefinedPixelMask, UndefinedOptionFlag, MagickTrue },
1527     { "R", ReadPixelMask, UndefinedOptionFlag, MagickFalse },
1528     { "Read", ReadPixelMask, UndefinedOptionFlag, MagickFalse },
1529     { "W", WritePixelMask, UndefinedOptionFlag, MagickFalse },
1530     { "Write", WritePixelMask, UndefinedOptionFlag, MagickFalse },
1531     { (char *) NULL, UndefinedPixelMask, UndefinedOptionFlag, MagickFalse }
1532   },
1533   PixelTraitOptions[] =
1534   {
1535     { "Undefined", UndefinedPixelTrait, UndefinedOptionFlag, MagickTrue },
1536     { "Blend", BlendPixelTrait, UndefinedOptionFlag, MagickFalse },
1537     { "Copy", CopyPixelTrait, UndefinedOptionFlag, MagickFalse },
1538     { "Update", UpdatePixelTrait, UndefinedOptionFlag, MagickFalse },
1539     { (char *) NULL, UndefinedPixelTrait, UndefinedOptionFlag, MagickFalse }
1540   },
1541   PolicyDomainOptions[] =
1542   {
1543     { "Undefined", UndefinedPolicyDomain, UndefinedOptionFlag, MagickTrue },
1544     { "Coder", CoderPolicyDomain, UndefinedOptionFlag, MagickFalse },
1545     { "Delegate", DelegatePolicyDomain, UndefinedOptionFlag, MagickFalse },
1546     { "Filter", FilterPolicyDomain, UndefinedOptionFlag, MagickFalse },
1547     { "Path", PathPolicyDomain, UndefinedOptionFlag, MagickFalse },
1548     { "Resource", ResourcePolicyDomain, UndefinedOptionFlag, MagickFalse },
1549     { "System", SystemPolicyDomain, UndefinedOptionFlag, MagickFalse },
1550     { (char *) NULL, UndefinedPolicyDomain, UndefinedOptionFlag, MagickFalse }
1551   },
1552   PolicyRightsOptions[] =
1553   {
1554     { "Undefined", UndefinedPolicyRights, UndefinedOptionFlag, MagickTrue },
1555     { "None", NoPolicyRights, UndefinedOptionFlag, MagickFalse },
1556     { "Read", ReadPolicyRights, UndefinedOptionFlag, MagickFalse },
1557     { "Write", WritePolicyRights, UndefinedOptionFlag, MagickFalse },
1558     { "Execute", ExecutePolicyRights, UndefinedOptionFlag, MagickFalse },
1559     { (char *) NULL, UndefinedPolicyRights, UndefinedOptionFlag, MagickFalse }
1560   },
1561   PreviewOptions[] =
1562   {
1563     { "Undefined", UndefinedPreview, UndefinedOptionFlag, MagickTrue },
1564     { "AddNoise", AddNoisePreview, UndefinedOptionFlag, MagickFalse },
1565     { "Blur", BlurPreview, UndefinedOptionFlag, MagickFalse },
1566     { "Brightness", BrightnessPreview, UndefinedOptionFlag, MagickFalse },
1567     { "Charcoal", CharcoalDrawingPreview, UndefinedOptionFlag, MagickFalse },
1568     { "Despeckle", DespecklePreview, UndefinedOptionFlag, MagickFalse },
1569     { "Dull", DullPreview, UndefinedOptionFlag, MagickFalse },
1570     { "EdgeDetect", EdgeDetectPreview, UndefinedOptionFlag, MagickFalse },
1571     { "Gamma", GammaPreview, UndefinedOptionFlag, MagickFalse },
1572     { "Grayscale", GrayscalePreview, UndefinedOptionFlag, MagickFalse },
1573     { "Hue", HuePreview, UndefinedOptionFlag, MagickFalse },
1574     { "Implode", ImplodePreview, UndefinedOptionFlag, MagickFalse },
1575     { "JPEG", JPEGPreview, UndefinedOptionFlag, MagickFalse },
1576     { "OilPaint", OilPaintPreview, UndefinedOptionFlag, MagickFalse },
1577     { "Quantize", QuantizePreview, UndefinedOptionFlag, MagickFalse },
1578     { "Raise", RaisePreview, UndefinedOptionFlag, MagickFalse },
1579     { "ReduceNoise", ReduceNoisePreview, UndefinedOptionFlag, MagickFalse },
1580     { "Roll", RollPreview, UndefinedOptionFlag, MagickFalse },
1581     { "Rotate", RotatePreview, UndefinedOptionFlag, MagickFalse },
1582     { "Saturation", SaturationPreview, UndefinedOptionFlag, MagickFalse },
1583     { "Segment", SegmentPreview, UndefinedOptionFlag, MagickFalse },
1584     { "Shade", ShadePreview, UndefinedOptionFlag, MagickFalse },
1585     { "Sharpen", SharpenPreview, UndefinedOptionFlag, MagickFalse },
1586     { "Shear", ShearPreview, UndefinedOptionFlag, MagickFalse },
1587     { "Solarize", SolarizePreview, UndefinedOptionFlag, MagickFalse },
1588     { "Spiff", SpiffPreview, UndefinedOptionFlag, MagickFalse },
1589     { "Spread", SpreadPreview, UndefinedOptionFlag, MagickFalse },
1590     { "Swirl", SwirlPreview, UndefinedOptionFlag, MagickFalse },
1591     { "Threshold", ThresholdPreview, UndefinedOptionFlag, MagickFalse },
1592     { "Wave", WavePreview, UndefinedOptionFlag, MagickFalse },
1593     { (char *) NULL, UndefinedPreview, UndefinedOptionFlag, MagickFalse }
1594   },
1595   PrimitiveOptions[] =
1596   {
1597     { "Undefined", UndefinedPrimitive, UndefinedOptionFlag, MagickTrue },
1598     { "Alpha", AlphaPrimitive, UndefinedOptionFlag, MagickFalse },
1599     { "Arc", ArcPrimitive, UndefinedOptionFlag, MagickFalse },
1600     { "Bezier", BezierPrimitive, UndefinedOptionFlag, MagickFalse },
1601     { "Circle", CirclePrimitive, UndefinedOptionFlag, MagickFalse },
1602     { "Color", ColorPrimitive, UndefinedOptionFlag, MagickFalse },
1603     { "Ellipse", EllipsePrimitive, UndefinedOptionFlag, MagickFalse },
1604     { "Image", ImagePrimitive, UndefinedOptionFlag, MagickFalse },
1605     { "Line", LinePrimitive, UndefinedOptionFlag, MagickFalse },
1606     { "Matte", AlphaPrimitive, UndefinedOptionFlag, MagickFalse },
1607     { "Path", PathPrimitive, UndefinedOptionFlag, MagickFalse },
1608     { "Point", PointPrimitive, UndefinedOptionFlag, MagickFalse },
1609     { "Polygon", PolygonPrimitive, UndefinedOptionFlag, MagickFalse },
1610     { "Polyline", PolylinePrimitive, UndefinedOptionFlag, MagickFalse },
1611     { "Rectangle", RectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1612     { "RoundRectangle", RoundRectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1613     { "Text", TextPrimitive, UndefinedOptionFlag, MagickFalse },
1614     { (char *) NULL, UndefinedPrimitive, UndefinedOptionFlag, MagickFalse }
1615   },
1616   QuantumFormatOptions[] =
1617   {
1618     { "Undefined", UndefinedQuantumFormat, UndefinedOptionFlag, MagickTrue },
1619     { "FloatingPoint", FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse },
1620     { "Signed", SignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1621     { "Unsigned", UnsignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1622     { (char *) NULL, FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse }
1623   },
1624   ResolutionOptions[] =
1625   {
1626     { "Undefined", UndefinedResolution, UndefinedOptionFlag, MagickTrue },
1627     { "PixelsPerInch", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
1628     { "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
1629     { (char *) NULL, UndefinedResolution, UndefinedOptionFlag, MagickFalse }
1630   },
1631   ResourceOptions[] =
1632   {
1633     { "Undefined", UndefinedResource, UndefinedOptionFlag, MagickTrue },
1634     { "Area", AreaResource, UndefinedOptionFlag, MagickFalse },
1635     { "Disk", DiskResource, UndefinedOptionFlag, MagickFalse },
1636     { "File", FileResource, UndefinedOptionFlag, MagickFalse },
1637     { "Height", HeightResource, UndefinedOptionFlag, MagickFalse },
1638     { "Map", MapResource, UndefinedOptionFlag, MagickFalse },
1639     { "Memory", MemoryResource, UndefinedOptionFlag, MagickFalse },
1640     { "Thread", ThreadResource, UndefinedOptionFlag, MagickFalse },
1641     { "Time", TimeResource, UndefinedOptionFlag, MagickFalse },
1642     { "Width", WidthResource, UndefinedOptionFlag, MagickFalse },
1643     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1644   },
1645   SparseColorOptions[] =
1646   {
1647     { "Undefined", UndefinedDistortion, UndefinedOptionFlag, MagickTrue },
1648     { "Barycentric", BarycentricColorInterpolate, UndefinedOptionFlag, MagickFalse },
1649     { "Bilinear", BilinearColorInterpolate, UndefinedOptionFlag, MagickFalse },
1650     { "Inverse", InverseColorInterpolate, UndefinedOptionFlag, MagickFalse },
1651     { "Shepards", ShepardsColorInterpolate, UndefinedOptionFlag, MagickFalse },
1652     { "Voronoi", VoronoiColorInterpolate, UndefinedOptionFlag, MagickFalse },
1653     { "Manhattan", ManhattanColorInterpolate, UndefinedOptionFlag, MagickFalse },
1654     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1655   },
1656   StatisticOptions[] =
1657   {
1658     { "Undefined", UndefinedStatistic, UndefinedOptionFlag, MagickTrue },
1659     { "Gradient", GradientStatistic, UndefinedOptionFlag, MagickFalse },
1660     { "Maximum", MaximumStatistic, UndefinedOptionFlag, MagickFalse },
1661     { "Mean", MeanStatistic, UndefinedOptionFlag, MagickFalse },
1662     { "Median", MedianStatistic, UndefinedOptionFlag, MagickFalse },
1663     { "Minimum", MinimumStatistic, UndefinedOptionFlag, MagickFalse },
1664     { "Mode", ModeStatistic, UndefinedOptionFlag, MagickFalse },
1665     { "NonPeak", NonpeakStatistic, UndefinedOptionFlag, MagickFalse },
1666     { "RootMeanSquare", RootMeanSquareStatistic, UndefinedOptionFlag, MagickFalse },
1667     { "RMS", RootMeanSquareStatistic, UndefinedOptionFlag, MagickFalse },
1668     { "StandardDeviation", StandardDeviationStatistic, UndefinedOptionFlag, MagickFalse },
1669     { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1670   },
1671   StorageOptions[] =
1672   {
1673     { "Undefined", UndefinedPixel, UndefinedOptionFlag, MagickTrue },
1674     { "Char", CharPixel, UndefinedOptionFlag, MagickFalse },
1675     { "Double", DoublePixel, UndefinedOptionFlag, MagickFalse },
1676     { "Float", FloatPixel, UndefinedOptionFlag, MagickFalse },
1677     { "Long", LongPixel, UndefinedOptionFlag, MagickFalse },
1678     { "LongLong", LongLongPixel, UndefinedOptionFlag, MagickFalse },
1679     { "Quantum", QuantumPixel, UndefinedOptionFlag, MagickFalse },
1680     { "Short", ShortPixel, UndefinedOptionFlag, MagickFalse },
1681     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1682   },
1683   StretchOptions[] =
1684   {
1685     { "Undefined", UndefinedStretch, UndefinedOptionFlag, MagickTrue },
1686     { "Any", AnyStretch, UndefinedOptionFlag, MagickFalse },
1687     { "Condensed", CondensedStretch, UndefinedOptionFlag, MagickFalse },
1688     { "Expanded", ExpandedStretch, UndefinedOptionFlag, MagickFalse },
1689     { "ExtraCondensed", ExtraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1690     { "ExtraExpanded", ExtraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1691     { "Normal", NormalStretch, UndefinedOptionFlag, MagickFalse },
1692     { "SemiCondensed", SemiCondensedStretch, UndefinedOptionFlag, MagickFalse },
1693     { "SemiExpanded", SemiExpandedStretch, UndefinedOptionFlag, MagickFalse },
1694     { "UltraCondensed", UltraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1695     { "UltraExpanded", UltraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1696     { (char *) NULL, UndefinedStretch, UndefinedOptionFlag, MagickFalse }
1697   },
1698   StyleOptions[] =
1699   {
1700     { "Undefined", UndefinedStyle, UndefinedOptionFlag, MagickTrue },
1701     { "Any", AnyStyle, UndefinedOptionFlag, MagickFalse },
1702     { "Italic", ItalicStyle, UndefinedOptionFlag, MagickFalse },
1703     { "Normal", NormalStyle, UndefinedOptionFlag, MagickFalse },
1704     { "Oblique", ObliqueStyle, UndefinedOptionFlag, MagickFalse },
1705     { (char *) NULL, UndefinedStyle, UndefinedOptionFlag, MagickFalse }
1706   },
1707   TypeOptions[] =
1708   {
1709     { "Undefined", UndefinedType, UndefinedOptionFlag, MagickTrue },
1710     { "Bilevel", BilevelType, UndefinedOptionFlag, MagickFalse },
1711     { "ColorSeparation", ColorSeparationType, UndefinedOptionFlag, MagickFalse },
1712     { "ColorSeparationAlpha", ColorSeparationAlphaType, UndefinedOptionFlag, MagickFalse },
1713     { "ColorSeparationMatte", ColorSeparationAlphaType, UndefinedOptionFlag, MagickFalse },
1714     { "Grayscale", GrayscaleType, UndefinedOptionFlag, MagickFalse },
1715     { "GrayscaleAlpha", GrayscaleAlphaType, UndefinedOptionFlag, MagickFalse },
1716     { "GrayscaleMatte", GrayscaleAlphaType, UndefinedOptionFlag, MagickFalse },
1717     { "Optimize", OptimizeType, UndefinedOptionFlag, MagickFalse },
1718     { "Palette", PaletteType, UndefinedOptionFlag, MagickFalse },
1719     { "PaletteBilevelAlpha", PaletteBilevelAlphaType, UndefinedOptionFlag, MagickFalse },
1720     { "PaletteBilevelMatte", PaletteBilevelAlphaType, UndefinedOptionFlag, MagickFalse },
1721     { "PaletteAlpha", PaletteAlphaType, UndefinedOptionFlag, MagickFalse },
1722     { "PaletteMatte", PaletteAlphaType, UndefinedOptionFlag, MagickFalse },
1723     { "TrueColorAlpha", TrueColorAlphaType, UndefinedOptionFlag, MagickFalse },
1724     { "TrueColorMatte", TrueColorAlphaType, UndefinedOptionFlag, MagickFalse },
1725     { "TrueColor", TrueColorType, UndefinedOptionFlag, MagickFalse },
1726     { (char *) NULL, UndefinedType, UndefinedOptionFlag, MagickFalse }
1727   },
1728   ValidateOptions[] =
1729   {
1730     { "Undefined", UndefinedValidate, UndefinedOptionFlag, MagickTrue },
1731     { "All", AllValidate, UndefinedOptionFlag, MagickFalse },
1732     { "Colorspace", ColorspaceValidate, UndefinedOptionFlag, MagickFalse },
1733     { "Compare", CompareValidate, UndefinedOptionFlag, MagickFalse },
1734     { "Composite", CompositeValidate, UndefinedOptionFlag, MagickFalse },
1735     { "Convert", ConvertValidate, UndefinedOptionFlag, MagickFalse },
1736     { "FormatsDisk", FormatsDiskValidate, UndefinedOptionFlag, MagickFalse },
1737     { "FormatsMap", FormatsMapValidate, UndefinedOptionFlag, MagickFalse },
1738     { "FormatsMemory", FormatsMemoryValidate, UndefinedOptionFlag, MagickFalse },
1739     { "Identify", IdentifyValidate, UndefinedOptionFlag, MagickFalse },
1740     { "ImportExport", ImportExportValidate, UndefinedOptionFlag, MagickFalse },
1741     { "Montage", MontageValidate, UndefinedOptionFlag, MagickFalse },
1742     { "Stream", StreamValidate, UndefinedOptionFlag, MagickFalse },
1743     { "None", NoValidate, UndefinedOptionFlag, MagickFalse },
1744     { (char *) NULL, UndefinedValidate, UndefinedOptionFlag, MagickFalse }
1745   },
1746   VirtualPixelOptions[] =
1747   {
1748     { "Undefined", UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickTrue },
1749     { "Background", BackgroundVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1750     { "Black", BlackVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1751     { "Constant", BackgroundVirtualPixelMethod, DeprecateOptionFlag, MagickTrue },
1752     { "CheckerTile", CheckerTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1753     { "Dither", DitherVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1754     { "Edge", EdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1755     { "Gray", GrayVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1756     { "HorizontalTile", HorizontalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1757     { "HorizontalTileEdge", HorizontalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1758     { "Mirror", MirrorVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1759     { "None", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1760     { "Random", RandomVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1761     { "Tile", TileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1762     { "Transparent", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1763     { "VerticalTile", VerticalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1764     { "VerticalTileEdge", VerticalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1765     { "White", WhiteVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1766     { (char *) NULL, UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickFalse }
1767   },
1768   WeightOptions[] =
1769   {
1770     { "Undefined", 0L, UndefinedOptionFlag, MagickTrue },
1771     { "Thin", 100L, UndefinedOptionFlag, MagickFalse },
1772     { "ExtraLight", 200L, UndefinedOptionFlag, MagickFalse },
1773     { "UltraLight", 200L, UndefinedOptionFlag, MagickFalse },
1774     { "Light", 300L, DeprecateOptionFlag, MagickTrue },
1775     { "Normal", 400L, UndefinedOptionFlag, MagickFalse },
1776     { "Regular", 400L, UndefinedOptionFlag, MagickFalse },
1777     { "Medium", 500L, UndefinedOptionFlag, MagickFalse },
1778     { "DemiBold", 600L, UndefinedOptionFlag, MagickFalse },
1779     { "SemiBold", 600L, UndefinedOptionFlag, MagickFalse },
1780     { "Bold", 700L, UndefinedOptionFlag, MagickFalse },
1781     { "ExtraBold", 800L, UndefinedOptionFlag, MagickFalse },
1782     { "UltraBold", 800L, UndefinedOptionFlag, MagickFalse },
1783     { "Heavy", 900L, UndefinedOptionFlag, MagickFalse },
1784     { "Black", 900L, UndefinedOptionFlag, MagickFalse },
1785     { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
1786   };
1787 \f
1788 /*
1789 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1790 %                                                                             %
1791 %                                                                             %
1792 %                                                                             %
1793 %   C l o n e I m a g e O p t i o n s                                         %
1794 %                                                                             %
1795 %                                                                             %
1796 %                                                                             %
1797 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1798 %
1799 %  CloneImageOptions() clones all global image options, to another image_info
1800 %
1801 %  The format of the CloneImageOptions method is:
1802 %
1803 %      MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1804 %        const ImageInfo *clone_info)
1805 %
1806 %  A description of each parameter follows:
1807 %
1808 %    o image_info: the image info to recieve the cloned options.
1809 %
1810 %    o clone_info: the source image info for options to clone.
1811 %
1812 */
1813 MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1814   const ImageInfo *clone_info)
1815 {
1816   assert(image_info != (ImageInfo *) NULL);
1817   assert(image_info->signature == MagickCoreSignature);
1818   if (image_info->debug != MagickFalse)
1819     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1820       image_info->filename);
1821   assert(clone_info != (const ImageInfo *) NULL);
1822   assert(clone_info->signature == MagickCoreSignature);
1823   if (clone_info->options != (void *) NULL)
1824     {
1825       if (image_info->options != (void *) NULL)
1826         DestroyImageOptions(image_info);
1827       image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
1828         (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
1829     }
1830   return(MagickTrue);
1831 }
1832 \f
1833 /*
1834 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1835 %                                                                             %
1836 %                                                                             %
1837 %                                                                             %
1838 %   D e f i n e I m a g e O p t i o n                                         %
1839 %                                                                             %
1840 %                                                                             %
1841 %                                                                             %
1842 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1843 %
1844 %  DefineImageOption() associates an assignment string of the form
1845 %  "key=value" with a global image option. It is equivelent to
1846 %  SetImageOption().
1847 %
1848 %  The format of the DefineImageOption method is:
1849 %
1850 %      MagickBooleanType DefineImageOption(ImageInfo *image_info,
1851 %        const char *option)
1852 %
1853 %  A description of each parameter follows:
1854 %
1855 %    o image_info: the image info.
1856 %
1857 %    o option: the image option assignment string.
1858 %
1859 */
1860 MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
1861   const char *option)
1862 {
1863   char
1864     key[MagickPathExtent],
1865     value[MagickPathExtent];
1866
1867   register char
1868     *p;
1869
1870   assert(image_info != (ImageInfo *) NULL);
1871   assert(option != (const char *) NULL);
1872   (void) CopyMagickString(key,option,MagickPathExtent);
1873   for (p=key; *p != '\0'; p++)
1874     if (*p == '=')
1875       break;
1876   *value='\0';
1877   if (*p == '=')
1878     (void) CopyMagickString(value,p+1,MagickPathExtent);
1879   *p='\0';
1880   return(SetImageOption(image_info,key,value));
1881 }
1882 \f
1883 /*
1884 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1885 %                                                                             %
1886 %                                                                             %
1887 %                                                                             %
1888 %   D e l e t e I m a g e O p t i o n                                         %
1889 %                                                                             %
1890 %                                                                             %
1891 %                                                                             %
1892 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1893 %
1894 %  DeleteImageOption() deletes an key from the global image options.
1895 %
1896 %  Returns MagickTrue is the option is found and deleted from the Options.
1897 %
1898 %  The format of the DeleteImageOption method is:
1899 %
1900 %      MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1901 %        const char *key)
1902 %
1903 %  A description of each parameter follows:
1904 %
1905 %    o image_info: the image info.
1906 %
1907 %    o option: the image option.
1908 %
1909 */
1910 MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1911   const char *option)
1912 {
1913   assert(image_info != (ImageInfo *) NULL);
1914   assert(image_info->signature == MagickCoreSignature);
1915   if (image_info->debug != MagickFalse)
1916     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1917       image_info->filename);
1918   if (image_info->options == (void *) NULL)
1919     return(MagickFalse);
1920   return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
1921 }
1922 \f
1923 /*
1924 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1925 %                                                                             %
1926 %                                                                             %
1927 %                                                                             %
1928 %   D e s t r o y I m a g e O p t i o n s                                     %
1929 %                                                                             %
1930 %                                                                             %
1931 %                                                                             %
1932 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1933 %
1934 %  DestroyImageOptions() destroys all global options and associated memory
1935 %  attached to the given image_info image list.
1936 %
1937 %  The format of the DestroyDefines method is:
1938 %
1939 %      void DestroyImageOptions(ImageInfo *image_info)
1940 %
1941 %  A description of each parameter follows:
1942 %
1943 %    o image_info: the image info.
1944 %
1945 */
1946 MagickExport void DestroyImageOptions(ImageInfo *image_info)
1947 {
1948   assert(image_info != (ImageInfo *) NULL);
1949   assert(image_info->signature == MagickCoreSignature);
1950   if (image_info->debug != MagickFalse)
1951     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1952       image_info->filename);
1953   if (image_info->options != (void *) NULL)
1954     image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
1955 }
1956 \f
1957 /*
1958 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1959 %                                                                             %
1960 %                                                                             %
1961 %                                                                             %
1962 %   G e t I m a g e O p t i o n                                               %
1963 %                                                                             %
1964 %                                                                             %
1965 %                                                                             %
1966 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1967 %
1968 %  GetImageOption() gets a value associated with the global image options.
1969 %
1970 %  The returned string is a constant string in the tree and should NOT be
1971 %  freed by the caller.
1972 %
1973 %  The format of the GetImageOption method is:
1974 %
1975 %      const char *GetImageOption(const ImageInfo *image_info,
1976 %        const char *option)
1977 %
1978 %  A description of each parameter follows:
1979 %
1980 %    o image_info: the image info.
1981 %
1982 %    o option: the option.
1983 %
1984 */
1985 MagickExport const char *GetImageOption(const ImageInfo *image_info,
1986   const char *option)
1987 {
1988   assert(image_info != (ImageInfo *) NULL);
1989   assert(image_info->signature == MagickCoreSignature);
1990   if (image_info->debug != MagickFalse)
1991     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1992       image_info->filename);
1993   if (image_info->options == (void *) NULL)
1994     return((const char *) NULL);
1995   return((const char *) GetValueFromSplayTree((SplayTreeInfo *)
1996     image_info->options,option));
1997 }
1998 \f
1999 /*
2000 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2001 %                                                                             %
2002 %                                                                             %
2003 %                                                                             %
2004 %   G e t C o m m a n d O p t i o n F l a g s                                 %
2005 %                                                                             %
2006 %                                                                             %
2007 %                                                                             %
2008 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2009 %
2010 %  GetCommandOptionFlags() parses a string and returns an enumerated option
2011 %  flags(s).  Return a value of -1 if no such option is found.
2012 %
2013 %  The format of the GetCommandOptionFlags method is:
2014 %
2015 %      ssize_t GetCommandOptionFlags(const CommandOption option,
2016 %        const MagickBooleanType list,const char *options)
2017 %
2018 %  A description of each parameter follows:
2019 %
2020 %    o option: Index to the option table to lookup
2021 %
2022 %    o list: A option other than zero permits more than one option separated by
2023 %      a comma or pipe.
2024 %
2025 %    o options: One or more options separated by commas.
2026 %
2027 */
2028
2029 static const OptionInfo *GetOptionInfo(const CommandOption option)
2030 {
2031   switch (option)
2032   {
2033     case MagickAlignOptions: return(AlignOptions);
2034     case MagickAlphaChannelOptions: return(AlphaChannelOptions);
2035     case MagickBooleanOptions: return(BooleanOptions);
2036     case MagickCacheOptions: return(CacheOptions);
2037     case MagickChannelOptions: return(ChannelOptions);
2038     case MagickClassOptions: return(ClassOptions);
2039     case MagickClipPathOptions: return(ClipPathOptions);
2040     case MagickColorspaceOptions: return(ColorspaceOptions);
2041     case MagickCommandOptions: return(CommandOptions);
2042     case MagickComplianceOptions: return(ComplianceOptions);
2043     case MagickComplexOptions: return(ComplexOptions);
2044     case MagickComposeOptions: return(ComposeOptions);
2045     case MagickCompressOptions: return(CompressOptions);
2046     case MagickDataTypeOptions: return(DataTypeOptions);
2047     case MagickDebugOptions: return(LogEventOptions);
2048     case MagickDecorateOptions: return(DecorateOptions);
2049     case MagickDirectionOptions: return(DirectionOptions);
2050     case MagickDisposeOptions: return(DisposeOptions);
2051     case MagickDistortOptions: return(DistortOptions);
2052     case MagickDitherOptions: return(DitherOptions);
2053     case MagickEndianOptions: return(EndianOptions);
2054     case MagickEvaluateOptions: return(EvaluateOptions);
2055     case MagickFillRuleOptions: return(FillRuleOptions);
2056     case MagickFilterOptions: return(FilterOptions);
2057     case MagickFunctionOptions: return(FunctionOptions);
2058     case MagickGradientOptions: return(GradientOptions);
2059     case MagickGravityOptions: return(GravityOptions);
2060     case MagickIntentOptions: return(IntentOptions);
2061     case MagickInterlaceOptions: return(InterlaceOptions);
2062     case MagickInterpolateOptions: return(InterpolateOptions);
2063     case MagickKernelOptions: return(KernelOptions);
2064     case MagickLayerOptions: return(LayerOptions);
2065     case MagickLineCapOptions: return(LineCapOptions);
2066     case MagickLineJoinOptions: return(LineJoinOptions);
2067     case MagickListOptions: return(ListOptions);
2068     case MagickLogEventOptions: return(LogEventOptions);
2069     case MagickMetricOptions: return(MetricOptions);
2070     case MagickMethodOptions: return(MethodOptions);
2071     case MagickModeOptions: return(ModeOptions);
2072     case MagickMorphologyOptions: return(MorphologyOptions);
2073     case MagickNoiseOptions: return(NoiseOptions);
2074     case MagickOrientationOptions: return(OrientationOptions);
2075     case MagickPixelChannelOptions: return(PixelChannelOptions);
2076     case MagickPixelIntensityOptions: return(PixelIntensityOptions);
2077     case MagickPixelMaskOptions: return(PixelMaskOptions);
2078     case MagickPixelTraitOptions: return(PixelTraitOptions);
2079     case MagickPolicyDomainOptions: return(PolicyDomainOptions);
2080     case MagickPolicyRightsOptions: return(PolicyRightsOptions);
2081     case MagickPreviewOptions: return(PreviewOptions);
2082     case MagickPrimitiveOptions: return(PrimitiveOptions);
2083     case MagickQuantumFormatOptions: return(QuantumFormatOptions);
2084     case MagickResolutionOptions: return(ResolutionOptions);
2085     case MagickResourceOptions: return(ResourceOptions);
2086     case MagickSparseColorOptions: return(SparseColorOptions);
2087     case MagickStatisticOptions: return(StatisticOptions);
2088     case MagickStorageOptions: return(StorageOptions);
2089     case MagickStretchOptions: return(StretchOptions);
2090     case MagickStyleOptions: return(StyleOptions);
2091     case MagickTypeOptions: return(TypeOptions);
2092     case MagickValidateOptions: return(ValidateOptions);
2093     case MagickVirtualPixelOptions: return(VirtualPixelOptions);
2094     case MagickWeightOptions: return(WeightOptions);
2095     default: break;
2096   }
2097   return((const OptionInfo *) NULL);
2098 }
2099
2100 MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
2101   const MagickBooleanType list,const char *options)
2102 {
2103   char
2104     token[MagickPathExtent];
2105
2106   const OptionInfo
2107     *command_info,
2108     *option_info;
2109
2110   int
2111     sentinel;
2112
2113   MagickBooleanType
2114     negate;
2115
2116   register char
2117     *q;
2118
2119   register const char
2120     *p;
2121
2122   register ssize_t
2123     i;
2124
2125   ssize_t
2126     option_types;
2127
2128   option_info=GetOptionInfo(option);
2129   if (option_info == (const OptionInfo *) NULL)
2130     return(UndefinedOptionFlag);
2131   option_types=0;
2132   sentinel=',';
2133   if (strchr(options,'|') != (char *) NULL)
2134     sentinel='|';
2135   for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2136   {
2137     while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2138            (*p != '\0'))
2139       p++;
2140     negate=(*p == '!') ? MagickTrue : MagickFalse;
2141     if (negate != MagickFalse)
2142       p++;
2143     q=token;
2144     while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2145            (*p != '\0'))
2146     {
2147       if ((q-token) >= (MagickPathExtent-1))
2148         break;
2149       *q++=(*p++);
2150     }
2151     *q='\0';
2152     for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2153       if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2154         break;
2155     command_info=option_info+i;
2156     if ((command_info->mnemonic == (const char *) NULL) &&
2157         ((strchr(token+1,'-') != (char *) NULL) ||
2158          (strchr(token+1,'_') != (char *) NULL)))
2159       {
2160         while ((q=strchr(token+1,'-')) != (char *) NULL)
2161           (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2162         while ((q=strchr(token+1,'_')) != (char *) NULL)
2163           (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2164         for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2165           if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2166             break;
2167         command_info=option_info+i;
2168       }
2169     if (command_info->mnemonic == (const char *) NULL)
2170       return(-1);
2171     if (negate != MagickFalse)
2172       option_types=option_types &~ command_info->flags;
2173     else
2174       option_types=option_types | command_info->flags;
2175     if (list == MagickFalse)
2176       break;
2177   }
2178   return(option_types);
2179 }
2180 \f
2181 /*
2182 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2183 %                                                                             %
2184 %                                                                             %
2185 %                                                                             %
2186 %   G e t C o m m a n d O p t i o n I n f o                                   %
2187 %                                                                             %
2188 %                                                                             %
2189 %                                                                             %
2190 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2191 %
2192 %  GetCommandOptionInfo() returns a pointer to the matching OptionInfo entry
2193 %  for the "CommandOptions" table.  It returns both the type (argument count)
2194 %  and flags (argument type).
2195 %
2196 %  The format of the GetCommandOptionInfo method is:
2197 %
2198 %      const char **GetCommandOptionInfo(const char *option)
2199 %
2200 %  A description of each parameter follows:
2201 %
2202 %    o option: the option.
2203 %
2204 */
2205 MagickExport const OptionInfo *GetCommandOptionInfo(const char *option)
2206 {
2207   register ssize_t
2208     i;
2209
2210   for (i=0; CommandOptions[i].mnemonic != (char *) NULL; i++)
2211     if (LocaleCompare(option,CommandOptions[i].mnemonic) == 0)
2212       break;
2213   return(CommandOptions+i);
2214 }
2215 \f
2216 /*
2217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2218 %                                                                             %
2219 %                                                                             %
2220 %                                                                             %
2221 %   G e t C o m m a n d O p t i o n s                                         %
2222 %                                                                             %
2223 %                                                                             %
2224 %                                                                             %
2225 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2226 %
2227 %  GetCommandOptions() returns a list of command options.
2228 %
2229 %  The format of the GetCommandOptions method is:
2230 %
2231 %      const char **GetCommandOptions(const CommandOption option)
2232 %
2233 %  A description of each parameter follows:
2234 %
2235 %    o option: the option.
2236 %
2237 */
2238 MagickExport char **GetCommandOptions(const CommandOption option)
2239 {
2240   char
2241     **options;
2242
2243   const OptionInfo
2244     *option_info;
2245
2246   register ssize_t
2247     i;
2248
2249   option_info=GetOptionInfo(option);
2250   if (option_info == (const OptionInfo *) NULL)
2251     return((char **) NULL);
2252   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
2253   options=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*options));
2254   if (options == (char **) NULL)
2255     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
2256   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2257     options[i]=AcquireString(option_info[i].mnemonic);
2258   options[i]=(char *) NULL;
2259   return(options);
2260 }
2261 \f
2262 /*
2263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2264 %                                                                             %
2265 %                                                                             %
2266 %                                                                             %
2267 %   G e t N e x t I m a g e O p t i o n                                       %
2268 %                                                                             %
2269 %                                                                             %
2270 %                                                                             %
2271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2272 %
2273 %  GetNextImageOption() gets the next global option value.
2274 %
2275 %  The format of the GetNextImageOption method is:
2276 %
2277 %      char *GetNextImageOption(const ImageInfo *image_info)
2278 %
2279 %  A description of each parameter follows:
2280 %
2281 %    o image_info: the image info.
2282 %
2283 */
2284 MagickExport char *GetNextImageOption(const ImageInfo *image_info)
2285 {
2286   assert(image_info != (ImageInfo *) NULL);
2287   assert(image_info->signature == MagickCoreSignature);
2288   if (image_info->debug != MagickFalse)
2289     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2290       image_info->filename);
2291   if (image_info->options == (void *) NULL)
2292     return((char *) NULL);
2293   return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
2294 }
2295 \f
2296 /*
2297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2298 %                                                                             %
2299 %                                                                             %
2300 %                                                                             %
2301 %     I s C o m m a n d O p t i o n                                           %
2302 %                                                                             %
2303 %                                                                             %
2304 %                                                                             %
2305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2306 %
2307 %  IsCommandOption() returns MagickTrue if the option begins with a - or + and
2308 %  the first character that follows is alphanumeric.
2309 %
2310 %  The format of the IsCommandOption method is:
2311 %
2312 %      MagickBooleanType IsCommandOption(const char *option)
2313 %
2314 %  A description of each parameter follows:
2315 %
2316 %    o option: the option.
2317 %
2318 */
2319 MagickExport MagickBooleanType IsCommandOption(const char *option)
2320 {
2321   assert(option != (const char *) NULL);
2322   if ((*option != '-') && (*option != '+'))
2323     return(MagickFalse);
2324   if (strlen(option) == 1)
2325     return(((*option == '{') || (*option == '}') || (*option == '[') ||
2326       (*option == ']')) ? MagickTrue : MagickFalse);
2327   option++;
2328   if (*option == '-')
2329     return(MagickTrue);
2330   if (isalpha((int) ((unsigned char) *option)) == 0)
2331     return(MagickFalse);
2332   return(MagickTrue);
2333 }
2334 \f
2335 /*
2336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2337 %                                                                             %
2338 %                                                                             %
2339 %                                                                             %
2340 %   C o m m a n d O p t i o n T o M n e m o n i c                             %
2341 %                                                                             %
2342 %                                                                             %
2343 %                                                                             %
2344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2345 %
2346 %  CommandOptionToMnemonic() returns an enumerated value as a mnemonic.
2347 %
2348 %  The format of the CommandOptionToMnemonic method is:
2349 %
2350 %      const char *CommandOptionToMnemonic(const CommandOption option,
2351 %        const ssize_t type)
2352 %
2353 %  A description of each parameter follows:
2354 %
2355 %    o option: the option.
2356 %
2357 %    o type: one or more values separated by commas.
2358 %
2359 */
2360 MagickExport const char *CommandOptionToMnemonic(const CommandOption option,
2361   const ssize_t type)
2362 {
2363   const OptionInfo
2364     *option_info;
2365
2366   register ssize_t
2367     i;
2368
2369   option_info=GetOptionInfo(option);
2370   if (option_info == (const OptionInfo *) NULL)
2371     return((const char *) NULL);
2372   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2373     if (type == option_info[i].type)
2374       break;
2375   if (option_info[i].mnemonic == (const char *) NULL)
2376     return("Unrecognized");
2377   return(option_info[i].mnemonic);
2378 }
2379 \f
2380 /*
2381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2382 %                                                                             %
2383 %                                                                             %
2384 %                                                                             %
2385 %   I s O p t i o n M e m b e r                                               %
2386 %                                                                             %
2387 %                                                                             %
2388 %                                                                             %
2389 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2390 %
2391 %  IsOptionMember() returns MagickTrue if the option is a member of the options
2392 %  list (e.g. ICC is a member of xmp,icc,iptc).
2393 %
2394 %  The format of the IsOptionMember function is:
2395 %
2396 %      MagickBooleanType IsOptionMember(const char *option,
2397 %        const char *options)
2398 %
2399 %  A description of each parameter follows:
2400 %
2401 %    o option: an option or option expression (e.g. ICC or *).
2402 %
2403 %    o options: one or more options separated by commas.
2404 %
2405 */
2406 MagickExport MagickBooleanType IsOptionMember(const char *option,
2407   const char *options)
2408 {
2409   char
2410     **option_list,
2411     *string;
2412
2413   int
2414     number_options;
2415
2416   MagickBooleanType
2417     member;
2418
2419   register ssize_t
2420     i;
2421
2422   /*
2423     Is option a member of the options list?
2424   */
2425   if (options == (const char *) NULL)
2426     return(MagickFalse);
2427   string=ConstantString(options);
2428   (void) SubstituteString(&string,","," ");
2429   option_list=StringToArgv(string,&number_options);
2430   string=DestroyString(string);
2431   if (option_list == (char **) NULL)
2432     return(MagickFalse);
2433   member=MagickFalse;
2434   option_list[0]=DestroyString(option_list[0]);
2435   for (i=1; i < (ssize_t) number_options; i++)
2436   {
2437     if ((*option_list[i] == '!') &&
2438         (LocaleCompare(option,option_list[i]+1) == 0))
2439       break;
2440     if (GlobExpression(option,option_list[i],MagickTrue) != MagickFalse)
2441       {
2442         member=MagickTrue;
2443         break;
2444       }
2445     option_list[i]=DestroyString(option_list[i]);
2446   }
2447   for ( ; i < (ssize_t) number_options; i++)
2448     option_list[i]=DestroyString(option_list[i]);
2449   option_list=(char **) RelinquishMagickMemory(option_list);
2450   return(member);
2451 }
2452 \f
2453 /*
2454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2455 %                                                                             %
2456 %                                                                             %
2457 %                                                                             %
2458 %   L i s t C o m m a n d O p t i o n s                                       %
2459 %                                                                             %
2460 %                                                                             %
2461 %                                                                             %
2462 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2463 %
2464 %  ListCommandOptions() lists the contents of enumerated option type(s).
2465 %
2466 %  The format of the ListCommandOptions method is:
2467 %
2468 %      MagickBooleanType ListCommandOptions(FILE *file,
2469 %        const CommandOption option,ExceptionInfo *exception)
2470 %
2471 %  A description of each parameter follows:
2472 %
2473 %    o file:  list options to this file handle.
2474 %
2475 %    o option:  list these options.
2476 %
2477 %    o exception:  return any errors or warnings in this structure.
2478 %
2479 */
2480 MagickExport MagickBooleanType ListCommandOptions(FILE *file,
2481   const CommandOption option,ExceptionInfo *magick_unused(exception))
2482 {
2483   const OptionInfo
2484     *option_info;
2485
2486   register ssize_t
2487     i;
2488
2489   if (file == (FILE *) NULL)
2490     file=stdout;
2491   option_info=GetOptionInfo(option);
2492   if (option_info == (const OptionInfo *) NULL)
2493     return(MagickFalse);
2494   for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2495   {
2496     if (option_info[i].stealth != MagickFalse)
2497       continue;
2498     (void) FormatLocaleFile(file,"%s\n",option_info[i].mnemonic);
2499   }
2500   return(MagickTrue);
2501 }
2502 \f
2503 /*
2504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2505 %                                                                             %
2506 %                                                                             %
2507 %                                                                             %
2508 %   P a r s e C h a n n e l O p t i o n                                       %
2509 %                                                                             %
2510 %                                                                             %
2511 %                                                                             %
2512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2513 %
2514 %  ParseChannelOption() parses a string and returns an enumerated channel
2515 %  type(s).
2516 %
2517 %  The format of the ParseChannelOption method is:
2518 %
2519 %      ssize_t ParseChannelOption(const char *channels)
2520 %
2521 %  A description of each parameter follows:
2522 %
2523 %    o options: One or more values separated by commas.
2524 %
2525 */
2526 MagickExport ssize_t ParseChannelOption(const char *channels)
2527 {
2528   register ssize_t
2529     i;
2530
2531   ssize_t
2532     channel;
2533
2534   channel=ParseCommandOption(MagickChannelOptions,MagickTrue,channels);
2535   if (channel >= 0)
2536     return(channel);
2537   channel=0;
2538   for (i=0; i < (ssize_t) strlen(channels); i++)
2539   {
2540     switch (channels[i])
2541     {
2542       case 'A':
2543       case 'a':
2544       {
2545         channel|=AlphaChannel;
2546         break;
2547       }
2548       case 'B':
2549       case 'b':
2550       {
2551         channel|=BlueChannel;
2552         break;
2553       }
2554       case 'C':
2555       case 'c':
2556       {
2557         channel|=CyanChannel;
2558         break;
2559       }
2560       case 'g':
2561       case 'G':
2562       {
2563         channel|=GreenChannel;
2564         break;
2565       }
2566       case 'K':
2567       case 'k':
2568       {
2569         channel|=BlackChannel;
2570         break;
2571       }
2572       case 'M':
2573       case 'm':
2574       {
2575         channel|=MagentaChannel;
2576         break;
2577       }
2578       case 'o':
2579       case 'O':
2580       {
2581         channel|=AlphaChannel; /* depreciate */
2582         break;
2583       }
2584       case 'R':
2585       case 'r':
2586       {
2587         channel|=RedChannel;
2588         break;
2589       }
2590       case 'Y':
2591       case 'y':
2592       {
2593         channel|=YellowChannel;
2594         break;
2595       }
2596       case ',':
2597       {
2598         ssize_t
2599           type;
2600
2601         /*
2602           Gather the additional channel flags and merge with shorthand.
2603         */
2604         type=ParseCommandOption(MagickChannelOptions,MagickTrue,channels+i+1);
2605         if (type < 0)
2606           return(type);
2607         channel|=type;
2608         return(channel);
2609       }
2610       default:
2611         return(-1);
2612     }
2613   }
2614   return(channel);
2615 }
2616 \f
2617 /*
2618 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2619 %                                                                             %
2620 %                                                                             %
2621 %                                                                             %
2622 %   P a r s e C o m m a n d O p t i o n                                       %
2623 %                                                                             %
2624 %                                                                             %
2625 %                                                                             %
2626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2627 %
2628 %  ParseCommandOption() parses a string and returns an enumerated option
2629 %  type(s).  Return a value of -1 if no such option is found.
2630 %
2631 %  The format of the ParseCommandOption method is:
2632 %
2633 %      ssize_t ParseCommandOption(const CommandOption option,
2634 %        const MagickBooleanType list,const char *options)
2635 %
2636 %  A description of each parameter follows:
2637 %
2638 %    o option: Index to the option table to lookup
2639 %
2640 %    o list: A option other than zero permits more than one option separated by
2641 %      a comma or pipe.
2642 %
2643 %    o options: One or more options separated by commas.
2644 %
2645 */
2646 MagickExport ssize_t ParseCommandOption(const CommandOption option,
2647   const MagickBooleanType list,const char *options)
2648 {
2649   char
2650     token[MagickPathExtent];
2651
2652   const OptionInfo
2653     *command_info,
2654     *option_info;
2655
2656   int
2657     sentinel;
2658
2659   MagickBooleanType
2660     negate;
2661
2662   register char
2663     *q;
2664
2665   register const char
2666     *p;
2667
2668   register ssize_t
2669     i;
2670
2671   ssize_t
2672     option_types;
2673
2674   if (options == (const char *) NULL)
2675     return(-1);
2676   option_info=GetOptionInfo(option);
2677   if (option_info == (const OptionInfo *) NULL)
2678     return(-1);
2679   option_types=0;
2680   sentinel=',';
2681   if (strchr(options,'|') != (char *) NULL)
2682     sentinel='|';
2683   for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2684   {
2685     while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2686            (*p != '\0'))
2687       p++;
2688     negate=(*p == '!') ? MagickTrue : MagickFalse;
2689     if (negate != MagickFalse)
2690       p++;
2691     q=token;
2692     while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2693            (*p != '\0'))
2694     {
2695       if ((q-token) >= (MagickPathExtent-1))
2696         break;
2697       *q++=(*p++);
2698     }
2699     *q='\0';
2700     for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2701       if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2702         break;
2703     command_info=option_info+i;
2704     if ((command_info->mnemonic == (const char *) NULL) &&
2705         ((strchr(token+1,'-') != (char *) NULL) ||
2706          (strchr(token+1,'_') != (char *) NULL)))
2707         {
2708           while ((q=strchr(token+1,'-')) != (char *) NULL)
2709             (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2710           while ((q=strchr(token+1,'_')) != (char *) NULL)
2711             (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2712           for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2713             if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2714               break;
2715           command_info=option_info+i;
2716         }
2717     if (command_info->mnemonic == (const char *) NULL)
2718       return(-1);
2719     if (negate != MagickFalse)
2720       option_types=option_types &~ command_info->type;
2721     else
2722       option_types=option_types | command_info->type;
2723     if (list == MagickFalse)
2724       break;
2725   }
2726   return(option_types);
2727 }
2728 \f
2729 /*
2730 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2731 %                                                                             %
2732 %                                                                             %
2733 %                                                                             %
2734 %   P a r s e P i x e l C h a n n e l O p t i o n                             %
2735 %                                                                             %
2736 %                                                                             %
2737 %                                                                             %
2738 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2739 %
2740 %  ParsePixelChannelOption() parses a string and returns an enumerated pixel
2741 %  channel type(s).
2742 %
2743 %  The format of the ParsePixelChannelOption method is:
2744 %
2745 %      ssize_t ParsePixelChannelOption(const char *channels)
2746 %
2747 %  A description of each parameter follows:
2748 %
2749 %    o channels: One or more channels separated by commas.
2750 %
2751 */
2752 MagickExport ssize_t ParsePixelChannelOption(const char *channels)
2753 {
2754   char
2755     *q,
2756     token[MagickPathExtent];
2757
2758   ssize_t
2759     channel;
2760
2761   GetMagickToken(channels,NULL,token);
2762   if ((*token == ';') || (*token == '|'))
2763     return(RedPixelChannel);
2764   channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
2765   if (channel >= 0)
2766     return(channel);
2767   q=(char *) token;
2768   channel=(ssize_t) InterpretLocaleValue(token,&q);
2769   if ((q == token) || (channel < 0) || (channel >= MaxPixelChannels))
2770     return(-1);
2771   return(channel);
2772 }
2773 \f
2774 /*
2775 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2776 %                                                                             %
2777 %                                                                             %
2778 %                                                                             %
2779 %   R e m o v e I m a g e O p t i o n                                         %
2780 %                                                                             %
2781 %                                                                             %
2782 %                                                                             %
2783 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2784 %
2785 %  RemoveImageOption() removes an option from the image and returns its value.
2786 %
2787 %  In this case the ConstantString() value returned should be freed by the
2788 %  caller when finished.
2789 %
2790 %  The format of the RemoveImageOption method is:
2791 %
2792 %      char *RemoveImageOption(ImageInfo *image_info,const char *option)
2793 %
2794 %  A description of each parameter follows:
2795 %
2796 %    o image_info: the image info.
2797 %
2798 %    o option: the image option.
2799 %
2800 */
2801 MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
2802 {
2803   char
2804     *value;
2805
2806   assert(image_info != (ImageInfo *) NULL);
2807   assert(image_info->signature == MagickCoreSignature);
2808   if (image_info->debug != MagickFalse)
2809     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2810       image_info->filename);
2811   if (image_info->options == (void *) NULL)
2812     return((char *) NULL);
2813   value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
2814     image_info->options,option);
2815   return(value);
2816 }
2817 \f
2818 /*
2819 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2820 %                                                                             %
2821 %                                                                             %
2822 %                                                                             %
2823 %   R e s e t I m a g e O p t i o n                                           %
2824 %                                                                             %
2825 %                                                                             %
2826 %                                                                             %
2827 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2828 %
2829 %  ResetImageOptions() resets the image_info option.  That is, it deletes
2830 %  all global options associated with the image_info structure.
2831 %
2832 %  The format of the ResetImageOptions method is:
2833 %
2834 %      ResetImageOptions(ImageInfo *image_info)
2835 %
2836 %  A description of each parameter follows:
2837 %
2838 %    o image_info: the image info.
2839 %
2840 */
2841 MagickExport void ResetImageOptions(const ImageInfo *image_info)
2842 {
2843   assert(image_info != (ImageInfo *) NULL);
2844   assert(image_info->signature == MagickCoreSignature);
2845   if (image_info->debug != MagickFalse)
2846     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2847       image_info->filename);
2848   if (image_info->options == (void *) NULL)
2849     return;
2850   ResetSplayTree((SplayTreeInfo *) image_info->options);
2851 }
2852 \f
2853 /*
2854 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2855 %                                                                             %
2856 %                                                                             %
2857 %                                                                             %
2858 %   R e s e t I m a g e O p t i o n I t e r a t o r                           %
2859 %                                                                             %
2860 %                                                                             %
2861 %                                                                             %
2862 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2863 %
2864 %  ResetImageOptionIterator() resets the image_info values iterator.  Use it
2865 %  in conjunction with GetNextImageOption() to iterate over all the values
2866 %  associated with an image option.
2867 %
2868 %  The format of the ResetImageOptionIterator method is:
2869 %
2870 %      ResetImageOptionIterator(ImageInfo *image_info)
2871 %
2872 %  A description of each parameter follows:
2873 %
2874 %    o image_info: the image info.
2875 %
2876 */
2877 MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
2878 {
2879   assert(image_info != (ImageInfo *) NULL);
2880   assert(image_info->signature == MagickCoreSignature);
2881   if (image_info->debug != MagickFalse)
2882     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2883       image_info->filename);
2884   if (image_info->options == (void *) NULL)
2885     return;
2886   ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
2887 }
2888 \f
2889 /*
2890 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2891 %                                                                             %
2892 %                                                                             %
2893 %                                                                             %
2894 %   S e t I m a g e O p t i o n                                               %
2895 %                                                                             %
2896 %                                                                             %
2897 %                                                                             %
2898 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2899 %
2900 %  SetImageOption() associates an value with an image option.
2901 %
2902 %  The format of the SetImageOption method is:
2903 %
2904 %      MagickBooleanType SetImageOption(ImageInfo *image_info,
2905 %        const char *option,const char *value)
2906 %
2907 %  A description of each parameter follows:
2908 %
2909 %    o image_info: the image info.
2910 %
2911 %    o option: the image option.
2912 %
2913 %    o values: the image option values.
2914 %
2915 */
2916 MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
2917   const char *option,const char *value)
2918 {
2919   assert(image_info != (ImageInfo *) NULL);
2920   assert(image_info->signature == MagickCoreSignature);
2921   if (image_info->debug != MagickFalse)
2922     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2923       image_info->filename);
2924   /*
2925     Specific global option settings.
2926   */
2927   if (LocaleCompare(option,"size") == 0) {
2928     (void) CloneString(&image_info->size,value);
2929     return(MagickTrue);
2930   }
2931   /*
2932     Create tree if needed - specify how key,values are to be freed.
2933   */
2934   if (image_info->options == (void *) NULL)
2935     image_info->options=NewSplayTree(CompareSplayTreeString,
2936       RelinquishMagickMemory,RelinquishMagickMemory);
2937   /*
2938     Delete Option if NULL --  empty string values are valid!
2939   */
2940   if (value == (const char *) NULL)
2941     return(DeleteImageOption(image_info,option));
2942   /*
2943     Add option to splay-tree.
2944   */
2945   return(AddValueToSplayTree((SplayTreeInfo *) image_info->options,
2946     ConstantString(option),ConstantString(value)));
2947 }