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