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