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