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