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