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