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