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