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