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