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