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