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