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