]> 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     { "Rec601YCbCr", Rec601YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
893     { "Rec709YCbCr", Rec709YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
894     { "RGB", RGBColorspace, UndefinedOptionFlag, MagickFalse },
895     { "sRGB", sRGBColorspace, UndefinedOptionFlag, MagickFalse },
896     { "Transparent", TransparentColorspace, UndefinedOptionFlag, MagickFalse },
897     { "XYZ", XYZColorspace, UndefinedOptionFlag, MagickFalse },
898     { "YCbCr", YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
899     { "YCC", YCCColorspace, UndefinedOptionFlag, MagickFalse },
900     { "YIQ", YIQColorspace, UndefinedOptionFlag, MagickFalse },
901     { "YPbPr", YPbPrColorspace, UndefinedOptionFlag, MagickFalse },
902     { "YUV", YUVColorspace, UndefinedOptionFlag, MagickFalse },
903     { (char *) NULL, UndefinedColorspace, UndefinedOptionFlag, MagickFalse }
904   },
905   DataTypeOptions[] =
906   {
907     { "Undefined", UndefinedData, UndefinedOptionFlag, MagickTrue },
908     { "Byte", ByteData, UndefinedOptionFlag, MagickFalse },
909     { "Long", LongData, UndefinedOptionFlag, MagickFalse },
910     { "Short", ShortData, UndefinedOptionFlag, MagickFalse },
911     { "String", StringData, UndefinedOptionFlag, MagickFalse },
912     { (char *) NULL, UndefinedData, UndefinedOptionFlag, MagickFalse }
913   },
914   DecorateOptions[] =
915   {
916     { "Undefined", UndefinedDecoration, UndefinedOptionFlag, MagickTrue },
917     { "LineThrough", LineThroughDecoration, UndefinedOptionFlag, MagickFalse },
918     { "None", NoDecoration, UndefinedOptionFlag, MagickFalse },
919     { "Overline", OverlineDecoration, UndefinedOptionFlag, MagickFalse },
920     { "Underline", UnderlineDecoration, UndefinedOptionFlag, MagickFalse },
921     { (char *) NULL, UndefinedDecoration, UndefinedOptionFlag, MagickFalse }
922   },
923   DirectionOptions[] =
924   {
925     { "Undefined", UndefinedDirection, UndefinedOptionFlag, MagickTrue },
926     { "right-to-left", RightToLeftDirection, UndefinedOptionFlag, MagickFalse },
927     { "left-to-right", LeftToRightDirection, UndefinedOptionFlag, MagickFalse },
928     { (char *) NULL, UndefinedDirection, UndefinedOptionFlag, MagickFalse }
929   },
930   DisposeOptions[] =
931   {
932     { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickTrue },
933     { "Background", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
934     { "None", NoneDispose, UndefinedOptionFlag, MagickFalse },
935     { "Previous", PreviousDispose, UndefinedOptionFlag, MagickFalse },
936     { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
937     { "0", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
938     { "1", NoneDispose, UndefinedOptionFlag, MagickFalse },
939     { "2", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
940     { "3", PreviousDispose, UndefinedOptionFlag, MagickFalse },
941     { (char *) NULL, UndefinedDispose, UndefinedOptionFlag, MagickFalse }
942   },
943   DistortOptions[] =
944   {
945     { "Affine", AffineDistortion, UndefinedOptionFlag, MagickFalse },
946     { "AffineProjection", AffineProjectionDistortion, UndefinedOptionFlag, MagickFalse },
947     { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
948     { "SRT", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
949     { "Perspective", PerspectiveDistortion, UndefinedOptionFlag, MagickFalse },
950     { "PerspectiveProjection", PerspectiveProjectionDistortion, UndefinedOptionFlag, MagickFalse },
951     { "Bilinear", BilinearForwardDistortion, UndefinedOptionFlag, MagickTrue },
952     { "BilinearForward", BilinearForwardDistortion, UndefinedOptionFlag, MagickFalse },
953     { "BilinearReverse", BilinearReverseDistortion, UndefinedOptionFlag, MagickFalse },
954     { "Polynomial", PolynomialDistortion, UndefinedOptionFlag, MagickFalse },
955     { "Arc", ArcDistortion, UndefinedOptionFlag, MagickFalse },
956     { "Polar", PolarDistortion, UndefinedOptionFlag, MagickFalse },
957     { "DePolar", DePolarDistortion, UndefinedOptionFlag, MagickFalse },
958     { "Barrel", BarrelDistortion, UndefinedOptionFlag, MagickFalse },
959     { "Cylinder2Plane", Cylinder2PlaneDistortion, UndefinedOptionFlag, MagickTrue },
960     { "Plane2Cylinder", Plane2CylinderDistortion, UndefinedOptionFlag, MagickTrue },
961     { "BarrelInverse", BarrelInverseDistortion, UndefinedOptionFlag, MagickFalse },
962     { "Shepards", ShepardsDistortion, UndefinedOptionFlag, MagickFalse },
963     { "Resize", ResizeDistortion, UndefinedOptionFlag, MagickFalse },
964     { (char *) NULL, UndefinedDistortion, UndefinedOptionFlag, MagickFalse }
965   },
966   DitherOptions[] =
967   {
968     { "Undefined", UndefinedDitherMethod, UndefinedOptionFlag, MagickTrue },
969     { "None", NoDitherMethod, UndefinedOptionFlag, MagickFalse },
970     { "FloydSteinberg", FloydSteinbergDitherMethod, UndefinedOptionFlag, MagickFalse },
971     { "Riemersma", RiemersmaDitherMethod, UndefinedOptionFlag, MagickFalse },
972     { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
973   },
974   EndianOptions[] =
975   {
976     { "Undefined", UndefinedEndian, UndefinedOptionFlag, MagickTrue },
977     { "LSB", LSBEndian, UndefinedOptionFlag, MagickFalse },
978     { "MSB", MSBEndian, UndefinedOptionFlag, MagickFalse },
979     { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
980   },
981   EvaluateOptions[] =
982   {
983     { "Undefined", UndefinedEvaluateOperator, UndefinedOptionFlag, MagickTrue },
984     { "Abs", AbsEvaluateOperator, UndefinedOptionFlag, MagickFalse },
985     { "Add", AddEvaluateOperator, UndefinedOptionFlag, MagickFalse },
986     { "AddModulus", AddModulusEvaluateOperator, UndefinedOptionFlag, MagickFalse },
987     { "And", AndEvaluateOperator, UndefinedOptionFlag, MagickFalse },
988     { "Cos", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
989     { "Cosine", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
990     { "Divide", DivideEvaluateOperator, UndefinedOptionFlag, MagickFalse },
991     { "Exp", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
992     { "Exponential", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
993     { "GaussianNoise", GaussianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
994     { "ImpulseNoise", ImpulseNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
995     { "LaplacianNoise", LaplacianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
996     { "LeftShift", LeftShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
997     { "Log", LogEvaluateOperator, UndefinedOptionFlag, MagickFalse },
998     { "Max", MaxEvaluateOperator, UndefinedOptionFlag, MagickFalse },
999     { "Mean", MeanEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1000     { "Median", MedianEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1001     { "Min", MinEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1002     { "MultiplicativeNoise", MultiplicativeNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1003     { "Multiply", MultiplyEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1004     { "Or", OrEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1005     { "PoissonNoise", PoissonNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1006     { "Pow", PowEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1007     { "RightShift", RightShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1008     { "Set", SetEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1009     { "Sin", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1010     { "Sine", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1011     { "Subtract", SubtractEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1012     { "Sum", SumEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1013     { "Threshold", ThresholdEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1014     { "ThresholdBlack", ThresholdBlackEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1015     { "ThresholdWhite", ThresholdWhiteEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1016     { "UniformNoise", UniformNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1017     { "Xor", XorEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1018     { (char *) NULL, UndefinedEvaluateOperator, UndefinedOptionFlag, MagickFalse }
1019   },
1020   FillRuleOptions[] =
1021   {
1022     { "Undefined", UndefinedRule, UndefinedOptionFlag, MagickTrue },
1023     { "Evenodd", EvenOddRule, UndefinedOptionFlag, MagickFalse },
1024     { "NonZero", NonZeroRule, UndefinedOptionFlag, MagickFalse },
1025     { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
1026   },
1027   FilterOptions[] =
1028   {
1029     { "Undefined", UndefinedFilter, UndefinedOptionFlag, MagickTrue },
1030     { "Bartlett", BartlettFilter, UndefinedOptionFlag, MagickFalse },
1031     { "Blackman", BlackmanFilter, UndefinedOptionFlag, MagickFalse },
1032     { "Bohman", BohmanFilter, UndefinedOptionFlag, MagickFalse },
1033     { "Box", BoxFilter, UndefinedOptionFlag, MagickFalse },
1034     { "Catrom", CatromFilter, UndefinedOptionFlag, MagickFalse },
1035     { "Cosine", CosineFilter, UndefinedOptionFlag, MagickFalse },
1036     { "Cubic", CubicFilter, UndefinedOptionFlag, MagickFalse },
1037     { "Gaussian", GaussianFilter, UndefinedOptionFlag, MagickFalse },
1038     { "Hamming", HammingFilter, UndefinedOptionFlag, MagickFalse },
1039     { "Hann", HannFilter, UndefinedOptionFlag, MagickFalse },
1040     { "Hanning", HannFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1041     { "Hermite", HermiteFilter, UndefinedOptionFlag, MagickFalse },
1042     { "Jinc", JincFilter, UndefinedOptionFlag, MagickFalse },
1043     { "Kaiser", KaiserFilter, UndefinedOptionFlag, MagickFalse },
1044     { "Lagrange", LagrangeFilter, UndefinedOptionFlag, MagickFalse },
1045     { "Lanczos", LanczosFilter, UndefinedOptionFlag, MagickFalse },
1046     { "Lanczos2", Lanczos2Filter, UndefinedOptionFlag, MagickFalse },
1047     { "Lanczos2Sharp", Lanczos2SharpFilter, UndefinedOptionFlag, MagickFalse },
1048     { "LanczosRadius", LanczosRadiusFilter, UndefinedOptionFlag, MagickFalse },
1049     { "LanczosSharp", LanczosSharpFilter, UndefinedOptionFlag, MagickFalse },
1050     { "Mitchell", MitchellFilter, UndefinedOptionFlag, MagickFalse },
1051     { "Parzen", ParzenFilter, UndefinedOptionFlag, MagickFalse },
1052     { "Point", PointFilter, UndefinedOptionFlag, MagickFalse },
1053     { "Quadratic", QuadraticFilter, UndefinedOptionFlag, MagickFalse },
1054     { "Robidoux", RobidouxFilter, UndefinedOptionFlag, MagickFalse },
1055     { "RobidouxSharp", RobidouxSharpFilter, UndefinedOptionFlag, MagickFalse },
1056     { "Sinc", SincFilter, UndefinedOptionFlag, MagickFalse },
1057     { "SincFast", SincFastFilter, UndefinedOptionFlag, MagickFalse },
1058     { "Spline", SplineFilter, UndefinedOptionFlag, MagickFalse },
1059     { "Triangle", TriangleFilter, UndefinedOptionFlag, MagickFalse },
1060     { "Welch", WelchFilter, UndefinedOptionFlag, MagickFalse },
1061     { "Welsh", WelchFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1062     { (char *) NULL, UndefinedFilter, UndefinedOptionFlag, MagickFalse }
1063   },
1064   FunctionOptions[] =
1065   {
1066     { "Undefined", UndefinedFunction, UndefinedOptionFlag, MagickTrue },
1067     { "Polynomial", PolynomialFunction, UndefinedOptionFlag, MagickFalse },
1068     { "Sinusoid", SinusoidFunction, UndefinedOptionFlag, MagickFalse },
1069     { "ArcSin", ArcsinFunction, UndefinedOptionFlag, MagickFalse },
1070     { "ArcTan", ArctanFunction, UndefinedOptionFlag, MagickFalse },
1071     { (char *) NULL, UndefinedFunction, UndefinedOptionFlag, MagickFalse }
1072   },
1073   GravityOptions[] =
1074   {
1075     { "Undefined", UndefinedGravity, UndefinedOptionFlag, MagickTrue },
1076     { "None", UndefinedGravity, UndefinedOptionFlag, MagickFalse },
1077     { "Center", CenterGravity, UndefinedOptionFlag, MagickFalse },
1078     { "East", EastGravity, UndefinedOptionFlag, MagickFalse },
1079     { "Forget", ForgetGravity, UndefinedOptionFlag, MagickFalse },
1080     { "NorthEast", NorthEastGravity, UndefinedOptionFlag, MagickFalse },
1081     { "North", NorthGravity, UndefinedOptionFlag, MagickFalse },
1082     { "NorthWest", NorthWestGravity, UndefinedOptionFlag, MagickFalse },
1083     { "SouthEast", SouthEastGravity, UndefinedOptionFlag, MagickFalse },
1084     { "South", SouthGravity, UndefinedOptionFlag, MagickFalse },
1085     { "SouthWest", SouthWestGravity, UndefinedOptionFlag, MagickFalse },
1086     { "West", WestGravity, UndefinedOptionFlag, MagickFalse },
1087     { (char *) NULL, UndefinedGravity, UndefinedOptionFlag, MagickFalse }
1088   },
1089   IntentOptions[] =
1090   {
1091     { "Undefined", UndefinedIntent, UndefinedOptionFlag, MagickTrue },
1092     { "Absolute", AbsoluteIntent, UndefinedOptionFlag, MagickFalse },
1093     { "Perceptual", PerceptualIntent, UndefinedOptionFlag, MagickFalse },
1094     { "Relative", RelativeIntent, UndefinedOptionFlag, MagickFalse },
1095     { "Saturation", SaturationIntent, UndefinedOptionFlag, MagickFalse },
1096     { (char *) NULL, UndefinedIntent, UndefinedOptionFlag, MagickFalse }
1097   },
1098   InterlaceOptions[] =
1099   {
1100     { "Undefined", UndefinedInterlace, UndefinedOptionFlag, MagickTrue },
1101     { "Line", LineInterlace, UndefinedOptionFlag, MagickFalse },
1102     { "None", NoInterlace, UndefinedOptionFlag, MagickFalse },
1103     { "Plane", PlaneInterlace, UndefinedOptionFlag, MagickFalse },
1104     { "Partition", PartitionInterlace, UndefinedOptionFlag, MagickFalse },
1105     { "GIF", GIFInterlace, UndefinedOptionFlag, MagickFalse },
1106     { "JPEG", JPEGInterlace, UndefinedOptionFlag, MagickFalse },
1107     { "PNG", PNGInterlace, UndefinedOptionFlag, MagickFalse },
1108     { (char *) NULL, UndefinedInterlace, UndefinedOptionFlag, MagickFalse }
1109   },
1110   InterpolateOptions[] =
1111   {
1112     { "Undefined", UndefinedInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1113     { "Average", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1114     { "Average4", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1115     { "Average9", Average9InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1116     { "Average16", Average16InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1117     { "Background", BackgroundInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1118     { "Bilinear", BilinearInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1119     { "Blend", BlendInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1120     { "Catrom", CatromInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1121     { "Integer", IntegerInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1122     { "Mesh", MeshInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1123     { "Nearest", NearestInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1124     { "NearestNeighbor", NearestInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1125     { "Spline", SplineInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1126 /*  { "Filter", FilterInterpolatePixel, UndefinedOptionFlag, MagickFalse }, */
1127     { (char *) NULL, UndefinedInterpolatePixel, UndefinedOptionFlag, MagickFalse }
1128   },
1129   KernelOptions[] =
1130   {
1131     { "Undefined", UndefinedKernel, UndefinedOptionFlag, MagickTrue },
1132     { "Unity", UnityKernel, UndefinedOptionFlag, MagickFalse },
1133     { "Gaussian", GaussianKernel, UndefinedOptionFlag, MagickFalse },
1134     { "DoG", DoGKernel, UndefinedOptionFlag, MagickFalse },
1135     { "LoG", LoGKernel, UndefinedOptionFlag, MagickFalse },
1136     { "Blur", BlurKernel, UndefinedOptionFlag, MagickFalse },
1137     { "Comet", CometKernel, UndefinedOptionFlag, MagickFalse },
1138     { "Binomial", BinomialKernel, UndefinedOptionFlag, MagickFalse },
1139     { "Laplacian", LaplacianKernel, UndefinedOptionFlag, MagickFalse },
1140     { "Sobel", SobelKernel, UndefinedOptionFlag, MagickFalse },
1141     { "FreiChen", FreiChenKernel, UndefinedOptionFlag, MagickFalse },
1142     { "Roberts", RobertsKernel, UndefinedOptionFlag, MagickFalse },
1143     { "Prewitt", PrewittKernel, UndefinedOptionFlag, MagickFalse },
1144     { "Compass", CompassKernel, UndefinedOptionFlag, MagickFalse },
1145     { "Kirsch", KirschKernel, UndefinedOptionFlag, MagickFalse },
1146     { "Diamond", DiamondKernel, UndefinedOptionFlag, MagickFalse },
1147     { "Square", SquareKernel, UndefinedOptionFlag, MagickFalse },
1148     { "Rectangle", RectangleKernel, UndefinedOptionFlag, MagickFalse },
1149     { "Disk", DiskKernel, UndefinedOptionFlag, MagickFalse },
1150     { "Octagon", OctagonKernel, UndefinedOptionFlag, MagickFalse },
1151     { "Plus", PlusKernel, UndefinedOptionFlag, MagickFalse },
1152     { "Cross", CrossKernel, UndefinedOptionFlag, MagickFalse },
1153     { "Ring", RingKernel, UndefinedOptionFlag, MagickFalse },
1154     { "Peaks", PeaksKernel, UndefinedOptionFlag, MagickFalse },
1155     { "Edges", EdgesKernel, UndefinedOptionFlag, MagickFalse },
1156     { "Corners", CornersKernel, UndefinedOptionFlag, MagickFalse },
1157     { "Diagonals", DiagonalsKernel, UndefinedOptionFlag, MagickFalse },
1158     { "LineEnds", LineEndsKernel, UndefinedOptionFlag, MagickFalse },
1159     { "LineJunctions", LineJunctionsKernel, UndefinedOptionFlag, MagickFalse },
1160     { "Ridges", RidgesKernel, UndefinedOptionFlag, MagickFalse },
1161     { "ConvexHull", ConvexHullKernel, UndefinedOptionFlag, MagickFalse },
1162     { "ThinSe", ThinSEKernel, UndefinedOptionFlag, MagickFalse },
1163     { "Skeleton", SkeletonKernel, UndefinedOptionFlag, MagickFalse },
1164     { "Chebyshev", ChebyshevKernel, UndefinedOptionFlag, MagickFalse },
1165     { "Manhattan", ManhattanKernel, UndefinedOptionFlag, MagickFalse },
1166     { "Octagonal", OctagonalKernel, UndefinedOptionFlag, MagickFalse },
1167     { "Euclidean", EuclideanKernel, UndefinedOptionFlag, MagickFalse },
1168     { "User Defined", UserDefinedKernel, UndefinedOptionFlag, MagickTrue },
1169     { (char *) NULL, UndefinedKernel, UndefinedOptionFlag, MagickFalse }
1170   },
1171   LayerOptions[] =
1172   {
1173     { "Undefined", UndefinedLayer, UndefinedOptionFlag, MagickTrue },
1174     { "Coalesce", CoalesceLayer, UndefinedOptionFlag, MagickFalse },
1175     { "CompareAny", CompareAnyLayer, UndefinedOptionFlag, MagickFalse },
1176     { "CompareClear", CompareClearLayer, UndefinedOptionFlag, MagickFalse },
1177     { "CompareOverlay", CompareOverlayLayer, UndefinedOptionFlag, MagickFalse },
1178     { "Dispose", DisposeLayer, UndefinedOptionFlag, MagickFalse },
1179     { "Optimize", OptimizeLayer, UndefinedOptionFlag, MagickFalse },
1180     { "OptimizeFrame", OptimizeImageLayer, UndefinedOptionFlag, MagickFalse },
1181     { "OptimizePlus", OptimizePlusLayer, UndefinedOptionFlag, MagickFalse },
1182     { "OptimizeTransparency", OptimizeTransLayer, UndefinedOptionFlag, MagickFalse },
1183     { "RemoveDups", RemoveDupsLayer, UndefinedOptionFlag, MagickFalse },
1184     { "RemoveZero", RemoveZeroLayer, UndefinedOptionFlag, MagickFalse },
1185     { "Composite", CompositeLayer, UndefinedOptionFlag, MagickFalse },
1186     { "Merge", MergeLayer, UndefinedOptionFlag, MagickFalse },
1187     { "Flatten", FlattenLayer, UndefinedOptionFlag, MagickFalse },
1188     { "Mosaic", MosaicLayer, UndefinedOptionFlag, MagickFalse },
1189     { "TrimBounds", TrimBoundsLayer, UndefinedOptionFlag, MagickFalse },
1190     { (char *) NULL, UndefinedLayer, UndefinedOptionFlag, MagickFalse }
1191   },
1192   LineCapOptions[] =
1193   {
1194     { "Undefined", UndefinedCap, UndefinedOptionFlag, MagickTrue },
1195     { "Butt", ButtCap, UndefinedOptionFlag, MagickFalse },
1196     { "Round", RoundCap, UndefinedOptionFlag, MagickFalse },
1197     { "Square", SquareCap, UndefinedOptionFlag, MagickFalse },
1198     { (char *) NULL, UndefinedCap, UndefinedOptionFlag, MagickFalse }
1199   },
1200   LineJoinOptions[] =
1201   {
1202     { "Undefined", UndefinedJoin, UndefinedOptionFlag, MagickTrue },
1203     { "Bevel", BevelJoin, UndefinedOptionFlag, MagickFalse },
1204     { "Miter", MiterJoin, UndefinedOptionFlag, MagickFalse },
1205     { "Round", RoundJoin, UndefinedOptionFlag, MagickFalse },
1206     { (char *) NULL, UndefinedJoin, UndefinedOptionFlag, MagickFalse }
1207   },
1208   ListOptions[] =
1209   {
1210     { "Align", MagickAlignOptions, UndefinedOptionFlag, MagickFalse },
1211     { "Alpha", MagickAlphaChannelOptions, UndefinedOptionFlag, MagickFalse },
1212     { "Boolean", MagickBooleanOptions, UndefinedOptionFlag, MagickFalse },
1213     { "Cache", MagickCacheOptions, UndefinedOptionFlag, MagickFalse },
1214     { "Channel", MagickChannelOptions, UndefinedOptionFlag, MagickFalse },
1215     { "Class", MagickClassOptions, UndefinedOptionFlag, MagickFalse },
1216     { "ClipPath", MagickClipPathOptions, UndefinedOptionFlag, MagickFalse },
1217     { "Coder", MagickCoderOptions, UndefinedOptionFlag, MagickFalse },
1218     { "Color", MagickColorOptions, UndefinedOptionFlag, MagickFalse },
1219     { "Colorspace", MagickColorspaceOptions, UndefinedOptionFlag, MagickFalse },
1220     { "Command", MagickCommandOptions, UndefinedOptionFlag, MagickFalse },
1221     { "Compose", MagickComposeOptions, UndefinedOptionFlag, MagickFalse },
1222     { "Compress", MagickCompressOptions, UndefinedOptionFlag, MagickFalse },
1223     { "Configure", MagickConfigureOptions, UndefinedOptionFlag, MagickFalse },
1224     { "DataType", MagickDataTypeOptions, UndefinedOptionFlag, MagickFalse },
1225     { "Debug", MagickDebugOptions, UndefinedOptionFlag, MagickFalse },
1226     { "Decoration", MagickDecorateOptions, UndefinedOptionFlag, MagickFalse },
1227     { "Delegate", MagickDelegateOptions, UndefinedOptionFlag, MagickFalse },
1228     { "Direction", MagickDirectionOptions, UndefinedOptionFlag, MagickFalse },
1229     { "Dispose", MagickDisposeOptions, UndefinedOptionFlag, MagickFalse },
1230     { "Distort", MagickDistortOptions, UndefinedOptionFlag, MagickFalse },
1231     { "Dither", MagickDitherOptions, UndefinedOptionFlag, MagickFalse },
1232     { "Endian", MagickEndianOptions, UndefinedOptionFlag, MagickFalse },
1233     { "Evaluate", MagickEvaluateOptions, UndefinedOptionFlag, MagickFalse },
1234     { "FillRule", MagickFillRuleOptions, UndefinedOptionFlag, MagickFalse },
1235     { "Filter", MagickFilterOptions, UndefinedOptionFlag, MagickFalse },
1236     { "Font", MagickFontOptions, UndefinedOptionFlag, MagickFalse },
1237     { "Format", MagickFormatOptions, UndefinedOptionFlag, MagickFalse },
1238     { "Function", MagickFunctionOptions, UndefinedOptionFlag, MagickFalse },
1239     { "Gravity", MagickGravityOptions, UndefinedOptionFlag, MagickFalse },
1240     { "Intensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
1241     { "Intent", MagickIntentOptions, UndefinedOptionFlag, MagickFalse },
1242     { "Interlace", MagickInterlaceOptions, UndefinedOptionFlag, MagickFalse },
1243     { "Interpolate", MagickInterpolateOptions, UndefinedOptionFlag, MagickFalse },
1244     { "Kernel", MagickKernelOptions, UndefinedOptionFlag, MagickFalse },
1245     { "Layers", MagickLayerOptions, UndefinedOptionFlag, MagickFalse },
1246     { "LineCap", MagickLineCapOptions, UndefinedOptionFlag, MagickFalse },
1247     { "LineJoin", MagickLineJoinOptions, UndefinedOptionFlag, MagickFalse },
1248     { "List", MagickListOptions, UndefinedOptionFlag, MagickFalse },
1249     { "Locale", MagickLocaleOptions, UndefinedOptionFlag, MagickFalse },
1250     { "LogEvent", MagickLogEventOptions, UndefinedOptionFlag, MagickFalse },
1251     { "Log", MagickLogOptions, UndefinedOptionFlag, MagickFalse },
1252     { "Magic", MagickMagicOptions, UndefinedOptionFlag, MagickFalse },
1253     { "Method", MagickMethodOptions, UndefinedOptionFlag, MagickFalse },
1254     { "Metric", MagickMetricOptions, UndefinedOptionFlag, MagickFalse },
1255     { "Mime", MagickMimeOptions, UndefinedOptionFlag, MagickFalse },
1256     { "Mode", MagickModeOptions, UndefinedOptionFlag, MagickFalse },
1257     { "Morphology", MagickMorphologyOptions, UndefinedOptionFlag, MagickFalse },
1258     { "Module", MagickModuleOptions, UndefinedOptionFlag, MagickFalse },
1259     { "Noise", MagickNoiseOptions, UndefinedOptionFlag, MagickFalse },
1260     { "Orientation", MagickOrientationOptions, UndefinedOptionFlag, MagickFalse },
1261     { "PixelChannel", MagickPixelChannelOptions, UndefinedOptionFlag, MagickFalse },
1262     { "PixelIntensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
1263     { "PixelTrait", MagickPixelTraitOptions, UndefinedOptionFlag, MagickFalse },
1264     { "Policy", MagickPolicyOptions, UndefinedOptionFlag, MagickFalse },
1265     { "PolicyDomain", MagickPolicyDomainOptions, UndefinedOptionFlag, MagickFalse },
1266     { "PolicyRights", MagickPolicyRightsOptions, UndefinedOptionFlag, MagickFalse },
1267     { "Preview", MagickPreviewOptions, UndefinedOptionFlag, MagickFalse },
1268     { "Primitive", MagickPrimitiveOptions, UndefinedOptionFlag, MagickFalse },
1269     { "QuantumFormat", MagickQuantumFormatOptions, UndefinedOptionFlag, MagickFalse },
1270     { "Resource", MagickResourceOptions, UndefinedOptionFlag, MagickFalse },
1271     { "SparseColor", MagickSparseColorOptions, UndefinedOptionFlag, MagickFalse },
1272     { "Statistic", MagickStatisticOptions, UndefinedOptionFlag, MagickFalse },
1273     { "Storage", MagickStorageOptions, UndefinedOptionFlag, MagickFalse },
1274     { "Stretch", MagickStretchOptions, UndefinedOptionFlag, MagickFalse },
1275     { "Style", MagickStyleOptions, UndefinedOptionFlag, MagickFalse },
1276     { "Threshold", MagickThresholdOptions, UndefinedOptionFlag, MagickFalse },
1277     { "Type", MagickTypeOptions, UndefinedOptionFlag, MagickFalse },
1278     { "Units", MagickResolutionOptions, UndefinedOptionFlag, MagickFalse },
1279     { "Undefined", MagickUndefinedOptions, UndefinedOptionFlag, MagickTrue },
1280     { "Validate", MagickValidateOptions, UndefinedOptionFlag, MagickFalse },
1281     { "VirtualPixel", MagickVirtualPixelOptions, UndefinedOptionFlag, MagickFalse },
1282     { (char *) NULL, MagickUndefinedOptions, UndefinedOptionFlag, MagickFalse }
1283   },
1284   LogEventOptions[] =
1285   {
1286     { "Undefined", UndefinedEvents, UndefinedOptionFlag, MagickTrue },
1287     { "All", (AllEvents &~ TraceEvent), UndefinedOptionFlag, MagickFalse },
1288     { "Accelerate", AccelerateEvent, UndefinedOptionFlag, MagickFalse },
1289     { "Annotate", AnnotateEvent, UndefinedOptionFlag, MagickFalse },
1290     { "Blob", BlobEvent, UndefinedOptionFlag, MagickFalse },
1291     { "Cache", CacheEvent, UndefinedOptionFlag, MagickFalse },
1292     { "Coder", CoderEvent, UndefinedOptionFlag, MagickFalse },
1293     { "Configure", ConfigureEvent, UndefinedOptionFlag, MagickFalse },
1294     { "Deprecate", DeprecateEvent, UndefinedOptionFlag, MagickFalse },
1295     { "Draw", DrawEvent, UndefinedOptionFlag, MagickFalse },
1296     { "Exception", ExceptionEvent, UndefinedOptionFlag, MagickFalse },
1297     { "Locale", LocaleEvent, UndefinedOptionFlag, MagickFalse },
1298     { "Module", ModuleEvent, UndefinedOptionFlag, MagickFalse },
1299     { "None", NoEvents, UndefinedOptionFlag, MagickFalse },
1300     { "Pixel", PixelEvent, UndefinedOptionFlag, MagickFalse },
1301     { "Policy", PolicyEvent, UndefinedOptionFlag, MagickFalse },
1302     { "Resource", ResourceEvent, UndefinedOptionFlag, MagickFalse },
1303     { "Trace", TraceEvent, UndefinedOptionFlag, MagickFalse },
1304     { "Transform", TransformEvent, UndefinedOptionFlag, MagickFalse },
1305     { "User", UserEvent, UndefinedOptionFlag, MagickFalse },
1306     { "Wand", WandEvent, UndefinedOptionFlag, MagickFalse },
1307     { "X11", X11Event, UndefinedOptionFlag, MagickFalse },
1308     { (char *) NULL, UndefinedEvents, UndefinedOptionFlag, MagickFalse }
1309   },
1310   MetricOptions[] =
1311   {
1312     { "Undefined", UndefinedMetric, UndefinedOptionFlag, MagickTrue },
1313     { "AE", AbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1314     { "Fuzz", FuzzErrorMetric, UndefinedOptionFlag, MagickFalse },
1315     { "MAE", MeanAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1316     { "MEPP", MeanErrorPerPixelMetric, UndefinedOptionFlag, MagickFalse },
1317     { "MSE", MeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1318     { "NCC", NormalizedCrossCorrelationErrorMetric, UndefinedOptionFlag, MagickFalse },
1319     { "PAE", PeakAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1320     { "PSNR", PeakSignalToNoiseRatioMetric, UndefinedOptionFlag, MagickFalse },
1321     { "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1322     { (char *) NULL, UndefinedMetric, UndefinedOptionFlag, MagickFalse }
1323   },
1324   MethodOptions[] =
1325   {
1326     { "Undefined", UndefinedMethod, UndefinedOptionFlag, MagickTrue },
1327     { "FillToBorder", FillToBorderMethod, UndefinedOptionFlag, MagickFalse },
1328     { "Floodfill", FloodfillMethod, UndefinedOptionFlag, MagickFalse },
1329     { "Point", PointMethod, UndefinedOptionFlag, MagickFalse },
1330     { "Replace", ReplaceMethod, UndefinedOptionFlag, MagickFalse },
1331     { "Reset", ResetMethod, UndefinedOptionFlag, MagickFalse },
1332     { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1333   },
1334   ModeOptions[] =
1335   {
1336     { "Undefined", UndefinedMode, UndefinedOptionFlag, MagickTrue },
1337     { "Concatenate", ConcatenateMode, UndefinedOptionFlag, MagickFalse },
1338     { "Frame", FrameMode, UndefinedOptionFlag, MagickFalse },
1339     { "Unframe", UnframeMode, UndefinedOptionFlag, MagickFalse },
1340     { (char *) NULL, UndefinedMode, UndefinedOptionFlag, MagickFalse }
1341   },
1342   MorphologyOptions[] =
1343   {
1344     { "Undefined", UndefinedMorphology, UndefinedOptionFlag, MagickTrue },
1345     { "Correlate", CorrelateMorphology, UndefinedOptionFlag, MagickFalse },
1346     { "Convolve", ConvolveMorphology, UndefinedOptionFlag, MagickFalse },
1347     { "Dilate", DilateMorphology, UndefinedOptionFlag, MagickFalse },
1348     { "Erode", ErodeMorphology, UndefinedOptionFlag, MagickFalse },
1349     { "Close", CloseMorphology, UndefinedOptionFlag, MagickFalse },
1350     { "Open", OpenMorphology, UndefinedOptionFlag, MagickFalse },
1351     { "DilateIntensity", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1352     { "ErodeIntensity", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1353     { "CloseIntensity", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1354     { "OpenIntensity", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1355     { "DilateI", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1356     { "ErodeI", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1357     { "CloseI", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1358     { "OpenI", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1359     { "Smooth", SmoothMorphology, UndefinedOptionFlag, MagickFalse },
1360     { "EdgeOut", EdgeOutMorphology, UndefinedOptionFlag, MagickFalse },
1361     { "EdgeIn", EdgeInMorphology, UndefinedOptionFlag, MagickFalse },
1362     { "Edge", EdgeMorphology, UndefinedOptionFlag, MagickFalse },
1363     { "TopHat", TopHatMorphology, UndefinedOptionFlag, MagickFalse },
1364     { "BottomHat", BottomHatMorphology, UndefinedOptionFlag, MagickFalse },
1365     { "Hmt", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1366     { "HitNMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1367     { "HitAndMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1368     { "Thinning", ThinningMorphology, UndefinedOptionFlag, MagickFalse },
1369     { "Thicken", ThickenMorphology, UndefinedOptionFlag, MagickFalse },
1370     { "Distance", DistanceMorphology, UndefinedOptionFlag, MagickFalse },
1371     { "IterativeDistance", IterativeDistanceMorphology, UndefinedOptionFlag, MagickFalse },
1372     { "Voronoi", VoronoiMorphology, UndefinedOptionFlag, MagickTrue },
1373     { (char *) NULL, UndefinedMorphology, UndefinedOptionFlag, MagickFalse }
1374   },
1375   NoiseOptions[] =
1376   {
1377     { "Undefined", UndefinedNoise, UndefinedOptionFlag, MagickTrue },
1378     { "Gaussian", GaussianNoise, UndefinedOptionFlag, MagickFalse },
1379     { "Impulse", ImpulseNoise, UndefinedOptionFlag, MagickFalse },
1380     { "Laplacian", LaplacianNoise, UndefinedOptionFlag, MagickFalse },
1381     { "Multiplicative", MultiplicativeGaussianNoise, UndefinedOptionFlag, MagickFalse },
1382     { "Poisson", PoissonNoise, UndefinedOptionFlag, MagickFalse },
1383     { "Random", RandomNoise, UndefinedOptionFlag, MagickFalse },
1384     { "Uniform", UniformNoise, UndefinedOptionFlag, MagickFalse },
1385     { (char *) NULL, UndefinedNoise, UndefinedOptionFlag, MagickFalse }
1386   },
1387   OrientationOptions[] =
1388   {
1389     { "Undefined", UndefinedOrientation, UndefinedOptionFlag, MagickTrue },
1390     { "TopLeft", TopLeftOrientation, UndefinedOptionFlag, MagickFalse },
1391     { "TopRight", TopRightOrientation, UndefinedOptionFlag, MagickFalse },
1392     { "BottomRight", BottomRightOrientation, UndefinedOptionFlag, MagickFalse },
1393     { "BottomLeft", BottomLeftOrientation, UndefinedOptionFlag, MagickFalse },
1394     { "LeftTop", LeftTopOrientation, UndefinedOptionFlag, MagickFalse },
1395     { "RightTop", RightTopOrientation, UndefinedOptionFlag, MagickFalse },
1396     { "RightBottom", RightBottomOrientation, UndefinedOptionFlag, MagickFalse },
1397     { "LeftBottom", LeftBottomOrientation, UndefinedOptionFlag, MagickFalse },
1398     { (char *) NULL, UndefinedOrientation, UndefinedOptionFlag, MagickFalse }
1399   },
1400   PixelChannelOptions[] =
1401   {
1402     { "Undefined", UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse },
1403     { "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
1404     { "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
1405     { "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1406     { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1407     { "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1408     { "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1409     { "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
1410     { "Composite", CompositePixelChannel, UndefinedOptionFlag, MagickFalse },
1411     { "C", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1412     { "Cr", CrPixelChannel, UndefinedOptionFlag, MagickFalse },
1413     { "Cyan", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1414     { "Gray", GrayPixelChannel, UndefinedOptionFlag, MagickFalse },
1415     { "G", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1416     { "Green", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1417     { "Index", IndexPixelChannel, UndefinedOptionFlag, MagickFalse },
1418     { "Intensity", IntensityPixelChannel, UndefinedOptionFlag, MagickFalse },
1419     { "K", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1420     { "M", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
1421     { "Magenta", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
1422     { "Mask", MaskPixelChannel, UndefinedOptionFlag, MagickFalse },
1423     { "R", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1424     { "Red", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1425     { "Sync", SyncPixelChannel, UndefinedOptionFlag, MagickFalse },
1426     { "Y", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1427     { "Yellow", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1428     { (char *) NULL, UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse }
1429   },
1430   PixelIntensityOptions[] =
1431   {
1432     { "Undefined", UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1433     { "Average", AveragePixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1434     { "Brightness", BrightnessPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1435     { "Lightness", LightnessPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1436     { "Rec601Luma", Rec601LumaPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1437     { "Rec601Luminance", Rec601LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1438     { "Rec709Luma", Rec709LumaPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1439     { "Rec709Luminance", Rec709LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1440     { "RMS", RMSPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
1441     { (char *) NULL, UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickFalse }
1442   },
1443   PixelTraitOptions[] =
1444   {
1445     { "Undefined", UndefinedPixelTrait, UndefinedOptionFlag, MagickTrue },
1446     { "Blend", BlendPixelTrait, UndefinedOptionFlag, MagickFalse },
1447     { "Copy", CopyPixelTrait, UndefinedOptionFlag, MagickFalse },
1448     { "Update", UpdatePixelTrait, UndefinedOptionFlag, MagickFalse },
1449     { (char *) NULL, UndefinedPixelTrait, UndefinedOptionFlag, MagickFalse }
1450   },
1451   PolicyDomainOptions[] =
1452   {
1453     { "Undefined", UndefinedPolicyDomain, UndefinedOptionFlag, MagickTrue },
1454     { "Coder", CoderPolicyDomain, UndefinedOptionFlag, MagickFalse },
1455     { "Delegate", DelegatePolicyDomain, UndefinedOptionFlag, MagickFalse },
1456     { "Filter", FilterPolicyDomain, UndefinedOptionFlag, MagickFalse },
1457     { "Path", PathPolicyDomain, UndefinedOptionFlag, MagickFalse },
1458     { "Resource", ResourcePolicyDomain, UndefinedOptionFlag, MagickFalse },
1459     { "System", SystemPolicyDomain, UndefinedOptionFlag, MagickFalse },
1460     { (char *) NULL, UndefinedPolicyDomain, UndefinedOptionFlag, MagickFalse }
1461   },
1462   PolicyRightsOptions[] =
1463   {
1464     { "Undefined", UndefinedPolicyRights, UndefinedOptionFlag, MagickTrue },
1465     { "None", NoPolicyRights, UndefinedOptionFlag, MagickFalse },
1466     { "Read", ReadPolicyRights, UndefinedOptionFlag, MagickFalse },
1467     { "Write", WritePolicyRights, UndefinedOptionFlag, MagickFalse },
1468     { "Execute", ExecutePolicyRights, UndefinedOptionFlag, MagickFalse },
1469     { (char *) NULL, UndefinedPolicyRights, UndefinedOptionFlag, MagickFalse }
1470   },
1471   PreviewOptions[] =
1472   {
1473     { "Undefined", UndefinedPreview, UndefinedOptionFlag, MagickTrue },
1474     { "AddNoise", AddNoisePreview, UndefinedOptionFlag, MagickFalse },
1475     { "Blur", BlurPreview, UndefinedOptionFlag, MagickFalse },
1476     { "Brightness", BrightnessPreview, UndefinedOptionFlag, MagickFalse },
1477     { "Charcoal", CharcoalDrawingPreview, UndefinedOptionFlag, MagickFalse },
1478     { "Despeckle", DespecklePreview, UndefinedOptionFlag, MagickFalse },
1479     { "Dull", DullPreview, UndefinedOptionFlag, MagickFalse },
1480     { "EdgeDetect", EdgeDetectPreview, UndefinedOptionFlag, MagickFalse },
1481     { "Gamma", GammaPreview, UndefinedOptionFlag, MagickFalse },
1482     { "Grayscale", GrayscalePreview, UndefinedOptionFlag, MagickFalse },
1483     { "Hue", HuePreview, UndefinedOptionFlag, MagickFalse },
1484     { "Implode", ImplodePreview, UndefinedOptionFlag, MagickFalse },
1485     { "JPEG", JPEGPreview, UndefinedOptionFlag, MagickFalse },
1486     { "OilPaint", OilPaintPreview, UndefinedOptionFlag, MagickFalse },
1487     { "Quantize", QuantizePreview, UndefinedOptionFlag, MagickFalse },
1488     { "Raise", RaisePreview, UndefinedOptionFlag, MagickFalse },
1489     { "ReduceNoise", ReduceNoisePreview, UndefinedOptionFlag, MagickFalse },
1490     { "Roll", RollPreview, UndefinedOptionFlag, MagickFalse },
1491     { "Rotate", RotatePreview, UndefinedOptionFlag, MagickFalse },
1492     { "Saturation", SaturationPreview, UndefinedOptionFlag, MagickFalse },
1493     { "Segment", SegmentPreview, UndefinedOptionFlag, MagickFalse },
1494     { "Shade", ShadePreview, UndefinedOptionFlag, MagickFalse },
1495     { "Sharpen", SharpenPreview, UndefinedOptionFlag, MagickFalse },
1496     { "Shear", ShearPreview, UndefinedOptionFlag, MagickFalse },
1497     { "Solarize", SolarizePreview, UndefinedOptionFlag, MagickFalse },
1498     { "Spiff", SpiffPreview, UndefinedOptionFlag, MagickFalse },
1499     { "Spread", SpreadPreview, UndefinedOptionFlag, MagickFalse },
1500     { "Swirl", SwirlPreview, UndefinedOptionFlag, MagickFalse },
1501     { "Threshold", ThresholdPreview, UndefinedOptionFlag, MagickFalse },
1502     { "Wave", WavePreview, UndefinedOptionFlag, MagickFalse },
1503     { (char *) NULL, UndefinedPreview, UndefinedOptionFlag, MagickFalse }
1504   },
1505   PrimitiveOptions[] =
1506   {
1507     { "Undefined", UndefinedPrimitive, UndefinedOptionFlag, MagickTrue },
1508     { "Arc", ArcPrimitive, UndefinedOptionFlag, MagickFalse },
1509     { "Bezier", BezierPrimitive, UndefinedOptionFlag, MagickFalse },
1510     { "Circle", CirclePrimitive, UndefinedOptionFlag, MagickFalse },
1511     { "Color", ColorPrimitive, UndefinedOptionFlag, MagickFalse },
1512     { "Ellipse", EllipsePrimitive, UndefinedOptionFlag, MagickFalse },
1513     { "Image", ImagePrimitive, UndefinedOptionFlag, MagickFalse },
1514     { "Line", LinePrimitive, UndefinedOptionFlag, MagickFalse },
1515     { "Matte", MattePrimitive, UndefinedOptionFlag, MagickFalse },
1516     { "Path", PathPrimitive, UndefinedOptionFlag, MagickFalse },
1517     { "Point", PointPrimitive, UndefinedOptionFlag, MagickFalse },
1518     { "Polygon", PolygonPrimitive, UndefinedOptionFlag, MagickFalse },
1519     { "Polyline", PolylinePrimitive, UndefinedOptionFlag, MagickFalse },
1520     { "Rectangle", RectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1521     { "RoundRectangle", RoundRectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1522     { "Text", TextPrimitive, UndefinedOptionFlag, MagickFalse },
1523     { (char *) NULL, UndefinedPrimitive, UndefinedOptionFlag, MagickFalse }
1524   },
1525   QuantumFormatOptions[] =
1526   {
1527     { "Undefined", UndefinedQuantumFormat, UndefinedOptionFlag, MagickTrue },
1528     { "FloatingPoint", FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse },
1529     { "Signed", SignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1530     { "Unsigned", UnsignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1531     { (char *) NULL, FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse }
1532   },
1533   ResolutionOptions[] =
1534   {
1535     { "Undefined", UndefinedResolution, UndefinedOptionFlag, MagickTrue },
1536     { "PixelsPerInch", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
1537     { "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
1538     { (char *) NULL, UndefinedResolution, UndefinedOptionFlag, MagickFalse }
1539   },
1540   ResourceOptions[] =
1541   {
1542     { "Undefined", UndefinedResource, UndefinedOptionFlag, MagickTrue },
1543     { "Area", AreaResource, UndefinedOptionFlag, MagickFalse },
1544     { "Disk", DiskResource, UndefinedOptionFlag, MagickFalse },
1545     { "File", FileResource, UndefinedOptionFlag, MagickFalse },
1546     { "Map", MapResource, UndefinedOptionFlag, MagickFalse },
1547     { "Memory", MemoryResource, UndefinedOptionFlag, MagickFalse },
1548     { "Thread", ThreadResource, UndefinedOptionFlag, MagickFalse },
1549     { "Time", TimeResource, UndefinedOptionFlag, MagickFalse },
1550     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1551   },
1552   SparseColorOptions[] =
1553   {
1554     { "Undefined", UndefinedDistortion, UndefinedOptionFlag, MagickTrue },
1555     { "Barycentric", BarycentricColorInterpolate, UndefinedOptionFlag, MagickFalse },
1556     { "Bilinear", BilinearColorInterpolate, UndefinedOptionFlag, MagickFalse },
1557     { "Inverse", InverseColorInterpolate, UndefinedOptionFlag, MagickFalse },
1558     { "Shepards", ShepardsColorInterpolate, UndefinedOptionFlag, MagickFalse },
1559     { "Voronoi", VoronoiColorInterpolate, UndefinedOptionFlag, MagickFalse },
1560     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1561   },
1562   StatisticOptions[] =
1563   {
1564     { "Undefined", UndefinedStatistic, UndefinedOptionFlag, MagickTrue },
1565     { "Gradient", GradientStatistic, UndefinedOptionFlag, MagickFalse },
1566     { "Maximum", MaximumStatistic, UndefinedOptionFlag, MagickFalse },
1567     { "Mean", MeanStatistic, UndefinedOptionFlag, MagickFalse },
1568     { "Median", MedianStatistic, UndefinedOptionFlag, MagickFalse },
1569     { "Minimum", MinimumStatistic, UndefinedOptionFlag, MagickFalse },
1570     { "Mode", ModeStatistic, UndefinedOptionFlag, MagickFalse },
1571     { "NonPeak", NonpeakStatistic, UndefinedOptionFlag, MagickFalse },
1572     { "StandardDeviation", StandardDeviationStatistic, UndefinedOptionFlag, MagickFalse },
1573     { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1574   },
1575   StorageOptions[] =
1576   {
1577     { "Undefined", UndefinedPixel, UndefinedOptionFlag, MagickTrue },
1578     { "Char", CharPixel, UndefinedOptionFlag, MagickFalse },
1579     { "Double", DoublePixel, UndefinedOptionFlag, MagickFalse },
1580     { "Float", FloatPixel, UndefinedOptionFlag, MagickFalse },
1581     { "Long", LongPixel, UndefinedOptionFlag, MagickFalse },
1582     { "LongLong", LongLongPixel, UndefinedOptionFlag, MagickFalse },
1583     { "Quantum", QuantumPixel, UndefinedOptionFlag, MagickFalse },
1584     { "Short", ShortPixel, UndefinedOptionFlag, MagickFalse },
1585     { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
1586   },
1587   StretchOptions[] =
1588   {
1589     { "Undefined", UndefinedStretch, UndefinedOptionFlag, MagickTrue },
1590     { "Any", AnyStretch, UndefinedOptionFlag, MagickFalse },
1591     { "Condensed", CondensedStretch, UndefinedOptionFlag, MagickFalse },
1592     { "Expanded", ExpandedStretch, UndefinedOptionFlag, MagickFalse },
1593     { "ExtraCondensed", ExtraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1594     { "ExtraExpanded", ExtraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1595     { "Normal", NormalStretch, UndefinedOptionFlag, MagickFalse },
1596     { "SemiCondensed", SemiCondensedStretch, UndefinedOptionFlag, MagickFalse },
1597     { "SemiExpanded", SemiExpandedStretch, UndefinedOptionFlag, MagickFalse },
1598     { "UltraCondensed", UltraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1599     { "UltraExpanded", UltraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1600     { (char *) NULL, UndefinedStretch, UndefinedOptionFlag, MagickFalse }
1601   },
1602   StyleOptions[] =
1603   {
1604     { "Undefined", UndefinedStyle, UndefinedOptionFlag, MagickTrue },
1605     { "Any", AnyStyle, UndefinedOptionFlag, MagickFalse },
1606     { "Italic", ItalicStyle, UndefinedOptionFlag, MagickFalse },
1607     { "Normal", NormalStyle, UndefinedOptionFlag, MagickFalse },
1608     { "Oblique", ObliqueStyle, UndefinedOptionFlag, MagickFalse },
1609     { (char *) NULL, UndefinedStyle, UndefinedOptionFlag, MagickFalse }
1610   },
1611   TypeOptions[] =
1612   {
1613     { "Undefined", UndefinedType, UndefinedOptionFlag, MagickTrue },
1614     { "Bilevel", BilevelType, UndefinedOptionFlag, MagickFalse },
1615     { "ColorSeparation", ColorSeparationType, UndefinedOptionFlag, MagickFalse },
1616     { "ColorSeparationAlpha", ColorSeparationMatteType, UndefinedOptionFlag, MagickFalse },
1617     { "ColorSeparationMatte", ColorSeparationMatteType, UndefinedOptionFlag, MagickFalse },
1618     { "Grayscale", GrayscaleType, UndefinedOptionFlag, MagickFalse },
1619     { "GrayscaleAlpha", GrayscaleMatteType, UndefinedOptionFlag, MagickFalse },
1620     { "GrayscaleMatte", GrayscaleMatteType, UndefinedOptionFlag, MagickFalse },
1621     { "Optimize", OptimizeType, UndefinedOptionFlag, MagickFalse },
1622     { "Palette", PaletteType, UndefinedOptionFlag, MagickFalse },
1623     { "PaletteBilevelAlpha", PaletteBilevelMatteType, UndefinedOptionFlag, MagickFalse },
1624     { "PaletteBilevelMatte", PaletteBilevelMatteType, UndefinedOptionFlag, MagickFalse },
1625     { "PaletteAlpha", PaletteMatteType, UndefinedOptionFlag, MagickFalse },
1626     { "PaletteMatte", PaletteMatteType, UndefinedOptionFlag, MagickFalse },
1627     { "TrueColorAlpha", TrueColorMatteType, UndefinedOptionFlag, MagickFalse },
1628     { "TrueColorMatte", TrueColorMatteType, UndefinedOptionFlag, MagickFalse },
1629     { "TrueColor", TrueColorType, UndefinedOptionFlag, MagickFalse },
1630     { (char *) NULL, UndefinedType, UndefinedOptionFlag, MagickFalse }
1631   },
1632   ValidateOptions[] =
1633   {
1634     { "Undefined", UndefinedValidate, UndefinedOptionFlag, MagickTrue },
1635     { "All", AllValidate, UndefinedOptionFlag, MagickFalse },
1636     { "Compare", CompareValidate, UndefinedOptionFlag, MagickFalse },
1637     { "Composite", CompositeValidate, UndefinedOptionFlag, MagickFalse },
1638     { "Convert", ConvertValidate, UndefinedOptionFlag, MagickFalse },
1639     { "FormatsInMemory", FormatsInMemoryValidate, UndefinedOptionFlag, MagickFalse },
1640     { "FormatsOnDisk", FormatsOnDiskValidate, UndefinedOptionFlag, MagickFalse },
1641     { "Identify", IdentifyValidate, UndefinedOptionFlag, MagickFalse },
1642     { "ImportExport", ImportExportValidate, UndefinedOptionFlag, MagickFalse },
1643     { "Montage", MontageValidate, UndefinedOptionFlag, MagickFalse },
1644     { "Stream", StreamValidate, UndefinedOptionFlag, MagickFalse },
1645     { "None", NoValidate, UndefinedOptionFlag, MagickFalse },
1646     { (char *) NULL, UndefinedValidate, UndefinedOptionFlag, MagickFalse }
1647   },
1648   VirtualPixelOptions[] =
1649   {
1650     { "Undefined", UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickTrue },
1651     { "Background", BackgroundVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1652     { "Black", BlackVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1653     { "Constant", BackgroundVirtualPixelMethod, DeprecateOptionFlag, MagickTrue },
1654     { "CheckerTile", CheckerTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1655     { "Dither", DitherVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1656     { "Edge", EdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1657     { "Gray", GrayVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1658     { "HorizontalTile", HorizontalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1659     { "HorizontalTileEdge", HorizontalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1660     { "Mirror", MirrorVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1661     { "None", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1662     { "Random", RandomVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1663     { "Tile", TileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1664     { "Transparent", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1665     { "VerticalTile", VerticalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1666     { "VerticalTileEdge", VerticalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1667     { "White", WhiteVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1668     { (char *) NULL, UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickFalse }
1669   };
1670 \f
1671 static const OptionInfo *GetOptionInfo(const CommandOption option)
1672 {
1673   switch (option)
1674   {
1675     case MagickAlignOptions: return(AlignOptions);
1676     case MagickAlphaChannelOptions: return(AlphaChannelOptions);
1677     case MagickBooleanOptions: return(BooleanOptions);
1678     case MagickCacheOptions: return(CacheOptions);
1679     case MagickChannelOptions: return(ChannelOptions);
1680     case MagickClassOptions: return(ClassOptions);
1681     case MagickClipPathOptions: return(ClipPathOptions);
1682     case MagickColorspaceOptions: return(ColorspaceOptions);
1683     case MagickCommandOptions: return(CommandOptions);
1684     case MagickComposeOptions: return(ComposeOptions);
1685     case MagickCompressOptions: return(CompressOptions);
1686     case MagickDataTypeOptions: return(DataTypeOptions);
1687     case MagickDebugOptions: return(LogEventOptions);
1688     case MagickDecorateOptions: return(DecorateOptions);
1689     case MagickDirectionOptions: return(DirectionOptions);
1690     case MagickDisposeOptions: return(DisposeOptions);
1691     case MagickDistortOptions: return(DistortOptions);
1692     case MagickDitherOptions: return(DitherOptions);
1693     case MagickEndianOptions: return(EndianOptions);
1694     case MagickEvaluateOptions: return(EvaluateOptions);
1695     case MagickFillRuleOptions: return(FillRuleOptions);
1696     case MagickFilterOptions: return(FilterOptions);
1697     case MagickFunctionOptions: return(FunctionOptions);
1698     case MagickGravityOptions: return(GravityOptions);
1699 /*  case MagickImageListOptions: return(ImageListOptions); */
1700     case MagickIntentOptions: return(IntentOptions);
1701     case MagickInterlaceOptions: return(InterlaceOptions);
1702     case MagickInterpolateOptions: return(InterpolateOptions);
1703     case MagickKernelOptions: return(KernelOptions);
1704     case MagickLayerOptions: return(LayerOptions);
1705     case MagickLineCapOptions: return(LineCapOptions);
1706     case MagickLineJoinOptions: return(LineJoinOptions);
1707     case MagickListOptions: return(ListOptions);
1708     case MagickLogEventOptions: return(LogEventOptions);
1709     case MagickMetricOptions: return(MetricOptions);
1710     case MagickMethodOptions: return(MethodOptions);
1711     case MagickModeOptions: return(ModeOptions);
1712     case MagickMorphologyOptions: return(MorphologyOptions);
1713     case MagickNoiseOptions: return(NoiseOptions);
1714     case MagickOrientationOptions: return(OrientationOptions);
1715     case MagickPixelChannelOptions: return(PixelChannelOptions);
1716     case MagickPixelIntensityOptions: return(PixelIntensityOptions);
1717     case MagickPixelTraitOptions: return(PixelTraitOptions);
1718     case MagickPolicyDomainOptions: return(PolicyDomainOptions);
1719     case MagickPolicyRightsOptions: return(PolicyRightsOptions);
1720     case MagickPreviewOptions: return(PreviewOptions);
1721     case MagickPrimitiveOptions: return(PrimitiveOptions);
1722     case MagickQuantumFormatOptions: return(QuantumFormatOptions);
1723     case MagickResolutionOptions: return(ResolutionOptions);
1724     case MagickResourceOptions: return(ResourceOptions);
1725     case MagickSparseColorOptions: return(SparseColorOptions);
1726     case MagickStatisticOptions: return(StatisticOptions);
1727     case MagickStorageOptions: return(StorageOptions);
1728     case MagickStretchOptions: return(StretchOptions);
1729     case MagickStyleOptions: return(StyleOptions);
1730     case MagickTypeOptions: return(TypeOptions);
1731     case MagickValidateOptions: return(ValidateOptions);
1732     case MagickVirtualPixelOptions: return(VirtualPixelOptions);
1733     default: break;
1734   }
1735   return((const OptionInfo *) NULL);
1736 }
1737 \f
1738 /*
1739 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1740 %                                                                             %
1741 %                                                                             %
1742 %                                                                             %
1743 %   C l o n e I m a g e O p t i o n s                                         %
1744 %                                                                             %
1745 %                                                                             %
1746 %                                                                             %
1747 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1748 %
1749 %  CloneImageOptions() clones all global image options, to another image_info
1750 %
1751 %  The format of the CloneImageOptions method is:
1752 %
1753 %      MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1754 %        const ImageInfo *clone_info)
1755 %
1756 %  A description of each parameter follows:
1757 %
1758 %    o image_info: the image info to recieve the cloned options.
1759 %
1760 %    o clone_info: the source image info for options to clone.
1761 %
1762 */
1763 MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1764   const ImageInfo *clone_info)
1765 {
1766   assert(image_info != (ImageInfo *) NULL);
1767   assert(image_info->signature == MagickSignature);
1768   if (image_info->debug != MagickFalse)
1769     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1770       image_info->filename);
1771   assert(clone_info != (const ImageInfo *) NULL);
1772   assert(clone_info->signature == MagickSignature);
1773   if (clone_info->options != (void *) NULL)
1774     image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
1775       (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
1776   return(MagickTrue);
1777 }
1778 \f
1779 /*
1780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1781 %                                                                             %
1782 %                                                                             %
1783 %                                                                             %
1784 %   D e f i n e I m a g e O p t i o n                                         %
1785 %                                                                             %
1786 %                                                                             %
1787 %                                                                             %
1788 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1789 %
1790 %  DefineImageOption() associates an assignment string of the form
1791 %  "key=value" with a global image option. It is equivelent to
1792 %  SetImageOption().
1793 %
1794 %  The format of the DefineImageOption method is:
1795 %
1796 %      MagickBooleanType DefineImageOption(ImageInfo *image_info,
1797 %        const char *option)
1798 %
1799 %  A description of each parameter follows:
1800 %
1801 %    o image_info: the image info.
1802 %
1803 %    o option: the image option assignment string.
1804 %
1805 */
1806 MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
1807   const char *option)
1808 {
1809   char
1810     key[MaxTextExtent],
1811     value[MaxTextExtent];
1812
1813   register char
1814     *p;
1815
1816   assert(image_info != (ImageInfo *) NULL);
1817   assert(option != (const char *) NULL);
1818   (void) CopyMagickString(key,option,MaxTextExtent);
1819   for (p=key; *p != '\0'; p++)
1820     if (*p == '=')
1821       break;
1822   *value='\0';
1823   if (*p == '=')
1824     (void) CopyMagickString(value,p+1,MaxTextExtent);
1825   *p='\0';
1826   return(SetImageOption(image_info,key,value));
1827 }
1828 \f
1829 /*
1830 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1831 %                                                                             %
1832 %                                                                             %
1833 %                                                                             %
1834 %   D e l e t e I m a g e O p t i o n                                         %
1835 %                                                                             %
1836 %                                                                             %
1837 %                                                                             %
1838 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1839 %
1840 %  DeleteImageOption() deletes an key from the global image options.
1841 %
1842 %  Returns MagickTrue is the option is found and deleted from the Options.
1843 %
1844 %  The format of the DeleteImageOption method is:
1845 %
1846 %      MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1847 %        const char *key)
1848 %
1849 %  A description of each parameter follows:
1850 %
1851 %    o image_info: the image info.
1852 %
1853 %    o option: the image option.
1854 %
1855 */
1856 MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1857   const char *option)
1858 {
1859   assert(image_info != (ImageInfo *) NULL);
1860   assert(image_info->signature == MagickSignature);
1861   if (image_info->debug != MagickFalse)
1862     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1863       image_info->filename);
1864   if (image_info->options == (void *) NULL)
1865     return(MagickFalse);
1866   return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
1867 }
1868 \f
1869 /*
1870 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1871 %                                                                             %
1872 %                                                                             %
1873 %                                                                             %
1874 %   D e s t r o y I m a g e O p t i o n s                                     %
1875 %                                                                             %
1876 %                                                                             %
1877 %                                                                             %
1878 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1879 %
1880 %  DestroyImageOptions() destroys all global options and associated memory
1881 %  attached to the given image_info image list.
1882 %
1883 %  The format of the DestroyDefines method is:
1884 %
1885 %      void DestroyImageOptions(ImageInfo *image_info)
1886 %
1887 %  A description of each parameter follows:
1888 %
1889 %    o image_info: the image info.
1890 %
1891 */
1892 MagickExport void DestroyImageOptions(ImageInfo *image_info)
1893 {
1894   assert(image_info != (ImageInfo *) NULL);
1895   assert(image_info->signature == MagickSignature);
1896   if (image_info->debug != MagickFalse)
1897     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1898       image_info->filename);
1899   if (image_info->options != (void *) NULL)
1900     image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
1901 }
1902 \f
1903 /*
1904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1905 %                                                                             %
1906 %                                                                             %
1907 %                                                                             %
1908 %   G e t I m a g e O p t i o n                                               %
1909 %                                                                             %
1910 %                                                                             %
1911 %                                                                             %
1912 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1913 %
1914 %  GetImageOption() gets a value associated with the global image options.
1915 %
1916 %  The returned string is a constant string in the tree and should NOT be
1917 %  freed by the caller.
1918 %
1919 %  The format of the GetImageOption method is:
1920 %
1921 %      const char *GetImageOption(const ImageInfo *image_info,
1922 %        const char *option)
1923 %
1924 %  A description of each parameter follows:
1925 %
1926 %    o image_info: the image info.
1927 %
1928 %    o option: the option.
1929 %
1930 */
1931 MagickExport const char *GetImageOption(const ImageInfo *image_info,
1932   const char *option)
1933 {
1934   assert(image_info != (ImageInfo *) NULL);
1935   assert(image_info->signature == MagickSignature);
1936   if (image_info->debug != MagickFalse)
1937     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1938       image_info->filename);
1939   if (image_info->options == (void *) NULL)
1940     return((const char *) NULL);
1941   return((const char *) GetValueFromSplayTree((SplayTreeInfo *)
1942     image_info->options,option));
1943 }
1944 \f
1945 /*
1946 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1947 %                                                                             %
1948 %                                                                             %
1949 %                                                                             %
1950 %   G e t C o m m a n d O p t i o n F l a g s                                 %
1951 %                                                                             %
1952 %                                                                             %
1953 %                                                                             %
1954 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1955 %
1956 %  GetCommandOptionFlags() parses a string and returns an enumerated option
1957 %  flags(s).  Return a value of -1 if no such option is found.
1958 %
1959 %  The format of the GetCommandOptionFlags method is:
1960 %
1961 %      ssize_t GetCommandOptionFlags(const CommandOption option,
1962 %        const MagickBooleanType list,const char *options)
1963 %
1964 %  A description of each parameter follows:
1965 %
1966 %    o option: Index to the option table to lookup
1967 %
1968 %    o list: A option other than zero permits more than one option separated by
1969 %      a comma or pipe.
1970 %
1971 %    o options: One or more options separated by commas.
1972 %
1973 */
1974
1975 MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
1976   const MagickBooleanType list,const char *options)
1977 {
1978   char
1979     token[MaxTextExtent];
1980
1981   const OptionInfo
1982     *option_info;
1983
1984   int
1985     sentinel;
1986
1987   MagickBooleanType
1988     negate;
1989
1990   register char
1991     *q;
1992
1993   register const char
1994     *p;
1995
1996   register ssize_t
1997     i;
1998
1999   ssize_t
2000     option_types;
2001
2002   option_info=GetOptionInfo(option);
2003   if (option_info == (const OptionInfo *) NULL)
2004     return(UndefinedOptionFlag);
2005   option_types=0;
2006   sentinel=',';
2007   if (strchr(options,'|') != (char *) NULL)
2008     sentinel='|';
2009   for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2010   {
2011     while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2012            (*p != '\0'))
2013       p++;
2014     negate=(*p == '!') ? MagickTrue : MagickFalse;
2015     if (negate != MagickFalse)
2016       p++;
2017     q=token;
2018     while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2019            (*p != '\0'))
2020     {
2021       if ((q-token) >= (MaxTextExtent-1))
2022         break;
2023       *q++=(*p++);
2024     }
2025     *q='\0';
2026     for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2027       if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2028         {
2029           if (*token == '!')
2030             option_types=option_types &~ option_info[i].flags;
2031           else
2032             option_types=option_types | option_info[i].flags;
2033           break;
2034         }
2035     if ((option_info[i].mnemonic == (char *) NULL) &&
2036         ((strchr(token+1,'-') != (char *) NULL) ||
2037          (strchr(token+1,'_') != (char *) NULL)))
2038       {
2039         while ((q=strchr(token+1,'-')) != (char *) NULL)
2040           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2041         while ((q=strchr(token+1,'_')) != (char *) NULL)
2042           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2043         for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2044           if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2045             {
2046               if (*token == '!')
2047                 option_types=option_types &~ option_info[i].flags;
2048               else
2049                 option_types=option_types | option_info[i].flags;
2050               break;
2051             }
2052       }
2053     if (option_info[i].mnemonic == (char *) NULL)
2054       return(-1);
2055     if (list == MagickFalse)
2056       break;
2057   }
2058   return(option_types);
2059 }
2060 \f
2061 /*
2062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2063 %                                                                             %
2064 %                                                                             %
2065 %                                                                             %
2066 %   G e t C o m m a n d O p t i o n I n f o                                   %
2067 %                                                                             %
2068 %                                                                             %
2069 %                                                                             %
2070 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2071 %
2072 %  GetCommandOptionInfo() returns pointer to the matching OptionInfo entry
2073 %  for the "CommandOptions" table only. A specialised binary search is used,
2074 %  to speed up the lookup for that very large table, and returns both the
2075 %  type (arg count) and flags (arg type).
2076 %
2077 %  This search reduces linear search of over 500 options (250 tests on
2078 %  average) to about 10 lookups!
2079 %
2080 %  The format of the GetCommandOptionInfo method is:
2081 %
2082 %      const char **GetCommandOptions(const CommandOption value)
2083 %
2084 %  A description of each parameter follows:
2085 %
2086 %    o value: the value.
2087 %
2088 */
2089 MagickExport const OptionInfo *GetCommandOptionInfo(const char *value)
2090 {
2091   const OptionInfo
2092     *option_info=CommandOptions;
2093
2094   static ssize_t
2095     table_size = 0;
2096
2097   register int
2098     i,l,h;
2099
2100   assert(value != (char *) NULL);
2101   assert(*value != '\0');
2102
2103   /* count up table items - first time only */
2104   if ( table_size == 0 )
2105     {
2106       l=-1;
2107       for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2108         if ( LocaleCompare(value,option_info[i].mnemonic) == 0 )
2109           l=i;
2110       table_size = i;
2111       return( &option_info[(l>=0)?l:i] );
2112     }
2113
2114   /* faster binary search of command table, now that its length is known */
2115   l=0;
2116   h=table_size;
2117   while ( l < h )
2118   {
2119     int cmp;
2120     i = (l+h)/2; /* half the bounds */
2121     /* compare string part, then switch character! */
2122     cmp=LocaleCompare(value+1,option_info[i].mnemonic+1);
2123     if ( cmp == 0 )
2124       cmp = *value - *(option_info[i].mnemonic);
2125 #if 0
2126     (void) FormatLocaleFile(stderr,
2127       "%d --- %u < %u < %u --- \"%s\" < \"%s\" < \"%s\"\n",
2128       cmp,l,i,h,option_info[l].mnemonic,option_info[i].mnemonic,
2129       option_info[h].mnemonic);
2130 #endif
2131     if (cmp == 0)
2132       return(&option_info[i]);
2133     if (cmp > 0) l=i+1; else h=i;  /* reassign search bounds */
2134   }
2135   /* option was not found in table - return last 'null' entry. */
2136   return(&option_info[table_size]);
2137 }
2138 \f
2139 /*
2140 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2141 %                                                                             %
2142 %                                                                             %
2143 %                                                                             %
2144 %   G e t C o m m a n d O p t i o n s                                         %
2145 %                                                                             %
2146 %                                                                             %
2147 %                                                                             %
2148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2149 %
2150 %  GetCommandOptions() returns a list of values.
2151 %
2152 %  The format of the GetCommandOptions method is:
2153 %
2154 %      const char **GetCommandOptions(const CommandOption value)
2155 %
2156 %  A description of each parameter follows:
2157 %
2158 %    o value: the value.
2159 %
2160 */
2161 MagickExport char **GetCommandOptions(const CommandOption value)
2162 {
2163   char
2164     **values;
2165
2166   const OptionInfo
2167     *option_info;
2168
2169   register ssize_t
2170     i;
2171
2172   option_info=GetOptionInfo(value);
2173   if (option_info == (const OptionInfo *) NULL)
2174     return((char **) NULL);
2175   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
2176   values=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*values));
2177   if (values == (char **) NULL)
2178     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
2179   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2180     values[i]=AcquireString(option_info[i].mnemonic);
2181   values[i]=(char *) NULL;
2182   return(values);
2183 }
2184 \f
2185 /*
2186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2187 %                                                                             %
2188 %                                                                             %
2189 %                                                                             %
2190 %   G e t N e x t I m a g e O p t i o n                                       %
2191 %                                                                             %
2192 %                                                                             %
2193 %                                                                             %
2194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2195 %
2196 %  GetNextImageOption() gets the next global option value.
2197 %
2198 %  The format of the GetNextImageOption method is:
2199 %
2200 %      char *GetNextImageOption(const ImageInfo *image_info)
2201 %
2202 %  A description of each parameter follows:
2203 %
2204 %    o image_info: the image info.
2205 %
2206 */
2207 MagickExport char *GetNextImageOption(const ImageInfo *image_info)
2208 {
2209   assert(image_info != (ImageInfo *) NULL);
2210   assert(image_info->signature == MagickSignature);
2211   if (image_info->debug != MagickFalse)
2212     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2213       image_info->filename);
2214   if (image_info->options == (void *) NULL)
2215     return((char *) NULL);
2216   return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
2217 }
2218 \f
2219 /*
2220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2221 %                                                                             %
2222 %                                                                             %
2223 %                                                                             %
2224 %     I s C o m m a n d O p t i o n                                           %
2225 %                                                                             %
2226 %                                                                             %
2227 %                                                                             %
2228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2229 %
2230 %  IsCommandOption() returns MagickTrue if the option begins with a - or + and
2231 %  the first character that follows is alphanumeric.
2232 %
2233 %  The format of the IsCommandOption method is:
2234 %
2235 %      MagickBooleanType IsCommandOption(const char *option)
2236 %
2237 %  A description of each parameter follows:
2238 %
2239 %    o option: the option.
2240 %
2241 */
2242 MagickExport MagickBooleanType IsCommandOption(const char *option)
2243 {
2244   assert(option != (const char *) NULL);
2245   if ((*option != '-') && (*option != '+'))
2246     return(MagickFalse);
2247   if (strlen(option) == 1)
2248     return(IsMagickTrue( (*option == '{') || (*option == '}')
2249                       || (*option == '[') || (*option == ']') ));
2250   option++;
2251   if (*option == '-')
2252     return(MagickTrue);
2253   if (isalpha((int) ((unsigned char) *option)) == 0)
2254     return(MagickFalse);
2255   return(MagickTrue);
2256 }
2257 \f
2258 /*
2259 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2260 %                                                                             %
2261 %                                                                             %
2262 %                                                                             %
2263 %   C o m m a n d O p t i o n T o M n e m o n i c                             %
2264 %                                                                             %
2265 %                                                                             %
2266 %                                                                             %
2267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2268 %
2269 %  CommandOptionToMnemonic() returns an enumerated value as a mnemonic.
2270 %
2271 %  The format of the CommandOptionToMnemonic method is:
2272 %
2273 %      const char *CommandOptionToMnemonic(const CommandOption option,
2274 %        const ssize_t type)
2275 %
2276 %  A description of each parameter follows:
2277 %
2278 %    o option: the option.
2279 %
2280 %    o type: one or more values separated by commas.
2281 %
2282 */
2283 MagickExport const char *CommandOptionToMnemonic(const CommandOption option,
2284   const ssize_t type)
2285 {
2286   const OptionInfo
2287     *option_info;
2288
2289   register ssize_t
2290     i;
2291
2292   option_info=GetOptionInfo(option);
2293   if (option_info == (const OptionInfo *) NULL)
2294     return((const char *) NULL);
2295   for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2296     if (type == option_info[i].type)
2297       break;
2298   if (option_info[i].mnemonic == (const char *) NULL)
2299     return("undefined");
2300   return(option_info[i].mnemonic);
2301 }
2302 \f
2303 /*
2304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2305 %                                                                             %
2306 %                                                                             %
2307 %                                                                             %
2308 %   L i s t C o m m a n d O p t i o n s                                       %
2309 %                                                                             %
2310 %                                                                             %
2311 %                                                                             %
2312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2313 %
2314 %  ListCommandOptions() lists the contents of enumerated option type(s).
2315 %
2316 %  The format of the ListCommandOptions method is:
2317 %
2318 %      MagickBooleanType ListCommandOptions(FILE *file,
2319 %        const CommandOption option,ExceptionInfo *exception)
2320 %
2321 %  A description of each parameter follows:
2322 %
2323 %    o file:  list options to this file handle.
2324 %
2325 %    o option:  list these options.
2326 %
2327 %    o exception:  return any errors or warnings in this structure.
2328 %
2329 */
2330 MagickExport MagickBooleanType ListCommandOptions(FILE *file,
2331   const CommandOption option,ExceptionInfo *magick_unused(exception))
2332 {
2333   const OptionInfo
2334     *option_info;
2335
2336   register ssize_t
2337     i;
2338
2339   if (file == (FILE *) NULL)
2340     file=stdout;
2341   option_info=GetOptionInfo(option);
2342   if (option_info == (const OptionInfo *) NULL)
2343     return(MagickFalse);
2344   for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2345   {
2346     if (option_info[i].stealth != MagickFalse)
2347       continue;
2348     (void) FormatLocaleFile(file,"%s\n",option_info[i].mnemonic);
2349   }
2350   return(MagickTrue);
2351 }
2352 \f
2353 /*
2354 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2355 %                                                                             %
2356 %                                                                             %
2357 %                                                                             %
2358 %   P a r s e C h a n n e l O p t i o n                                       %
2359 %                                                                             %
2360 %                                                                             %
2361 %                                                                             %
2362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2363 %
2364 %  ParseChannelOption() parses a string and returns an enumerated channel
2365 %  type(s).
2366 %
2367 %  The format of the ParseChannelOption method is:
2368 %
2369 %      ssize_t ParseChannelOption(const char *channels)
2370 %
2371 %  A description of each parameter follows:
2372 %
2373 %    o options: One or more values separated by commas.
2374 %
2375 */
2376 MagickExport ssize_t ParseChannelOption(const char *channels)
2377 {
2378   register ssize_t
2379     i;
2380
2381   ssize_t
2382     channel;
2383
2384   channel=ParseCommandOption(MagickChannelOptions,MagickTrue,channels);
2385   if (channel >= 0)
2386     return(channel);
2387   channel=0;
2388   for (i=0; i < (ssize_t) strlen(channels); i++)
2389   {
2390     switch (channels[i])
2391     {
2392       case 'A':
2393       case 'a':
2394       {
2395         channel|=AlphaChannel;
2396         break;
2397       }
2398       case 'B':
2399       case 'b':
2400       {
2401         channel|=BlueChannel;
2402         break;
2403       }
2404       case 'C':
2405       case 'c':
2406       {
2407         channel|=CyanChannel;
2408         break;
2409       }
2410       case 'g':
2411       case 'G':
2412       {
2413         channel|=GreenChannel;
2414         break;
2415       }
2416       case 'K':
2417       case 'k':
2418       {
2419         channel|=BlackChannel;
2420         break;
2421       }
2422       case 'M':
2423       case 'm':
2424       {
2425         channel|=MagentaChannel;
2426         break;
2427       }
2428       case 'o':
2429       case 'O':
2430       {
2431         channel|=AlphaChannel; /* depreciate */
2432         break;
2433       }
2434       case 'R':
2435       case 'r':
2436       {
2437         channel|=RedChannel;
2438         break;
2439       }
2440       case 'Y':
2441       case 'y':
2442       {
2443         channel|=YellowChannel;
2444         break;
2445       }
2446       case ',':
2447       {
2448         ssize_t
2449           type;
2450
2451         /*
2452           Gather the additional channel flags and merge with shorthand.
2453         */
2454         type=ParseCommandOption(MagickChannelOptions,MagickTrue,channels+i+1);
2455         if (type < 0)
2456           return(type);
2457         channel|=type;
2458         return(channel);
2459       }
2460       default:
2461         return(-1);
2462     }
2463   }
2464   return(channel);
2465 }
2466 \f
2467 /*
2468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2469 %                                                                             %
2470 %                                                                             %
2471 %                                                                             %
2472 %   P a r s e C o m m a n d O p t i o n                                       %
2473 %                                                                             %
2474 %                                                                             %
2475 %                                                                             %
2476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2477 %
2478 %  ParseCommandOption() parses a string and returns an enumerated option
2479 %  type(s).  Return a value of -1 if no such option is found.
2480 %
2481 %  The format of the ParseCommandOption method is:
2482 %
2483 %      ssize_t ParseCommandOption(const CommandOption option_table,
2484 %        const MagickBooleanType list,const char *options)
2485 %
2486 %  A description of each parameter follows:
2487 %
2488 %    o option_table: Index to the option table to lookup
2489 %
2490 %    o list: A option other than zero permits more than one option separated by
2491 %      a comma or pipe.
2492 %
2493 %    o options: One or more options separated by commas.
2494 %
2495 */
2496 MagickExport ssize_t ParseCommandOption(const CommandOption option_table,
2497   const MagickBooleanType list,const char *options)
2498 {
2499   char
2500     token[MaxTextExtent];
2501
2502   const OptionInfo
2503     *option_info;
2504
2505   int
2506     sentinel;
2507
2508   MagickBooleanType
2509     negate;
2510
2511   register char
2512     *q;
2513
2514   register const char
2515     *p;
2516
2517   register ssize_t
2518     i;
2519
2520   ssize_t
2521     option_types;
2522
2523   option_info=GetOptionInfo(option_table);
2524   if (option_info == (const OptionInfo *) NULL)
2525     return(-1);
2526   option_types=0;
2527   sentinel=',';
2528   if (strchr(options,'|') != (char *) NULL)
2529     sentinel='|';
2530   for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2531   {
2532     while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2533            (*p != '\0'))
2534       p++;
2535     negate=(*p == '!') ? MagickTrue : MagickFalse;
2536     if (negate != MagickFalse)
2537       p++;
2538     q=token;
2539     while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2540            (*p != '\0'))
2541     {
2542       if ((q-token) >= (MaxTextExtent-1))
2543         break;
2544       *q++=(*p++);
2545     }
2546     *q='\0';
2547     for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2548       if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2549         {
2550           if (*token == '!')
2551             option_types=option_types &~ option_info[i].type;
2552           else
2553             option_types=option_types | option_info[i].type;
2554           break;
2555         }
2556     if ((option_info[i].mnemonic == (char *) NULL) &&
2557         ((strchr(token+1,'-') != (char *) NULL) ||
2558          (strchr(token+1,'_') != (char *) NULL)))
2559       {
2560         while ((q=strchr(token+1,'-')) != (char *) NULL)
2561           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2562         while ((q=strchr(token+1,'_')) != (char *) NULL)
2563           (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2564         for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2565           if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2566             {
2567               if (*token == '!')
2568                 option_types=option_types &~ option_info[i].type;
2569               else
2570                 option_types=option_types | option_info[i].type;
2571               break;
2572             }
2573       }
2574     if (option_info[i].mnemonic == (char *) NULL)
2575       return(-1);
2576     if (list == MagickFalse)
2577       break;
2578   }
2579   return(option_types);
2580 }
2581 \f
2582 /*
2583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2584 %                                                                             %
2585 %                                                                             %
2586 %                                                                             %
2587 %   P a r s e P i x e l C h a n n e l O p t i o n                             %
2588 %                                                                             %
2589 %                                                                             %
2590 %                                                                             %
2591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2592 %
2593 %  ParsePixelChannelOption() parses a string and returns an enumerated pixel
2594 %  channel type(s).
2595 %
2596 %  The format of the ParsePixelChannelOption method is:
2597 %
2598 %      ssize_t ParsePixelChannelOption(const char *channels)
2599 %
2600 %  A description of each parameter follows:
2601 %
2602 %    o channels: One or more channels separated by commas.
2603 %
2604 */
2605 MagickExport ssize_t ParsePixelChannelOption(const char *channels)
2606 {
2607   char
2608     *q,
2609     token[MaxTextExtent];
2610
2611   ssize_t
2612     channel;
2613
2614   GetMagickToken(channels,NULL,token);
2615   if ((*token == ';') || (*token == '|'))
2616     return(RedPixelChannel);
2617   channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
2618   if (channel >= 0)
2619     return(channel);
2620   q=(char *) token;
2621   channel=InterpretLocaleValue(token,&q);
2622   if ((q == token) || (channel < 0) || (channel >= MaxPixelChannels))
2623     return(-1);
2624   return(channel);
2625 }
2626 \f
2627 /*
2628 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2629 %                                                                             %
2630 %                                                                             %
2631 %                                                                             %
2632 %   R e m o v e I m a g e O p t i o n                                         %
2633 %                                                                             %
2634 %                                                                             %
2635 %                                                                             %
2636 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2637 %
2638 %  RemoveImageOption() removes an option from the image and returns its value.
2639 %
2640 %  In this case the ConstantString() value returned should be freed by the
2641 %  caller when finished.
2642 %
2643 %  The format of the RemoveImageOption method is:
2644 %
2645 %      char *RemoveImageOption(ImageInfo *image_info,const char *option)
2646 %
2647 %  A description of each parameter follows:
2648 %
2649 %    o image_info: the image info.
2650 %
2651 %    o option: the image option.
2652 %
2653 */
2654 MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
2655 {
2656   char
2657     *value;
2658
2659   assert(image_info != (ImageInfo *) NULL);
2660   assert(image_info->signature == MagickSignature);
2661   if (image_info->debug != MagickFalse)
2662     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2663       image_info->filename);
2664   if (image_info->options == (void *) NULL)
2665     return((char *) NULL);
2666   value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
2667     image_info->options,option);
2668   return(value);
2669 }
2670 \f
2671 /*
2672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2673 %                                                                             %
2674 %                                                                             %
2675 %                                                                             %
2676 %   R e s e t I m a g e O p t i o n                                           %
2677 %                                                                             %
2678 %                                                                             %
2679 %                                                                             %
2680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2681 %
2682 %  ResetImageOptions() resets the image_info option.  That is, it deletes
2683 %  all global options associated with the image_info structure.
2684 %
2685 %  The format of the ResetImageOptions method is:
2686 %
2687 %      ResetImageOptions(ImageInfo *image_info)
2688 %
2689 %  A description of each parameter follows:
2690 %
2691 %    o image_info: the image info.
2692 %
2693 */
2694 MagickExport void ResetImageOptions(const ImageInfo *image_info)
2695 {
2696   assert(image_info != (ImageInfo *) NULL);
2697   assert(image_info->signature == MagickSignature);
2698   if (image_info->debug != MagickFalse)
2699     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2700       image_info->filename);
2701   if (image_info->options == (void *) NULL)
2702     return;
2703   ResetSplayTree((SplayTreeInfo *) image_info->options);
2704 }
2705 \f
2706 /*
2707 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2708 %                                                                             %
2709 %                                                                             %
2710 %                                                                             %
2711 %   R e s e t I m a g e O p t i o n I t e r a t o r                           %
2712 %                                                                             %
2713 %                                                                             %
2714 %                                                                             %
2715 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2716 %
2717 %  ResetImageOptionIterator() resets the image_info values iterator.  Use it
2718 %  in conjunction with GetNextImageOption() to iterate over all the values
2719 %  associated with an image option.
2720 %
2721 %  The format of the ResetImageOptionIterator method is:
2722 %
2723 %      ResetImageOptionIterator(ImageInfo *image_info)
2724 %
2725 %  A description of each parameter follows:
2726 %
2727 %    o image_info: the image info.
2728 %
2729 */
2730 MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
2731 {
2732   assert(image_info != (ImageInfo *) NULL);
2733   assert(image_info->signature == MagickSignature);
2734   if (image_info->debug != MagickFalse)
2735     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2736       image_info->filename);
2737   if (image_info->options == (void *) NULL)
2738     return;
2739   ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
2740 }
2741 \f
2742 /*
2743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2744 %                                                                             %
2745 %                                                                             %
2746 %                                                                             %
2747 %   S e t I m a g e O p t i o n                                               %
2748 %                                                                             %
2749 %                                                                             %
2750 %                                                                             %
2751 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2752 %
2753 %  SetImageOption() associates an value with an image option.
2754 %
2755 %  The format of the SetImageOption method is:
2756 %
2757 %      MagickBooleanType SetImageOption(ImageInfo *image_info,
2758 %        const char *option,const char *value)
2759 %
2760 %  A description of each parameter follows:
2761 %
2762 %    o image_info: the image info.
2763 %
2764 %    o option: the image option.
2765 %
2766 %    o values: the image option values.
2767 %
2768 */
2769 MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
2770   const char *option,const char *value)
2771 {
2772   assert(image_info != (ImageInfo *) NULL);
2773   assert(image_info->signature == MagickSignature);
2774   if (image_info->debug != MagickFalse)
2775     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2776       image_info->filename);
2777
2778   /* Specific global option settings */
2779   if (LocaleCompare(option,"size") == 0)
2780     (void) CloneString(&image_info->size,value);
2781
2782   /* create tree if needed - specify how key,values are to be freed */
2783   if (image_info->options == (void *) NULL)
2784     image_info->options=NewSplayTree(CompareSplayTreeString,
2785       RelinquishMagickMemory,RelinquishMagickMemory);
2786
2787   /* Delete Option if NULL --  empty string values are valid! */
2788   if (value == (const char *) NULL)
2789     return(DeleteImageOption(image_info,option));
2790
2791   /* add option to splay-tree */
2792   return(AddValueToSplayTree((SplayTreeInfo *) image_info->options,
2793     ConstantString(option),ConstantString(value)));
2794 }