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