MagickCore  7.0.8
Convert, Edit, Or Compose Bitmap Images
option.c
Go to the documentation of this file.
1 /*
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % %
4 % %
5 % %
6 % OOO PPPP TTTTT IIIII OOO N N %
7 % O O P P T I O O NN N %
8 % O O PPPP T I O O N N N %
9 % O O P T I O O N NN %
10 % OOO P T IIIII OOO N N %
11 % %
12 % %
13 % MagickCore Option Methods %
14 % %
15 % Software Design %
16 % Cristy %
17 % March 2000 %
18 % %
19 % %
20 % Copyright 1999-2018 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 % https://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 
40 /*
41  Include declarations.
42 */
43 #include "MagickCore/studio.h"
44 #include "MagickCore/artifact.h"
45 #include "MagickCore/cache.h"
46 #include "MagickCore/color.h"
47 #include "MagickCore/compare.h"
48 #include "MagickCore/constitute.h"
49 #include "MagickCore/distort.h"
50 #include "MagickCore/draw.h"
51 #include "MagickCore/effect.h"
52 #include "MagickCore/exception.h"
54 #include "MagickCore/fourier.h"
55 #include "MagickCore/fx.h"
56 #include "MagickCore/gem.h"
57 #include "MagickCore/geometry.h"
58 #include "MagickCore/image.h"
60 #include "MagickCore/layer.h"
62 #include "MagickCore/memory_.h"
63 #include "MagickCore/monitor.h"
64 #include "MagickCore/montage.h"
65 #include "MagickCore/morphology.h"
66 #include "MagickCore/option.h"
68 #include "MagickCore/pixel.h"
69 #include "MagickCore/policy.h"
70 #include "MagickCore/property.h"
71 #include "MagickCore/quantize.h"
72 #include "MagickCore/quantum.h"
73 #include "MagickCore/resample.h"
74 #include "MagickCore/resource_.h"
75 #include "MagickCore/splay-tree.h"
76 #include "MagickCore/statistic.h"
77 #include "MagickCore/string_.h"
78 #include "MagickCore/threshold.h"
79 #include "MagickCore/token.h"
80 #include "MagickCore/utility.h"
81 
82 /*
83  ImageMagick options.
84 */
85 static const OptionInfo
87  {
96  },
98  {
117  },
119  {
125  },
127  {
132  { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
133  },
135  {
137  { "Distributed", DistributedCache, UndefinedOptionFlag, MagickFalse },
141  { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
142  },
144  {
146  /* special */
150  /* individual channel */
166  { "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
167  { "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
168  { "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
171  { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
173  { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
177  { "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
180  { "0", (ssize_t) (1L << 0), UndefinedOptionFlag, MagickFalse },
181  { "1", (ssize_t) (1L << 1), UndefinedOptionFlag, MagickFalse },
182  { "2", (ssize_t) (1L << 2), UndefinedOptionFlag, MagickFalse },
183  { "3", (ssize_t) (1L << 3), UndefinedOptionFlag, MagickFalse },
184  { "4", (ssize_t) (1L << 4), UndefinedOptionFlag, MagickFalse },
185  { "5", (ssize_t) (1L << 5), UndefinedOptionFlag, MagickFalse },
186  { "6", (ssize_t) (1L << 6), UndefinedOptionFlag, MagickFalse },
187  { "7", (ssize_t) (1L << 7), UndefinedOptionFlag, MagickFalse },
188  { "8", (ssize_t) (1L << 8), UndefinedOptionFlag, MagickFalse },
189  { "9", (ssize_t) (1L << 9), UndefinedOptionFlag, MagickFalse },
190  { "10", (ssize_t) (1L << 10), UndefinedOptionFlag, MagickFalse },
191  { "11", (ssize_t) (1L << 11), UndefinedOptionFlag, MagickFalse },
192  { "12", (ssize_t) (1L << 12), UndefinedOptionFlag, MagickFalse },
193  { "13", (ssize_t) (1L << 13), UndefinedOptionFlag, MagickFalse },
194  { "14", (ssize_t) (1L << 14), UndefinedOptionFlag, MagickFalse },
195  { "15", (ssize_t) (1L << 15), UndefinedOptionFlag, MagickFalse },
196  { "16", (ssize_t) (1L << 16), UndefinedOptionFlag, MagickFalse },
197  { "17", (ssize_t) (1L << 17), UndefinedOptionFlag, MagickFalse },
198  { "18", (ssize_t) (1L << 18), UndefinedOptionFlag, MagickFalse },
199  { "19", (ssize_t) (1L << 19), UndefinedOptionFlag, MagickFalse },
200  { "20", (ssize_t) (1L << 20), UndefinedOptionFlag, MagickFalse },
201  { "21", (ssize_t) (1L << 21), UndefinedOptionFlag, MagickFalse },
202  { "22", (ssize_t) (1L << 22), UndefinedOptionFlag, MagickFalse },
203  { "23", (ssize_t) (1L << 23), UndefinedOptionFlag, MagickFalse },
204  { "24", (ssize_t) (1L << 24), UndefinedOptionFlag, MagickFalse },
205  { "25", (ssize_t) (1L << 25), UndefinedOptionFlag, MagickFalse },
206  { "26", (ssize_t) (1L << 26), UndefinedOptionFlag, MagickFalse },
207  { "27", (ssize_t) (1L << 27), UndefinedOptionFlag, MagickFalse },
208  { "28", (ssize_t) (1L << 28), UndefinedOptionFlag, MagickFalse },
209  { "29", (ssize_t) (1L << 29), UndefinedOptionFlag, MagickFalse },
210  { "30", (ssize_t) (1L << 30), UndefinedOptionFlag, MagickFalse },
211  { "31", (ssize_t) (1L << 31), UndefinedOptionFlag, MagickFalse },
213  },
215  {
216  { "Undefined", UndefinedClass, UndefinedOptionFlag, MagickTrue },
217  { "DirectClass", DirectClass, UndefinedOptionFlag, MagickFalse },
218  { "PseudoClass", PseudoClass, UndefinedOptionFlag, MagickFalse },
219  { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
220  },
222  {
223  { "Setting", 0, UndefinedOptionFlag, MagickFalse },
224  { " adjoin", 0, UndefinedOptionFlag, MagickFalse },
225  { " affine", 0, UndefinedOptionFlag, MagickFalse },
226  { " alpha", 0, UndefinedOptionFlag, MagickFalse },
227  { " antialias", 0, UndefinedOptionFlag, MagickFalse },
228  { " authenticate", 0, UndefinedOptionFlag, MagickFalse },
229  { " background", 0, UndefinedOptionFlag, MagickFalse },
230  { " bias", 0, UndefinedOptionFlag, MagickFalse },
231  { " black-point-compensation", 0, UndefinedOptionFlag, MagickFalse },
232  { " blue-primary", 0, UndefinedOptionFlag, MagickFalse },
233  { " bordercolor", 0, UndefinedOptionFlag, MagickFalse },
234  { " caption", 0, UndefinedOptionFlag, MagickFalse },
235  { " channel", 0, UndefinedOptionFlag, MagickFalse },
236  { " comment", 0, UndefinedOptionFlag, MagickFalse },
237  { " compress", 0, UndefinedOptionFlag, MagickFalse },
238  { " debug", 0, UndefinedOptionFlag, MagickFalse },
239  { " define", 0, UndefinedOptionFlag, MagickFalse },
240  { " delay", 0, UndefinedOptionFlag, MagickFalse },
241  { " density", 0, UndefinedOptionFlag, MagickFalse },
242  { " depth", 0, UndefinedOptionFlag, MagickFalse },
243  { " direction", 0, UndefinedOptionFlag, MagickFalse },
244  { " display", 0, UndefinedOptionFlag, MagickFalse },
245  { " dispose", 0, UndefinedOptionFlag, MagickFalse },
246  { " dither", 0, UndefinedOptionFlag, MagickFalse },
247  { " encoding", 0, UndefinedOptionFlag, MagickFalse },
248  { " endian", 0, UndefinedOptionFlag, MagickFalse },
249  { " extract", 0, UndefinedOptionFlag, MagickFalse },
250  { " family", 0, UndefinedOptionFlag, MagickFalse },
251  { " fill", 0, UndefinedOptionFlag, MagickFalse },
252  { " filter", 0, UndefinedOptionFlag, MagickFalse },
253  { " font", 0, UndefinedOptionFlag, MagickFalse },
254  { " format", 0, UndefinedOptionFlag, MagickFalse },
255  { " fuzz", 0, UndefinedOptionFlag, MagickFalse },
256  { " geometry", 0, UndefinedOptionFlag, MagickFalse },
257  { " gravity", 0, UndefinedOptionFlag, MagickFalse },
258  { " green-primary", 0, UndefinedOptionFlag, MagickFalse },
259  { " interlace", 0, UndefinedOptionFlag, MagickFalse },
260  { " intent", 0, UndefinedOptionFlag, MagickFalse },
261  { " interpolate", 0, UndefinedOptionFlag, MagickFalse },
262  { " label", 0, UndefinedOptionFlag, MagickFalse },
263  { " limit", 0, UndefinedOptionFlag, MagickFalse },
264  { " linewidth", 0, UndefinedOptionFlag, MagickFalse },
265  { " log", 0, UndefinedOptionFlag, MagickFalse },
266  { " loop", 0, UndefinedOptionFlag, MagickFalse },
267  { " mattecolor", 0, UndefinedOptionFlag, MagickFalse },
268  { " monitor", 0, UndefinedOptionFlag, MagickFalse },
269  { " orient", 0, UndefinedOptionFlag, MagickFalse },
270  { " page", 0, UndefinedOptionFlag, MagickFalse },
271  { " pointsize", 0, UndefinedOptionFlag, MagickFalse },
272  { " preview", 0, UndefinedOptionFlag, MagickFalse },
273  { " quality", 0, UndefinedOptionFlag, MagickFalse },
274  { " quiet", 0, UndefinedOptionFlag, MagickFalse },
275  { " read-mask", 0, UndefinedOptionFlag, MagickFalse },
276  { " red-primary", 0, UndefinedOptionFlag, MagickFalse },
277  { " region", 0, UndefinedOptionFlag, MagickFalse },
278  { " render", 0, UndefinedOptionFlag, MagickFalse },
279  { " repage", 0, UndefinedOptionFlag, MagickFalse },
280  { " sampling-factor", 0, UndefinedOptionFlag, MagickFalse },
281  { " scene", 0, UndefinedOptionFlag, MagickFalse },
282  { " seed", 0, UndefinedOptionFlag, MagickFalse },
283  { " size", 0, UndefinedOptionFlag, MagickFalse },
284  { " stretch", 0, UndefinedOptionFlag, MagickFalse },
285  { " stroke", 0, UndefinedOptionFlag, MagickFalse },
286  { " strokewidth", 0, UndefinedOptionFlag, MagickFalse },
287  { " style", 0, UndefinedOptionFlag, MagickFalse },
288  { " texture", 0, UndefinedOptionFlag, MagickFalse },
289  { " tile", 0, UndefinedOptionFlag, MagickFalse },
290  { " transparent-color", 0, UndefinedOptionFlag, MagickFalse },
291  { " treedepth", 0, UndefinedOptionFlag, MagickFalse },
292  { " type", 0, UndefinedOptionFlag, MagickFalse },
293  { " undercolor", 0, UndefinedOptionFlag, MagickFalse },
294  { " units", 0, UndefinedOptionFlag, MagickFalse },
295  { " verbose", 0, UndefinedOptionFlag, MagickFalse },
296  { " virtual-pixel", 0, UndefinedOptionFlag, MagickFalse },
297  { " weight", 0, UndefinedOptionFlag, MagickFalse },
298  { " write-mask", 0, UndefinedOptionFlag, MagickFalse },
299  { "Operator", 0, UndefinedOptionFlag, MagickFalse },
300  { " annotate", 0, UndefinedOptionFlag, MagickFalse },
301  { " black-threshold", 0, UndefinedOptionFlag, MagickFalse },
302  { " blur", 0, UndefinedOptionFlag, MagickFalse },
303  { " border", 0, UndefinedOptionFlag, MagickFalse },
304  { " charcoal", 0, UndefinedOptionFlag, MagickFalse },
305  { " chop", 0, UndefinedOptionFlag, MagickFalse },
306  { " clip", 0, UndefinedOptionFlag, MagickFalse },
307  { " clip-path", 0, UndefinedOptionFlag, MagickFalse },
308  { " clip-mask", 0, UndefinedOptionFlag, MagickFalse },
309  { " colors", 0, UndefinedOptionFlag, MagickFalse },
310  { " colorize", 0, UndefinedOptionFlag, MagickFalse },
311  { " colorspace", 0, UndefinedOptionFlag, MagickFalse },
312  { " compose", 0, UndefinedOptionFlag, MagickFalse },
313  { " contrast", 0, UndefinedOptionFlag, MagickFalse },
314  { " convolve", 0, UndefinedOptionFlag, MagickFalse },
315  { " crop", 0, UndefinedOptionFlag, MagickFalse },
316  { " cycle", 0, UndefinedOptionFlag, MagickFalse },
317  { " despeckle", 0, UndefinedOptionFlag, MagickFalse },
318  { " draw", 0, UndefinedOptionFlag, MagickFalse },
319  { " edge", 0, UndefinedOptionFlag, MagickFalse },
320  { " emboss", 0, UndefinedOptionFlag, MagickFalse },
321  { " enhance", 0, UndefinedOptionFlag, MagickFalse },
322  { " equalize", 0, UndefinedOptionFlag, MagickFalse },
323  { " evaluate", 0, UndefinedOptionFlag, MagickFalse },
324  { " extent", 0, UndefinedOptionFlag, MagickFalse },
325  { " flip", 0, UndefinedOptionFlag, MagickFalse },
326  { " flop", 0, UndefinedOptionFlag, MagickFalse },
327  { " floodfill", 0, UndefinedOptionFlag, MagickFalse },
328  { " frame", 0, UndefinedOptionFlag, MagickFalse },
329  { " gamma", 0, UndefinedOptionFlag, MagickFalse },
330  { " gaussian-blur", 0, UndefinedOptionFlag, MagickFalse },
331  { " grayscale", 0, UndefinedOptionFlag, MagickFalse },
332  { " implode", 0, UndefinedOptionFlag, MagickFalse },
333  { " lat", 0, UndefinedOptionFlag, MagickFalse },
334  { " level", 0, UndefinedOptionFlag, MagickFalse },
335  { " map", 0, UndefinedOptionFlag, MagickFalse },
336  { " median", 0, UndefinedOptionFlag, MagickFalse },
337  { " modulate", 0, UndefinedOptionFlag, MagickFalse },
338  { " monochrome", 0, UndefinedOptionFlag, MagickFalse },
339  { " negate", 0, UndefinedOptionFlag, MagickFalse },
340  { " noise", 0, UndefinedOptionFlag, MagickFalse },
341  { " normalize", 0, UndefinedOptionFlag, MagickFalse },
342  { " opaque", 0, UndefinedOptionFlag, MagickFalse },
343  { " ordered-dither", 0, UndefinedOptionFlag, MagickFalse },
344  { " paint", 0, UndefinedOptionFlag, MagickFalse },
345  { " posterize", 0, UndefinedOptionFlag, MagickFalse },
346  { " raise", 0, UndefinedOptionFlag, MagickFalse },
347  { " profile", 0, UndefinedOptionFlag, MagickFalse },
348  { " radial-blur", 0, UndefinedOptionFlag, MagickFalse },
349  { " raise", 0, UndefinedOptionFlag, MagickFalse },
350  { " random-threshold", 0, UndefinedOptionFlag, MagickFalse },
351  { " resample", 0, UndefinedOptionFlag, MagickFalse },
352  { " resize", 0, UndefinedOptionFlag, MagickFalse },
353  { " roll", 0, UndefinedOptionFlag, MagickFalse },
354  { " rotate", 0, UndefinedOptionFlag, MagickFalse },
355  { " sample", 0, UndefinedOptionFlag, MagickFalse },
356  { " scale", 0, UndefinedOptionFlag, MagickFalse },
357  { " sepia-tone", 0, UndefinedOptionFlag, MagickFalse },
358  { " segment", 0, UndefinedOptionFlag, MagickFalse },
359  { " shade", 0, UndefinedOptionFlag, MagickFalse },
360  { " shadow", 0, UndefinedOptionFlag, MagickFalse },
361  { " sharpen", 0, UndefinedOptionFlag, MagickFalse },
362  { " shave", 0, UndefinedOptionFlag, MagickFalse },
363  { " shear", 0, UndefinedOptionFlag, MagickFalse },
364  { " sigmoidal-contrast", 0, UndefinedOptionFlag, MagickFalse },
365  { " solarize", 0, UndefinedOptionFlag, MagickFalse },
366  { " splice", 0, UndefinedOptionFlag, MagickFalse },
367  { " spread", 0, UndefinedOptionFlag, MagickFalse },
368  { " strip", 0, UndefinedOptionFlag, MagickFalse },
369  { " swirl", 0, UndefinedOptionFlag, MagickFalse },
370  { " threshold", 0, UndefinedOptionFlag, MagickFalse },
371  { " transparent", 0, UndefinedOptionFlag, MagickFalse },
372  { " thumbnail", 0, UndefinedOptionFlag, MagickFalse },
373  { " tint", 0, UndefinedOptionFlag, MagickFalse },
374  { " transform", 0, UndefinedOptionFlag, MagickFalse },
375  { " trim", 0, UndefinedOptionFlag, MagickFalse },
376  { " unsharp", 0, UndefinedOptionFlag, MagickFalse },
377  { " version", 0, UndefinedOptionFlag, MagickFalse },
378  { " wave", 0, UndefinedOptionFlag, MagickFalse },
379  { " white-point", 0, UndefinedOptionFlag, MagickFalse },
380  { " white-threshold", 0, UndefinedOptionFlag, MagickFalse },
381  { "Channel Operator", 0, UndefinedOptionFlag, MagickFalse },
382  { " channel-fx", 0, UndefinedOptionFlag, MagickFalse },
383  { " separate", 0, UndefinedOptionFlag, MagickFalse },
384  { "Sequence Operator", 0, UndefinedOptionFlag, MagickFalse },
385  { " append", 0, UndefinedOptionFlag, MagickFalse },
386  { " affinity", 0, UndefinedOptionFlag, MagickFalse },
387  { " average", 0, UndefinedOptionFlag, MagickFalse },
388  { " clut", 0, UndefinedOptionFlag, MagickFalse },
389  { " coalesce", 0, UndefinedOptionFlag, MagickFalse },
390  { " combine", 0, UndefinedOptionFlag, MagickFalse },
391  { " compare", 0, UndefinedOptionFlag, MagickFalse },
392  { " complex", 0, UndefinedOptionFlag, MagickFalse },
393  { " composite", 0, UndefinedOptionFlag, MagickFalse },
394  { " copy", 0, UndefinedOptionFlag, MagickFalse },
395  { " crop", 0, UndefinedOptionFlag, MagickFalse },
396  { " debug", 0, UndefinedOptionFlag, MagickFalse },
397  { " deconstruct", 0, UndefinedOptionFlag, MagickFalse },
398  { " delete", 0, UndefinedOptionFlag, MagickFalse },
399  { " evaluate-sequence", 0, UndefinedOptionFlag, MagickFalse },
400  { " fft", 0, UndefinedOptionFlag, MagickFalse },
401  { " flatten", 0, UndefinedOptionFlag, MagickFalse },
402  { " fx", 0, UndefinedOptionFlag, MagickFalse },
403  { " hald-clut", 0, UndefinedOptionFlag, MagickFalse },
404  { " ift", 0, UndefinedOptionFlag, MagickFalse },
405  { " identify", 0, UndefinedOptionFlag, MagickFalse },
406  { " insert", 0, UndefinedOptionFlag, MagickFalse },
407  { " layers", 0, UndefinedOptionFlag, MagickFalse },
408  { " limit", 0, UndefinedOptionFlag, MagickFalse },
409  { " map", 0, UndefinedOptionFlag, MagickFalse },
410  { " maximum", 0, UndefinedOptionFlag, MagickFalse },
411  { " minimum", 0, UndefinedOptionFlag, MagickFalse },
412  { " morph", 0, UndefinedOptionFlag, MagickFalse },
413  { " mosaic", 0, UndefinedOptionFlag, MagickFalse },
414  { " optimize", 0, UndefinedOptionFlag, MagickFalse },
415  { " print", 0, UndefinedOptionFlag, MagickFalse },
416  { " process", 0, UndefinedOptionFlag, MagickFalse },
417  { " quiet", 0, UndefinedOptionFlag, MagickFalse },
418  { " swap", 0, UndefinedOptionFlag, MagickFalse },
419  { " write", 0, UndefinedOptionFlag, MagickFalse },
420  { "Geometry", 0, UndefinedOptionFlag, MagickFalse },
421  { " adaptive-resize", 0, UndefinedOptionFlag, MagickFalse },
422  { " border", 0, UndefinedOptionFlag, MagickFalse },
423  { " borderwidth", 0, UndefinedOptionFlag, MagickFalse },
424  { " chop", 0, UndefinedOptionFlag, MagickFalse },
425  { " crop", 0, UndefinedOptionFlag, MagickFalse },
426  { " density", 0, UndefinedOptionFlag, MagickFalse },
427  { " extent", 0, UndefinedOptionFlag, MagickFalse },
428  { " extract", 0, UndefinedOptionFlag, MagickFalse },
429  { " frame", 0, UndefinedOptionFlag, MagickFalse },
430  { " geometry", 0, UndefinedOptionFlag, MagickFalse },
431  { " iconGeometry", 0, UndefinedOptionFlag, MagickFalse },
432  { " liquid-rescale", 0, UndefinedOptionFlag, MagickFalse },
433  { " page", 0, UndefinedOptionFlag, MagickFalse },
434  { " region", 0, UndefinedOptionFlag, MagickFalse },
435  { " repage", 0, UndefinedOptionFlag, MagickFalse },
436  { " resize", 0, UndefinedOptionFlag, MagickFalse },
437  { " sample", 0, UndefinedOptionFlag, MagickFalse },
438  { " scale", 0, UndefinedOptionFlag, MagickFalse },
439  { " shave", 0, UndefinedOptionFlag, MagickFalse },
440  { " splice", 0, UndefinedOptionFlag, MagickFalse },
441  { " thumbnail", 0, UndefinedOptionFlag, MagickFalse },
442  { " window", 0, UndefinedOptionFlag, MagickFalse },
443  { "Stack", 0, UndefinedOptionFlag, MagickFalse },
444  { " clone", 0, UndefinedOptionFlag, MagickFalse },
445  { " delete", 0, UndefinedOptionFlag, MagickFalse },
446  { " insert", 0, UndefinedOptionFlag, MagickFalse },
447  { " swap", 0, UndefinedOptionFlag, MagickFalse },
448  { (char *) NULL, 0, UndefinedOptionFlag, MagickFalse }
449  },
451  {
453  { "ObjectBoundingBox", ObjectBoundingBox, UndefinedOptionFlag, MagickFalse },
454  { "UserSpace", UserSpace, UndefinedOptionFlag, MagickFalse },
455  { "UserSpaceOnUse", UserSpaceOnUse, UndefinedOptionFlag, MagickFalse },
457  },
459  {
496  },
498  {
508  },
510  {
511  /*
512  Must be ordered lexigraphically.
513  */
514  { "+alpha", 1L, DeprecateOptionFlag, MagickTrue },
515  { "-alpha", 1L, SimpleOperatorFlag, MagickFalse },
516  { "+background", 0L, ImageInfoOptionFlag, MagickFalse },
517  { "-background", 1L, ImageInfoOptionFlag, MagickFalse },
518  { "+format", 0L, ImageInfoOptionFlag, MagickFalse },
520  { "-quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
521  { "+quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
522  { "-regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
523  { "+regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
524  { "+repage", 0L, SimpleOperatorFlag, MagickFalse },
525  { "-repage", 1L, SimpleOperatorFlag, MagickFalse },
526  { "+size", 0L, ImageInfoOptionFlag, MagickFalse },
527  { "-size", 1L, ImageInfoOptionFlag, MagickFalse },
528  { "+virtual-pixel", 0L, ImageInfoOptionFlag, MagickFalse },
529  { "-virtual-pixel", 1L, ImageInfoOptionFlag, MagickFalse },
530  { "+blur", 0L, DeprecateOptionFlag, MagickTrue },
531  { "-blur", 1L, SimpleOperatorFlag, MagickFalse },
532  { "+resize", 1L, DeprecateOptionFlag, MagickTrue },
533  { "-resize", 1L, SimpleOperatorFlag, MagickFalse },
534  { "(", 0L, NoImageOperatorFlag, MagickTrue },
535  { ")", 0L, NoImageOperatorFlag, MagickTrue },
536  { "{", 0L, NoImageOperatorFlag, MagickTrue },
537  { "}", 0L, NoImageOperatorFlag, MagickTrue },
538  { "--", 1L, NoImageOperatorFlag, MagickTrue },
539  { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickTrue },
540  { "-adaptive-blur", 1L, SimpleOperatorFlag, MagickFalse },
541  { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickTrue },
542  { "-adaptive-resize", 1L, SimpleOperatorFlag, MagickFalse },
543  { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickTrue },
544  { "-adaptive-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
545  { "-adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
546  { "+adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
547  { "+affine", 0L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
548  { "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
549  { "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
550  { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
551  { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse },
552  { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse },
553  { "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
555  { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
556  { "+antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
557  { "-append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
558  { "+append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
559  { "+attenuate", 0L, ImageInfoOptionFlag, MagickFalse },
560  { "-attenuate", 1L, ImageInfoOptionFlag, MagickFalse },
561  { "+authenticate", 0L, ImageInfoOptionFlag, MagickFalse },
562  { "-authenticate", 1L, ImageInfoOptionFlag, MagickFalse },
563  { "+auto-gamma", 0L, DeprecateOptionFlag, MagickTrue },
564  { "-auto-gamma", 0L, SimpleOperatorFlag, MagickFalse },
565  { "+auto-level", 0L, DeprecateOptionFlag, MagickTrue },
566  { "-auto-level", 0L, SimpleOperatorFlag, MagickFalse },
567  { "+auto-orient", 0L, DeprecateOptionFlag, MagickTrue },
568  { "-auto-orient", 0L, SimpleOperatorFlag, MagickFalse },
569  { "+auto-threshold", 1L, DeprecateOptionFlag, MagickTrue },
570  { "-auto-threshold", 1L, SimpleOperatorFlag, MagickFalse },
571  { "+average", 0L, DeprecateOptionFlag, MagickTrue },
575  { "+bench", 1L, DeprecateOptionFlag, MagickTrue },
576  { "-bench", 1L, GenesisOptionFlag, MagickFalse },
577  { "+bias", 0L, ImageInfoOptionFlag, MagickFalse },
578  { "-bias", 1L, ImageInfoOptionFlag, MagickFalse },
579  { "-black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
580  { "+black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
581  { "+black-threshold", 0L, DeprecateOptionFlag, MagickTrue },
582  { "-black-threshold", 1L, SimpleOperatorFlag, MagickFalse },
583  { "+blend", 0L, NonMagickOptionFlag, MagickFalse },
584  { "-blend", 1L, NonMagickOptionFlag, MagickFalse },
585  { "+blue-primary", 0L, ImageInfoOptionFlag, MagickFalse },
586  { "-blue-primary", 1L, ImageInfoOptionFlag, MagickFalse },
587  { "-blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
588  { "+blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
589  { "+border", 1L, DeprecateOptionFlag, MagickTrue },
590  { "-border", 1L, SimpleOperatorFlag, MagickFalse },
591  { "+bordercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
592  { "-bordercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
593  { "+borderwidth", 0L, NonMagickOptionFlag, MagickFalse },
594  { "-borderwidth", 1L, NonMagickOptionFlag, MagickFalse },
597  { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickTrue },
598  { "-brightness-contrast", 1L, SimpleOperatorFlag, MagickFalse },
599  { "+cache", 0L, GlobalOptionFlag, MagickFalse },
600  { "-cache", 1L, GlobalOptionFlag, MagickFalse },
601  { "+canny", 1L, DeprecateOptionFlag, MagickTrue },
602  { "-canny", 1L, SimpleOperatorFlag, MagickTrue },
605  { "+cdl", 1L, DeprecateOptionFlag, MagickTrue },
607  { "+channel", 0L, SimpleOperatorFlag, MagickFalse },
608  { "-channel", 1L, SimpleOperatorFlag, MagickFalse },
609  { "-channel-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
610  { "+charcoal", 1L, DeprecateOptionFlag, MagickTrue },
611  { "-charcoal", 1L, SimpleOperatorFlag, MagickFalse },
612  { "+chop", 1L, DeprecateOptionFlag, MagickTrue },
613  { "-chop", 1L, SimpleOperatorFlag, MagickFalse },
614  { "+clamp", 0L, DeprecateOptionFlag, MagickTrue },
615  { "-clamp", 0L, SimpleOperatorFlag, MagickFalse },
616  { "-clip", 0L, SimpleOperatorFlag, MagickFalse },
617  { "+clip", 0L, SimpleOperatorFlag, MagickFalse },
618  { "+clip-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
619  { "-clip-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
620  { "-clip-path", 1L, SimpleOperatorFlag, MagickFalse },
621  { "+clip-path", 1L, SimpleOperatorFlag, MagickFalse },
622  { "+clone", 0L, NoImageOperatorFlag, MagickFalse },
623  { "-clone", 1L, NoImageOperatorFlag, MagickFalse },
624  { "+clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
625  { "-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
626  { "+coalesce", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
627  { "-coalesce", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
628  { "+colorize", 1L, DeprecateOptionFlag, MagickTrue },
629  { "-colorize", 1L, SimpleOperatorFlag, MagickFalse },
630  { "+colormap", 0L, NonMagickOptionFlag, MagickFalse },
631  { "-colormap", 1L, NonMagickOptionFlag, MagickFalse },
632  { "+color-matrix", 1L, DeprecateOptionFlag, MagickTrue },
633  { "-color-matrix", 1L, SimpleOperatorFlag, MagickFalse },
634  { "+colors", 1L, DeprecateOptionFlag, MagickTrue },
635  { "-colors", 1L, SimpleOperatorFlag, MagickFalse },
636  { "+colorspace", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
637  { "-colorspace", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
638  { "-combine", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
639  { "+combine", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
642  { "+compare", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
643  { "-compare", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
644  { "+complex", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
645  { "-complex", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
646  { "+compose", 0L, ImageInfoOptionFlag, MagickFalse },
647  { "-compose", 1L, ImageInfoOptionFlag, MagickFalse },
648  { "+composite", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
649  { "-composite", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
650  { "+compress", 0L, ImageInfoOptionFlag, MagickFalse },
651  { "-compress", 1L, ImageInfoOptionFlag, MagickFalse },
652  { "+concurrent", 0L, DeprecateOptionFlag, MagickTrue },
653  { "-concurrent", 0L, GenesisOptionFlag, MagickFalse },
654  { "+connected-components", 1L, DeprecateOptionFlag, MagickTrue },
655  { "-connected-components", 1L, SimpleOperatorFlag, MagickFalse },
656  { "-contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
657  { "+contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
658  { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickTrue },
659  { "-contrast-stretch", 1L, SimpleOperatorFlag, MagickFalse },
660  { "+convolve", 1L, DeprecateOptionFlag, MagickTrue },
661  { "-convolve", 1L, SimpleOperatorFlag, MagickFalse },
662  { "+copy", 2L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
663  { "-copy", 2L, ListOperatorFlag | FireOptionFlag, MagickFalse },
664  { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
665  { "-crop", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
666  { "+cycle", 1L, DeprecateOptionFlag, MagickTrue },
667  { "-cycle", 1L, SimpleOperatorFlag, MagickFalse },
668  { "+debug", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
669  { "-debug", 1L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
670  { "+decipher", 1L, DeprecateOptionFlag, MagickTrue },
671  { "-decipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
672  { "+deconstruct", 0L, DeprecateOptionFlag, MagickTrue },
673  { "-deconstruct", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
676  { "+delay", 0L, ImageInfoOptionFlag, MagickFalse },
677  { "-delay", 1L, ImageInfoOptionFlag, MagickFalse },
678  { "+delete", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
679  { "-delete", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
680  { "+density", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
681  { "-density", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
684  { "+descend", 0L, NonMagickOptionFlag, MagickFalse },
685  { "-descend", 1L, NonMagickOptionFlag, MagickFalse },
686  { "+deskew", 0L, SimpleOperatorFlag, MagickFalse },
687  { "-deskew", 1L, SimpleOperatorFlag, MagickFalse },
688  { "+despeckle", 0L, DeprecateOptionFlag, MagickTrue },
689  { "-despeckle", 0L, SimpleOperatorFlag, MagickFalse },
690  { "+direction", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
691  { "-direction", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
692  { "+displace", 0L, NonMagickOptionFlag, MagickFalse },
693  { "-displace", 1L, NonMagickOptionFlag, MagickFalse },
694  { "-display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
695  { "+display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
696  { "+dispose", 0L, ImageInfoOptionFlag, MagickFalse },
697  { "-dispose", 1L, ImageInfoOptionFlag, MagickFalse },
698  { "+dissimilarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
699  { "-dissimilarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
700  { "+dissolve", 0L, NonMagickOptionFlag, MagickFalse },
701  { "-dissolve", 1L, NonMagickOptionFlag, MagickFalse },
706  { "+draw", 0L, DeprecateOptionFlag, MagickTrue },
707  { "-draw", 1L, SimpleOperatorFlag, MagickFalse },
708  { "+duplicate", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
709  { "-duplicate", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
710  { "-duration", 1L, GenesisOptionFlag, MagickFalse },
711  { "+duration", 1L, GenesisOptionFlag, MagickFalse },
712  { "+edge", 1L, DeprecateOptionFlag, MagickTrue },
713  { "-edge", 1L, SimpleOperatorFlag, MagickFalse },
714  { "+emboss", 1L, DeprecateOptionFlag, MagickTrue },
715  { "-emboss", 1L, SimpleOperatorFlag, MagickFalse },
716  { "+encipher", 1L, DeprecateOptionFlag, MagickTrue },
717  { "-encipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
718  { "+encoding", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
719  { "-encoding", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
720  { "+endian", 0L, ImageInfoOptionFlag, MagickFalse },
721  { "-endian", 1L, ImageInfoOptionFlag, MagickFalse },
722  { "+enhance", 0L, DeprecateOptionFlag, MagickTrue },
723  { "-enhance", 0L, SimpleOperatorFlag, MagickFalse },
724  { "+equalize", 0L, DeprecateOptionFlag, MagickTrue },
725  { "-equalize", 0L, SimpleOperatorFlag, MagickFalse },
726  { "+evaluate", 2L, DeprecateOptionFlag, MagickTrue },
727  { "-evaluate", 2L, SimpleOperatorFlag, MagickFalse },
728  { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
729  { "-evaluate-sequence", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
730  { "-exit", 0L, SpecialOptionFlag, MagickFalse },
731  { "+extent", 1L, DeprecateOptionFlag, MagickTrue },
732  { "-extent", 1L, SimpleOperatorFlag, MagickFalse },
733  { "+extract", 0L, ImageInfoOptionFlag, MagickFalse },
734  { "-extract", 1L, ImageInfoOptionFlag, MagickFalse },
735  { "+family", 0L, DeprecateOptionFlag, MagickTrue },
736  { "-family", 1L, DrawInfoOptionFlag, MagickFalse },
737  { "+features", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
738  { "-features", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
739  { "-fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
740  { "+fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
743  { "+filter", 0L, ImageInfoOptionFlag, MagickFalse },
744  { "-filter", 1L, ImageInfoOptionFlag, MagickFalse },
745  { "+flatten", 0L, DeprecateOptionFlag, MagickTrue },
746  { "-flatten", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
747  { "+flip", 0L, DeprecateOptionFlag, MagickTrue },
748  { "-flip", 0L, SimpleOperatorFlag, MagickFalse },
749  { "-floodfill", 2L, SimpleOperatorFlag, MagickFalse },
750  { "+floodfill", 2L, SimpleOperatorFlag, MagickFalse },
751  { "+flop", 0L, DeprecateOptionFlag, MagickTrue },
752  { "-flop", 0L, SimpleOperatorFlag, MagickFalse },
755  { "+foreground", 0L, NonMagickOptionFlag, MagickFalse },
756  { "-foreground", 1L, NonMagickOptionFlag, MagickFalse },
757  { "+frame", 1L, DeprecateOptionFlag, MagickTrue },
758  { "-frame", 1L, SimpleOperatorFlag, MagickFalse },
759  { "+function", 2L, DeprecateOptionFlag, MagickTrue },
761  { "+fuzz", 0L, ImageInfoOptionFlag, MagickFalse },
762  { "-fuzz", 1L, ImageInfoOptionFlag, MagickFalse },
765  { "-gamma", 1L, SimpleOperatorFlag, MagickFalse },
766  { "+gamma", 1L, SimpleOperatorFlag, MagickFalse },
767  { "+gaussian", 1L, DeprecateOptionFlag, MagickTrue },
768  { "-gaussian", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
769  { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickTrue },
770  { "-gaussian-blur", 1L, SimpleOperatorFlag, MagickFalse },
771  { "+geometry", 0L, SimpleOperatorFlag, MagickFalse },
772  { "-geometry", 1L, SimpleOperatorFlag, MagickFalse },
773  { "+gravity", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
774  { "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
775  { "+grayscale", 1L, SimpleOperatorFlag, MagickTrue },
776  { "-grayscale", 1L, SimpleOperatorFlag, MagickFalse },
777  { "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse },
778  { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
779  { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
780  { "-hald-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
781  { "+highlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
782  { "-highlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
783  { "+hough-lines", 1L, DeprecateOptionFlag, MagickTrue },
784  { "-hough-lines", 1L, SimpleOperatorFlag, MagickTrue },
785  { "+iconGeometry", 0L, NonMagickOptionFlag, MagickFalse },
786  { "-iconGeometry", 1L, NonMagickOptionFlag, MagickFalse },
787  { "-iconic", 0L, NonMagickOptionFlag, MagickFalse },
788  { "+iconic", 0L, NonMagickOptionFlag, MagickFalse },
789  { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
790  { "-identify", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
791  { "-ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
792  { "+ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
793  { "-immutable", 0L, NonMagickOptionFlag, MagickFalse },
794  { "+immutable", 0L, NonMagickOptionFlag, MagickFalse },
795  { "+implode", 0L, DeprecateOptionFlag, MagickTrue },
796  { "-implode", 1L, SimpleOperatorFlag, MagickFalse },
797  { "+insert", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
798  { "-insert", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
799  { "+intensity", 0L, ImageInfoOptionFlag, MagickFalse },
800  { "-intensity", 1L, ImageInfoOptionFlag, MagickFalse },
801  { "+intent", 0L, ImageInfoOptionFlag, MagickFalse },
802  { "-intent", 1L, ImageInfoOptionFlag, MagickFalse },
803  { "+interlace", 0L, ImageInfoOptionFlag, MagickFalse },
804  { "-interlace", 1L, ImageInfoOptionFlag, MagickFalse },
805  { "+interline-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
806  { "-interline-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
807  { "+interpolate", 0L, ImageInfoOptionFlag, MagickFalse },
808  { "-interpolate", 1L, ImageInfoOptionFlag, MagickFalse },
809  { "+interpolative-resize", 1L, DeprecateOptionFlag, MagickTrue },
810  { "-interpolative-resize", 1L, SimpleOperatorFlag, MagickFalse },
811  { "+interword-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
812  { "-interword-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
813  { "+kerning", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
814  { "-kerning", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
815  { "+kuwahara", 0L, DeprecateOptionFlag, MagickTrue },
816  { "-kuwahara", 1L, SimpleOperatorFlag, MagickFalse },
819  { "+lat", 1L, DeprecateOptionFlag, MagickTrue },
820  { "-lat", 1L, SimpleOperatorFlag, MagickFalse },
821  { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
822  { "-layers", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
823  { "-level", 1L, SimpleOperatorFlag, MagickFalse },
824  { "+level", 1L, SimpleOperatorFlag, MagickFalse },
825  { "-level-colors", 1L, SimpleOperatorFlag, MagickFalse },
826  { "+level-colors", 1L, SimpleOperatorFlag, MagickFalse },
827  { "+limit", 0L, DeprecateOptionFlag, MagickTrue },
828  { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
829  { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue },
830  { "-linear-stretch", 1L, SimpleOperatorFlag, MagickFalse },
831  { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue },
832  { "-liquid-rescale", 1L, SimpleOperatorFlag, MagickFalse },
833  { "+list", 0L, DeprecateOptionFlag, MagickTrue },
834  { "-list", 1L, NoImageOperatorFlag, MagickFalse },
835  { "+local-contrast", 0L, DeprecateOptionFlag, MagickTrue },
836  { "-local-contrast", 1L, SimpleOperatorFlag, MagickFalse },
837  { "+log", 0L, DeprecateOptionFlag, MagickFalse },
838  { "-log", 1L, GlobalOptionFlag, MagickFalse },
839  { "+loop", 0L, ImageInfoOptionFlag, MagickFalse },
840  { "-loop", 1L, ImageInfoOptionFlag, MagickFalse },
841  { "+lowlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
842  { "-lowlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
843  { "+magnify", 0L, DeprecateOptionFlag, MagickTrue },
844  { "-magnify", 0L, SimpleOperatorFlag, MagickFalse },
849  { "-matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
850  { "+matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
851  { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
852  { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
853  { "+mean-shift", 1L, DeprecateOptionFlag, MagickTrue },
854  { "-mean-shift", 1L, SimpleOperatorFlag, MagickTrue },
855  { "+median", 1L, DeprecateOptionFlag, MagickTrue },
857  { "+metric", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse },
858  { "-metric", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
859  { "-minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
860  { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
861  { "+mode", 1L, NonMagickOptionFlag, MagickFalse },
863  { "+modulate", 1L, DeprecateOptionFlag, MagickTrue },
864  { "-modulate", 1L, SimpleOperatorFlag, MagickFalse },
865  { "-moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
866  { "+moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
867  { "-monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
868  { "+monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
869  { "+monochrome", 0L, ImageInfoOptionFlag, MagickFalse },
870  { "-monochrome", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
871  { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
872  { "-morph", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
873  { "+morphology", 2L, DeprecateOptionFlag, MagickTrue },
874  { "-morphology", 2L, SimpleOperatorFlag, MagickFalse },
875  { "+mosaic", 0L, DeprecateOptionFlag, MagickTrue },
876  { "-mosaic", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
877  { "+motion-blur", 1L, DeprecateOptionFlag, MagickTrue },
878  { "-motion-blur", 1L, SimpleOperatorFlag, MagickFalse },
879  { "+name", 0L, NonMagickOptionFlag, MagickFalse },
880  { "-name", 1L, NonMagickOptionFlag, MagickFalse },
881  { "+negate", 0L, SimpleOperatorFlag, MagickFalse },
882  { "-negate", 0L, SimpleOperatorFlag, MagickFalse },
884  { "+noise", 1L, SimpleOperatorFlag, MagickFalse },
885  { "-noop", 0L, NoImageOperatorFlag, MagickFalse },
886  { "+normalize", 0L, DeprecateOptionFlag, MagickTrue },
887  { "-normalize", 0L, SimpleOperatorFlag, MagickFalse },
888  { "-opaque", 1L, SimpleOperatorFlag, MagickFalse },
889  { "+opaque", 1L, SimpleOperatorFlag, MagickFalse },
890  { "+ordered-dither", 0L, DeprecateOptionFlag, MagickTrue },
891  { "-ordered-dither", 1L, SimpleOperatorFlag, MagickFalse },
892  { "+orient", 0L, ImageInfoOptionFlag, MagickFalse },
893  { "-orient", 1L, ImageInfoOptionFlag, MagickFalse },
894  { "+page", 0L, ImageInfoOptionFlag, MagickFalse },
895  { "-page", 1L, ImageInfoOptionFlag, MagickFalse },
896  { "+paint", 0L, DeprecateOptionFlag, MagickTrue },
897  { "-paint", 1L, SimpleOperatorFlag, MagickFalse },
898  { "+path", 0L, NonMagickOptionFlag, MagickFalse },
899  { "-path", 1L, NonMagickOptionFlag, MagickFalse },
900  { "+pause", 0L, NonMagickOptionFlag, MagickFalse },
901  { "-pause", 1L, NonMagickOptionFlag, MagickFalse },
902  { "-ping", 0L, ImageInfoOptionFlag, MagickFalse },
903  { "+ping", 0L, ImageInfoOptionFlag, MagickFalse },
904  { "+pointsize", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
905  { "-pointsize", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
906  { "+polaroid", 0L, SimpleOperatorFlag, MagickFalse },
907  { "-polaroid", 1L, SimpleOperatorFlag, MagickFalse },
908  { "+poly", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
909  { "-poly", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
910  { "+posterize", 1L, DeprecateOptionFlag, MagickTrue },
911  { "-posterize", 1L, SimpleOperatorFlag, MagickFalse },
912  { "+precision", 0L, ImageInfoOptionFlag, MagickFalse },
913  { "-precision", 1L, ImageInfoOptionFlag, MagickFalse },
914  { "+preview", 0L, DeprecateOptionFlag, MagickTrue },
915  { "-preview", 1L, SimpleOperatorFlag, MagickFalse },
916  { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
918  { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
919  { "-process", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
920  { "+profile", 1L, SimpleOperatorFlag, MagickFalse },
922  { "+quality", 0L, ImageInfoOptionFlag, MagickFalse },
923  { "-quality", 1L, ImageInfoOptionFlag, MagickFalse },
924  { "+quantize", 0L, QuantizeInfoOptionFlag, MagickFalse },
925  { "-quantize", 1L, QuantizeInfoOptionFlag, MagickFalse },
926  { "-raise", 1L, SimpleOperatorFlag, MagickFalse },
927  { "+raise", 1L, SimpleOperatorFlag, MagickFalse },
928  { "+random-threshold", 1L, DeprecateOptionFlag, MagickTrue },
929  { "-random-threshold", 1L, SimpleOperatorFlag, MagickFalse },
931  { "+read-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
932  { "-read-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
933  { "+recolor", 1L, DeprecateOptionFlag, MagickTrue },
934  { "-recolor", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
935  { "+red-primary", 0L, ImageInfoOptionFlag, MagickFalse },
936  { "-red-primary", 1L, ImageInfoOptionFlag, MagickFalse },
937  { "+region", 0L, SimpleOperatorFlag, MagickFalse },
938  { "-region", 1L, SimpleOperatorFlag, MagickFalse },
941  { "+remote", 0L, NonMagickOptionFlag, MagickFalse },
942  { "-remote", 1L, NonMagickOptionFlag, MagickFalse },
943  { "-render", 0L, DrawInfoOptionFlag, MagickFalse },
944  { "+render", 0L, DrawInfoOptionFlag, MagickFalse },
945  { "+resample", 1L, DeprecateOptionFlag, MagickTrue },
946  { "-resample", 1L, SimpleOperatorFlag, MagickFalse },
947  { "-respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
948  { "+respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
949  { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
950  { "-reverse", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
951  { "+roll", 1L, DeprecateOptionFlag, MagickTrue },
952  { "-roll", 1L, SimpleOperatorFlag, MagickFalse },
953  { "+rotate", 1L, DeprecateOptionFlag, MagickTrue },
954  { "-rotate", 1L, SimpleOperatorFlag, MagickFalse },
955  { "-rotational-blur", 1L, SimpleOperatorFlag, MagickFalse },
956  { "+sample", 1L, DeprecateOptionFlag, MagickTrue },
957  { "-sample", 1L, SimpleOperatorFlag, MagickFalse },
958  { "+sampling-factor", 0L, ImageInfoOptionFlag, MagickFalse },
959  { "-sampling-factor", 1L, ImageInfoOptionFlag, MagickFalse },
961  { "+sans0", 0L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'noop' */
963  { "-sans1", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'sans' */
968  { "+scale", 1L, DeprecateOptionFlag, MagickTrue },
969  { "-scale", 1L, SimpleOperatorFlag, MagickFalse },
970  { "+scene", 0L, ImageInfoOptionFlag, MagickFalse },
971  { "-scene", 1L, ImageInfoOptionFlag, MagickFalse },
972  { "+scenes", 0L, NonMagickOptionFlag, MagickFalse },
973  { "-scenes", 1L, NonMagickOptionFlag, MagickFalse },
974  { "+screen", 0L, NonMagickOptionFlag, MagickFalse },
975  { "-screen", 1L, NonMagickOptionFlag, MagickFalse },
977  { "+seed", 0L, GlobalOptionFlag, MagickFalse },
978  { "-seed", 1L, GlobalOptionFlag, MagickFalse },
979  { "+segment", 1L, DeprecateOptionFlag, MagickTrue },
980  { "-segment", 1L, SimpleOperatorFlag, MagickFalse },
981  { "+selective-blur", 1L, DeprecateOptionFlag, MagickTrue },
982  { "-selective-blur", 1L, SimpleOperatorFlag, MagickFalse },
983  { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
984  { "-separate", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
985  { "+sepia-tone", 1L, DeprecateOptionFlag, MagickTrue },
986  { "-sepia-tone", 1L, SimpleOperatorFlag, MagickFalse },
987  { "+set", 1L, NoImageOperatorFlag, MagickFalse },
989  { "+shade", 0L, DeprecateOptionFlag, MagickTrue },
990  { "-shade", 1L, SimpleOperatorFlag, MagickFalse },
991  { "+shadow", 1L, DeprecateOptionFlag, MagickTrue },
992  { "-shadow", 1L, SimpleOperatorFlag, MagickFalse },
993  { "+shared-memory", 0L, NonMagickOptionFlag, MagickFalse },
994  { "-shared-memory", 1L, NonMagickOptionFlag, MagickFalse },
995  { "+sharpen", 1L, DeprecateOptionFlag, MagickTrue },
996  { "-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
997  { "+shave", 1L, DeprecateOptionFlag, MagickTrue },
998  { "-shave", 1L, SimpleOperatorFlag, MagickFalse },
999  { "+shear", 1L, DeprecateOptionFlag, MagickTrue },
1000  { "-shear", 1L, SimpleOperatorFlag, MagickFalse },
1001  { "-sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
1002  { "+sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
1003  { "+silent", 0L, NonMagickOptionFlag, MagickFalse },
1004  { "-silent", 1L, NonMagickOptionFlag, MagickFalse },
1005  { "+similarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
1006  { "-similarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
1007  { "+sketch", 1L, DeprecateOptionFlag, MagickTrue },
1008  { "-sketch", 1L, SimpleOperatorFlag, MagickFalse },
1009  { "-smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
1010  { "+smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
1011  { "+snaps", 0L, NonMagickOptionFlag, MagickFalse },
1012  { "-snaps", 1L, NonMagickOptionFlag, MagickFalse },
1013  { "+solarize", 1L, DeprecateOptionFlag, MagickTrue },
1014  { "-solarize", 1L, SimpleOperatorFlag, MagickFalse },
1015  { "+sparse-color", 1L, DeprecateOptionFlag, MagickTrue },
1016  { "-sparse-color", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
1017  { "+splice", 1L, DeprecateOptionFlag, MagickTrue },
1018  { "-splice", 1L, SimpleOperatorFlag, MagickFalse },
1019  { "+spread", 1L, DeprecateOptionFlag, MagickTrue },
1020  { "-spread", 1L, SimpleOperatorFlag, MagickFalse },
1021  { "+statistic", 2L, DeprecateOptionFlag, MagickTrue },
1022  { "-statistic", 2L, SimpleOperatorFlag, MagickFalse },
1023  { "+stegano", 0L, NonMagickOptionFlag, MagickFalse },
1024  { "-stegano", 1L, NonMagickOptionFlag, MagickFalse },
1025  { "+stereo", 0L, DeprecateOptionFlag, MagickTrue },
1026  { "-stereo", 1L, NonMagickOptionFlag, MagickFalse },
1027  { "+stretch", 1L, DeprecateOptionFlag, MagickTrue },
1028  { "-stretch", 1L, SimpleOperatorFlag, MagickFalse },
1029  { "+strip", 0L, DeprecateOptionFlag, MagickTrue },
1030  { "-strip", 0L, SimpleOperatorFlag, MagickFalse },
1031  { "+stroke", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
1032  { "-stroke", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
1033  { "-strokewidth", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
1034  { "+strokewidth", 1L, ImageInfoOptionFlag, MagickFalse },
1035  { "+style", 0L, DrawInfoOptionFlag, MagickFalse },
1036  { "-style", 1L, DrawInfoOptionFlag, MagickFalse },
1037  { "-subimage", 0L, ListOperatorFlag, MagickFalse },
1038  { "-subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
1039  { "+subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
1040  { "+swap", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
1041  { "-swap", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
1042  { "+swirl", 1L, DeprecateOptionFlag, MagickTrue },
1043  { "-swirl", 1L, SimpleOperatorFlag, MagickFalse },
1044  { "-synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
1045  { "+synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
1046  { "-taint", 0L, ImageInfoOptionFlag, MagickFalse },
1047  { "+taint", 0L, ImageInfoOptionFlag, MagickFalse },
1048  { "+text-font", 0L, NonMagickOptionFlag, MagickFalse },
1049  { "-text-font", 1L, NonMagickOptionFlag, MagickFalse },
1050  { "+texture", 0L, ImageInfoOptionFlag, MagickFalse },
1052  { "+threshold", 0L, SimpleOperatorFlag, MagickFalse },
1053  { "-threshold", 1L, SimpleOperatorFlag, MagickFalse },
1054  { "+thumbnail", 1L, DeprecateOptionFlag, MagickTrue },
1055  { "-thumbnail", 1L, SimpleOperatorFlag, MagickFalse },
1058  { "+tile-offset", 0L, ImageInfoOptionFlag, MagickFalse },
1059  { "-tile-offset", 1L, ImageInfoOptionFlag, MagickFalse },
1060  { "-tint", 1L, SimpleOperatorFlag, MagickFalse },
1061  { "+tint", 1L, SimpleOperatorFlag, MagickFalse },
1062  { "+title", 0L, NonMagickOptionFlag, MagickFalse },
1063  { "-title", 1L, NonMagickOptionFlag, MagickFalse },
1064  { "+transform", 0L, DeprecateOptionFlag, MagickTrue },
1065  { "-transform", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
1066  { "-transparent", 1L, SimpleOperatorFlag, MagickFalse },
1067  { "+transparent", 1L, SimpleOperatorFlag, MagickFalse },
1068  { "+transparent-color", 0L, ImageInfoOptionFlag, MagickFalse },
1069  { "-transparent-color", 1L, ImageInfoOptionFlag, MagickFalse },
1070  { "+transpose", 0L, DeprecateOptionFlag, MagickTrue },
1071  { "-transpose", 0L, SimpleOperatorFlag, MagickFalse },
1072  { "+transverse", 0L, DeprecateOptionFlag, MagickTrue },
1073  { "-transverse", 0L, SimpleOperatorFlag, MagickFalse },
1074  { "+treedepth", 1L, DeprecateOptionFlag, MagickTrue },
1075  { "-treedepth", 1L, QuantizeInfoOptionFlag, MagickFalse },
1076  { "+trim", 0L, DeprecateOptionFlag, MagickTrue },
1077  { "-trim", 0L, SimpleOperatorFlag, MagickFalse },
1080  { "+undercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
1081  { "-undercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
1082  { "-unique", 0L, SimpleOperatorFlag, MagickFalse },
1083  { "+unique", 0L, SimpleOperatorFlag, MagickFalse },
1084  { "+unique-colors", 0L, DeprecateOptionFlag, MagickTrue },
1085  { "-unique-colors", 0L, SimpleOperatorFlag, MagickFalse },
1086  { "+units", 0L, ImageInfoOptionFlag, MagickFalse },
1087  { "-units", 1L, ImageInfoOptionFlag, MagickFalse },
1088  { "+unsharp", 1L, DeprecateOptionFlag, MagickTrue },
1089  { "-unsharp", 1L, SimpleOperatorFlag, MagickFalse },
1090  { "+update", 0L, NonMagickOptionFlag, MagickFalse },
1091  { "-update", 1L, NonMagickOptionFlag, MagickFalse },
1092  { "+use-pixmap", 0L, NonMagickOptionFlag, MagickFalse },
1093  { "-use-pixmap", 1L, NonMagickOptionFlag, MagickFalse },
1094  { "-verbose", 0L, ImageInfoOptionFlag, MagickFalse },
1095  { "+verbose", 0L, ImageInfoOptionFlag, MagickFalse },
1096  { "+version", 0L, DeprecateOptionFlag, MagickTrue },
1097  { "-version", 0L, NoImageOperatorFlag, MagickFalse },
1098  { "+view", 0L, ImageInfoOptionFlag, MagickFalse },
1099  { "-view", 1L, ImageInfoOptionFlag, MagickFalse },
1100  { "+vignette", 1L, DeprecateOptionFlag, MagickTrue },
1101  { "-vignette", 1L, SimpleOperatorFlag, MagickFalse },
1102  { "+visual", 0L, NonMagickOptionFlag, MagickFalse },
1103  { "-visual", 1L, NonMagickOptionFlag, MagickFalse },
1104  { "+watermark", 0L, NonMagickOptionFlag, MagickFalse },
1105  { "-watermark", 1L, NonMagickOptionFlag, MagickFalse },
1106  { "+wave", 1L, DeprecateOptionFlag, MagickTrue },
1107  { "-wave", 1L, SimpleOperatorFlag, MagickFalse },
1108  { "+wavelet-denoise", 0L, DeprecateOptionFlag, MagickTrue },
1109  { "-wavelet-denoise", 1L, SimpleOperatorFlag, MagickFalse },
1110  { "+weight", 1L, DeprecateOptionFlag, MagickTrue },
1111  { "-weight", 1L, DrawInfoOptionFlag, MagickFalse },
1112  { "+white-point", 0L, ImageInfoOptionFlag, MagickFalse },
1113  { "-white-point", 1L, ImageInfoOptionFlag, MagickFalse },
1114  { "+white-threshold", 1L, DeprecateOptionFlag, MagickTrue },
1115  { "-white-threshold", 1L, SimpleOperatorFlag, MagickFalse },
1116  { "+window", 0L, NonMagickOptionFlag, MagickFalse },
1117  { "-window", 1L, NonMagickOptionFlag, MagickFalse },
1118  { "+window-group", 0L, NonMagickOptionFlag, MagickFalse },
1119  { "-window-group", 1L, NonMagickOptionFlag, MagickFalse },
1122  { "+write-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
1123  { "-write-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
1124  { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
1125  },
1127  {
1135  { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
1136  },
1138  {
1216  },
1218  {
1241  { "RunlengthEncoded", RLECompression, UndefinedOptionFlag, MagickFalse },
1244  },
1246  {
1247  { "Undefined", UndefinedData, UndefinedOptionFlag, MagickTrue },
1250  { "Short", ShortData, UndefinedOptionFlag, MagickFalse },
1251  { "String", StringData, UndefinedOptionFlag, MagickFalse },
1252  { (char *) NULL, UndefinedData, UndefinedOptionFlag, MagickFalse }
1253  },
1255  {
1262  },
1264  {
1266  { "right-to-left", RightToLeftDirection, UndefinedOptionFlag, MagickFalse },
1267  { "left-to-right", LeftToRightDirection, UndefinedOptionFlag, MagickFalse },
1269  },
1271  {
1280  { (char *) NULL, UndefinedDispose, UndefinedOptionFlag, MagickFalse }
1281  },
1283  {
1286  { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
1289  { "PerspectiveProjection", PerspectiveProjectionDistortion, UndefinedOptionFlag, MagickFalse },
1304  },
1306  {
1311  { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
1312  },
1314  {
1315  { "Undefined", UndefinedEndian, UndefinedOptionFlag, MagickTrue },
1318  { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
1319  },
1321  {
1360  },
1362  {
1363  { "Undefined", UndefinedRule, UndefinedOptionFlag, MagickTrue },
1364  { "Evenodd", EvenOddRule, UndefinedOptionFlag, MagickFalse },
1365  { "NonZero", NonZeroRule, UndefinedOptionFlag, MagickFalse },
1366  { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
1367  },
1369  {
1370  { "Undefined", UndefinedFilter, UndefinedOptionFlag, MagickTrue },
1381  { "Hanning", HannFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1388  { "Lanczos2Sharp", Lanczos2SharpFilter, UndefinedOptionFlag, MagickFalse },
1389  { "LanczosRadius", LanczosRadiusFilter, UndefinedOptionFlag, MagickFalse },
1390  { "LanczosSharp", LanczosSharpFilter, UndefinedOptionFlag, MagickFalse },
1394  { "Quadratic", QuadraticFilter, UndefinedOptionFlag, MagickFalse },
1396  { "RobidouxSharp", RobidouxSharpFilter, UndefinedOptionFlag, MagickFalse },
1400  { "CubicSpline", CubicSplineFilter, UndefinedOptionFlag, MagickFalse },
1403  { "Welsh", WelchFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
1404  { (char *) NULL, UndefinedFilter, UndefinedOptionFlag, MagickFalse }
1405  },
1407  {
1414  },
1416  {
1420  { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
1421  },
1423  {
1424  { "Undefined", UndefinedGravity, UndefinedOptionFlag, MagickTrue },
1436  { (char *) NULL, UndefinedGravity, UndefinedOptionFlag, MagickFalse }
1437  },
1439  {
1440  { "Undefined", UndefinedIntent, UndefinedOptionFlag, MagickTrue },
1442  { "Perceptual", PerceptualIntent, UndefinedOptionFlag, MagickFalse },
1444  { "Saturation", SaturationIntent, UndefinedOptionFlag, MagickFalse },
1445  { (char *) NULL, UndefinedIntent, UndefinedOptionFlag, MagickFalse }
1446  },
1448  {
1458  },
1460  {
1473  { "NearestNeighbor", NearestInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1475 /* { "Filter", FilterInterpolatePixel, UndefinedOptionFlag, MagickFalse }, */
1477  },
1479  {
1480  { "Undefined", UndefinedKernel, UndefinedOptionFlag, MagickTrue },
1488  { "Laplacian", LaplacianKernel, UndefinedOptionFlag, MagickFalse },
1497  { "Rectangle", RectangleKernel, UndefinedOptionFlag, MagickFalse },
1506  { "Diagonals", DiagonalsKernel, UndefinedOptionFlag, MagickFalse },
1508  { "LineJunctions", LineJunctionsKernel, UndefinedOptionFlag, MagickFalse },
1510  { "ConvexHull", ConvexHullKernel, UndefinedOptionFlag, MagickFalse },
1513  { "Chebyshev", ChebyshevKernel, UndefinedOptionFlag, MagickFalse },
1514  { "Manhattan", ManhattanKernel, UndefinedOptionFlag, MagickFalse },
1515  { "Octagonal", OctagonalKernel, UndefinedOptionFlag, MagickFalse },
1516  { "Euclidean", EuclideanKernel, UndefinedOptionFlag, MagickFalse },
1517  { "User Defined", UserDefinedKernel, UndefinedOptionFlag, MagickTrue },
1518  { (char *) NULL, UndefinedKernel, UndefinedOptionFlag, MagickFalse }
1519  },
1521  {
1522  { "Undefined", UndefinedLayer, UndefinedOptionFlag, MagickTrue },
1523  { "Coalesce", CoalesceLayer, UndefinedOptionFlag, MagickFalse },
1524  { "CompareAny", CompareAnyLayer, UndefinedOptionFlag, MagickFalse },
1525  { "CompareClear", CompareClearLayer, UndefinedOptionFlag, MagickFalse },
1526  { "CompareOverlay", CompareOverlayLayer, UndefinedOptionFlag, MagickFalse },
1527  { "Dispose", DisposeLayer, UndefinedOptionFlag, MagickFalse },
1528  { "Optimize", OptimizeLayer, UndefinedOptionFlag, MagickFalse },
1529  { "OptimizeFrame", OptimizeImageLayer, UndefinedOptionFlag, MagickFalse },
1530  { "OptimizePlus", OptimizePlusLayer, UndefinedOptionFlag, MagickFalse },
1531  { "OptimizeTransparency", OptimizeTransLayer, UndefinedOptionFlag, MagickFalse },
1532  { "RemoveDups", RemoveDupsLayer, UndefinedOptionFlag, MagickFalse },
1533  { "RemoveZero", RemoveZeroLayer, UndefinedOptionFlag, MagickFalse },
1534  { "Composite", CompositeLayer, UndefinedOptionFlag, MagickFalse },
1536  { "Flatten", FlattenLayer, UndefinedOptionFlag, MagickFalse },
1538  { "TrimBounds", TrimBoundsLayer, UndefinedOptionFlag, MagickFalse },
1539  { (char *) NULL, UndefinedLayer, UndefinedOptionFlag, MagickFalse }
1540  },
1542  {
1543  { "Undefined", UndefinedCap, UndefinedOptionFlag, MagickTrue },
1544  { "Butt", ButtCap, UndefinedOptionFlag, MagickFalse },
1545  { "Round", RoundCap, UndefinedOptionFlag, MagickFalse },
1546  { "Square", SquareCap, UndefinedOptionFlag, MagickFalse },
1547  { (char *) NULL, UndefinedCap, UndefinedOptionFlag, MagickFalse }
1548  },
1550  {
1551  { "Undefined", UndefinedJoin, UndefinedOptionFlag, MagickTrue },
1552  { "Bevel", BevelJoin, UndefinedOptionFlag, MagickFalse },
1553  { "Miter", MiterJoin, UndefinedOptionFlag, MagickFalse },
1554  { "Round", RoundJoin, UndefinedOptionFlag, MagickFalse },
1555  { (char *) NULL, UndefinedJoin, UndefinedOptionFlag, MagickFalse }
1556  },
1558  {
1640  },
1642  {
1643  { "Undefined", UndefinedEvents, UndefinedOptionFlag, MagickTrue },
1645  { "Accelerate", AccelerateEvent, UndefinedOptionFlag, MagickFalse },
1646  { "Annotate", AnnotateEvent, UndefinedOptionFlag, MagickFalse },
1650  { "Command", CommandEvent, UndefinedOptionFlag, MagickFalse },
1651  { "Configure", ConfigureEvent, UndefinedOptionFlag, MagickFalse },
1652  { "Deprecate", DeprecateEvent, UndefinedOptionFlag, MagickFalse },
1654  { "Exception", ExceptionEvent, UndefinedOptionFlag, MagickFalse },
1660  { "Resource", ResourceEvent, UndefinedOptionFlag, MagickFalse },
1662  { "Transform", TransformEvent, UndefinedOptionFlag, MagickFalse },
1666  { (char *) NULL, UndefinedEvents, UndefinedOptionFlag, MagickFalse }
1667  },
1669  {
1684  },
1686  {
1687  { "Undefined", UndefinedMethod, UndefinedOptionFlag, MagickTrue },
1688  { "FillToBorder", FillToBorderMethod, UndefinedOptionFlag, MagickFalse },
1689  { "Floodfill", FloodfillMethod, UndefinedOptionFlag, MagickFalse },
1693  { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1694  },
1696  {
1697  { "Undefined", UndefinedMode, UndefinedOptionFlag, MagickTrue },
1698  { "Concatenate", ConcatenateMode, UndefinedOptionFlag, MagickFalse },
1699  { "Frame", FrameMode, UndefinedOptionFlag, MagickFalse },
1700  { "Unframe", UnframeMode, UndefinedOptionFlag, MagickFalse },
1701  { (char *) NULL, UndefinedMode, UndefinedOptionFlag, MagickFalse }
1702  },
1704  {
1732  { "IterativeDistance", IterativeDistanceMorphology, UndefinedOptionFlag, MagickFalse },
1735  },
1737  {
1738  { "Undefined", UndefinedNoise, UndefinedOptionFlag, MagickTrue },
1739  { "Gaussian", GaussianNoise, UndefinedOptionFlag, MagickFalse },
1740  { "Impulse", ImpulseNoise, UndefinedOptionFlag, MagickFalse },
1741  { "Laplacian", LaplacianNoise, UndefinedOptionFlag, MagickFalse },
1743  { "Poisson", PoissonNoise, UndefinedOptionFlag, MagickFalse },
1745  { "Uniform", UniformNoise, UndefinedOptionFlag, MagickFalse },
1746  { (char *) NULL, UndefinedNoise, UndefinedOptionFlag, MagickFalse }
1747  },
1749  {
1760  },
1762  {
1794  },
1796  {
1809  },
1811  {
1818  },
1820  {
1826  },
1828  {
1838  },
1840  {
1848  },
1850  {
1851  { "Undefined", UndefinedPreview, UndefinedOptionFlag, MagickTrue },
1867  { "ReduceNoise", ReduceNoisePreview, UndefinedOptionFlag, MagickFalse },
1881  { (char *) NULL, UndefinedPreview, UndefinedOptionFlag, MagickFalse }
1882  },
1884  {
1903  },
1905  {
1911  },
1913  {
1916  { "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
1921  },
1923  {
1937  },
1939  {
1948  },
1950  {
1961  { "StandardDeviation", StandardDeviationStatistic, UndefinedOptionFlag, MagickFalse },
1962  { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
1963  },
1965  {
1966  { "Undefined", UndefinedPixel, UndefinedOptionFlag, MagickTrue },
1971  { "LongLong", LongLongPixel, UndefinedOptionFlag, MagickFalse },
1972  { "Quantum", QuantumPixel, UndefinedOptionFlag, MagickFalse },
1975  },
1977  {
1978  { "Undefined", UndefinedStretch, UndefinedOptionFlag, MagickTrue },
1982  { "ExtraCondensed", ExtraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1983  { "ExtraExpanded", ExtraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1985  { "SemiCondensed", SemiCondensedStretch, UndefinedOptionFlag, MagickFalse },
1986  { "SemiExpanded", SemiExpandedStretch, UndefinedOptionFlag, MagickFalse },
1987  { "UltraCondensed", UltraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1988  { "UltraExpanded", UltraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1989  { (char *) NULL, UndefinedStretch, UndefinedOptionFlag, MagickFalse }
1990  },
1992  {
1993  { "Undefined", UndefinedStyle, UndefinedOptionFlag, MagickTrue },
1998  { "Oblique", ObliqueStyle, UndefinedOptionFlag, MagickFalse },
1999  { (char *) NULL, UndefinedStyle, UndefinedOptionFlag, MagickFalse }
2000  },
2002  {
2003  { "animate", 0, UndefinedOptionFlag, MagickFalse },
2004  { "compare", 0, UndefinedOptionFlag, MagickFalse },
2005  { "composite", 0, UndefinedOptionFlag, MagickFalse },
2006  { "conjure", 0, UndefinedOptionFlag, MagickFalse },
2007  { "convert", 0, UndefinedOptionFlag, MagickFalse },
2008  { "display", 0, UndefinedOptionFlag, MagickFalse },
2009  { "identify", 0, UndefinedOptionFlag, MagickFalse },
2010  { "import", 0, UndefinedOptionFlag, MagickFalse },
2011  { "mogrify", 0, UndefinedOptionFlag, MagickFalse },
2012  { "montage", 0, UndefinedOptionFlag, MagickFalse },
2013  { "stream", 0, UndefinedOptionFlag, MagickFalse },
2014  { (char *) NULL, 0, UndefinedOptionFlag, MagickFalse }
2015  },
2017  {
2018  { "Undefined", UndefinedType, UndefinedOptionFlag, MagickTrue },
2019  { "Bilevel", BilevelType, UndefinedOptionFlag, MagickFalse },
2020  { "ColorSeparation", ColorSeparationType, UndefinedOptionFlag, MagickFalse },
2021  { "ColorSeparationAlpha", ColorSeparationAlphaType, UndefinedOptionFlag, MagickFalse },
2022  { "ColorSeparationMatte", ColorSeparationAlphaType, UndefinedOptionFlag, MagickFalse },
2023  { "Grayscale", GrayscaleType, UndefinedOptionFlag, MagickFalse },
2024  { "GrayscaleAlpha", GrayscaleAlphaType, UndefinedOptionFlag, MagickFalse },
2025  { "GrayscaleMatte", GrayscaleAlphaType, UndefinedOptionFlag, MagickFalse },
2026  { "Optimize", OptimizeType, UndefinedOptionFlag, MagickFalse },
2027  { "Palette", PaletteType, UndefinedOptionFlag, MagickFalse },
2028  { "PaletteBilevelAlpha", PaletteBilevelAlphaType, UndefinedOptionFlag, MagickFalse },
2029  { "PaletteBilevelMatte", PaletteBilevelAlphaType, UndefinedOptionFlag, MagickFalse },
2030  { "PaletteAlpha", PaletteAlphaType, UndefinedOptionFlag, MagickFalse },
2031  { "PaletteMatte", PaletteAlphaType, UndefinedOptionFlag, MagickFalse },
2032  { "TrueColorAlpha", TrueColorAlphaType, UndefinedOptionFlag, MagickFalse },
2033  { "TrueColorMatte", TrueColorAlphaType, UndefinedOptionFlag, MagickFalse },
2034  { "TrueColor", TrueColorType, UndefinedOptionFlag, MagickFalse },
2035  { (char *) NULL, UndefinedType, UndefinedOptionFlag, MagickFalse }
2036  },
2038  {
2047  { "FormatsMemory", FormatsMemoryValidate, UndefinedOptionFlag, MagickFalse },
2054  },
2056  {
2076  },
2078  {
2079  { "Undefined", 0L, UndefinedOptionFlag, MagickTrue },
2080  { "Thin", 100L, UndefinedOptionFlag, MagickFalse },
2081  { "ExtraLight", 200L, UndefinedOptionFlag, MagickFalse },
2082  { "UltraLight", 200L, UndefinedOptionFlag, MagickFalse },
2083  { "Light", 300L, DeprecateOptionFlag, MagickTrue },
2084  { "Normal", 400L, UndefinedOptionFlag, MagickFalse },
2085  { "Regular", 400L, UndefinedOptionFlag, MagickFalse },
2086  { "Medium", 500L, UndefinedOptionFlag, MagickFalse },
2087  { "DemiBold", 600L, UndefinedOptionFlag, MagickFalse },
2088  { "SemiBold", 600L, UndefinedOptionFlag, MagickFalse },
2089  { "Bold", 700L, UndefinedOptionFlag, MagickFalse },
2090  { "ExtraBold", 800L, UndefinedOptionFlag, MagickFalse },
2091  { "UltraBold", 800L, UndefinedOptionFlag, MagickFalse },
2092  { "Heavy", 900L, UndefinedOptionFlag, MagickFalse },
2093  { "Black", 900L, UndefinedOptionFlag, MagickFalse },
2094  { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
2095  };
2096 
2097 /*
2098 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2099 % %
2100 % %
2101 % %
2102 % C l o n e I m a g e O p t i o n s %
2103 % %
2104 % %
2105 % %
2106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2107 %
2108 % CloneImageOptions() clones all global image options, to another image_info
2109 %
2110 % The format of the CloneImageOptions method is:
2111 %
2112 % MagickBooleanType CloneImageOptions(ImageInfo *image_info,
2113 % const ImageInfo *clone_info)
2114 %
2115 % A description of each parameter follows:
2116 %
2117 % o image_info: the image info to recieve the cloned options.
2118 %
2119 % o clone_info: the source image info for options to clone.
2120 %
2121 */
2123  const ImageInfo *clone_info)
2124 {
2125  assert(image_info != (ImageInfo *) NULL);
2126  assert(image_info->signature == MagickCoreSignature);
2127  if (image_info->debug != MagickFalse)
2129  image_info->filename);
2130  assert(clone_info != (const ImageInfo *) NULL);
2131  assert(clone_info->signature == MagickCoreSignature);
2132  if (clone_info->options != (void *) NULL)
2133  {
2134  if (image_info->options != (void *) NULL)
2135  DestroyImageOptions(image_info);
2136  image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
2137  (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
2138  }
2139  return(MagickTrue);
2140 }
2141 
2142 /*
2143 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2144 % %
2145 % %
2146 % %
2147 % D e f i n e I m a g e O p t i o n %
2148 % %
2149 % %
2150 % %
2151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2152 %
2153 % DefineImageOption() associates an assignment string of the form
2154 % "key=value" with a global image option. It is equivelent to
2155 % SetImageOption().
2156 %
2157 % The format of the DefineImageOption method is:
2158 %
2159 % MagickBooleanType DefineImageOption(ImageInfo *image_info,
2160 % const char *option)
2161 %
2162 % A description of each parameter follows:
2163 %
2164 % o image_info: the image info.
2165 %
2166 % o option: the image option assignment string.
2167 %
2168 */
2170  const char *option)
2171 {
2172  char
2173  key[MagickPathExtent],
2174  value[MagickPathExtent];
2175 
2176  register char
2177  *p;
2178 
2179  assert(image_info != (ImageInfo *) NULL);
2180  assert(option != (const char *) NULL);
2181  (void) CopyMagickString(key,option,MagickPathExtent);
2182  for (p=key; *p != '\0'; p++)
2183  if (*p == '=')
2184  break;
2185  *value='\0';
2186  if (*p == '=')
2187  (void) CopyMagickString(value,p+1,MagickPathExtent);
2188  *p='\0';
2189  return(SetImageOption(image_info,key,value));
2190 }
2191 
2192 /*
2193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2194 % %
2195 % %
2196 % %
2197 % D e l e t e I m a g e O p t i o n %
2198 % %
2199 % %
2200 % %
2201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2202 %
2203 % DeleteImageOption() deletes an key from the global image options.
2204 %
2205 % Returns MagickTrue is the option is found and deleted from the Options.
2206 %
2207 % The format of the DeleteImageOption method is:
2208 %
2209 % MagickBooleanType DeleteImageOption(ImageInfo *image_info,
2210 % const char *key)
2211 %
2212 % A description of each parameter follows:
2213 %
2214 % o image_info: the image info.
2215 %
2216 % o option: the image option.
2217 %
2218 */
2220  const char *option)
2221 {
2222  assert(image_info != (ImageInfo *) NULL);
2223  assert(image_info->signature == MagickCoreSignature);
2224  if (image_info->debug != MagickFalse)
2226  image_info->filename);
2227  if (image_info->options == (void *) NULL)
2228  return(MagickFalse);
2229  return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
2230 }
2231 
2232 /*
2233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2234 % %
2235 % %
2236 % %
2237 % D e s t r o y I m a g e O p t i o n s %
2238 % %
2239 % %
2240 % %
2241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2242 %
2243 % DestroyImageOptions() destroys all global options and associated memory
2244 % attached to the given image_info image list.
2245 %
2246 % The format of the DestroyDefines method is:
2247 %
2248 % void DestroyImageOptions(ImageInfo *image_info)
2249 %
2250 % A description of each parameter follows:
2251 %
2252 % o image_info: the image info.
2253 %
2254 */
2256 {
2257  assert(image_info != (ImageInfo *) NULL);
2258  assert(image_info->signature == MagickCoreSignature);
2259  if (image_info->debug != MagickFalse)
2261  image_info->filename);
2262  if (image_info->options != (void *) NULL)
2263  image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
2264 }
2265 
2266 /*
2267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2268 % %
2269 % %
2270 % %
2271 % G e t I m a g e O p t i o n %
2272 % %
2273 % %
2274 % %
2275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2276 %
2277 % GetImageOption() gets a value associated with the global image options.
2278 %
2279 % The returned string is a constant string in the tree and should NOT be
2280 % freed by the caller.
2281 %
2282 % The format of the GetImageOption method is:
2283 %
2284 % const char *GetImageOption(const ImageInfo *image_info,
2285 % const char *option)
2286 %
2287 % A description of each parameter follows:
2288 %
2289 % o image_info: the image info.
2290 %
2291 % o option: the option.
2292 %
2293 */
2294 MagickExport const char *GetImageOption(const ImageInfo *image_info,
2295  const char *option)
2296 {
2297  assert(image_info != (ImageInfo *) NULL);
2298  assert(image_info->signature == MagickCoreSignature);
2299  if (image_info->debug != MagickFalse)
2301  image_info->filename);
2302  if (image_info->options == (void *) NULL)
2303  return((const char *) NULL);
2304  return((const char *) GetValueFromSplayTree((SplayTreeInfo *)
2305  image_info->options,option));
2306 }
2307 
2308 /*
2309 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2310 % %
2311 % %
2312 % %
2313 % G e t C o m m a n d O p t i o n F l a g s %
2314 % %
2315 % %
2316 % %
2317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2318 %
2319 % GetCommandOptionFlags() parses a string and returns an enumerated option
2320 % flags(s). Return a value of -1 if no such option is found.
2321 %
2322 % The format of the GetCommandOptionFlags method is:
2323 %
2324 % ssize_t GetCommandOptionFlags(const CommandOption option,
2325 % const MagickBooleanType list,const char *options)
2326 %
2327 % A description of each parameter follows:
2328 %
2329 % o option: Index to the option table to lookup
2330 %
2331 % o list: A option other than zero permits more than one option separated by
2332 % a comma or pipe.
2333 %
2334 % o options: One or more options separated by commas.
2335 %
2336 */
2337 
2338 static const OptionInfo *GetOptionInfo(const CommandOption option)
2339 {
2340  switch (option)
2341  {
2342  case MagickAlignOptions: return(AlignOptions);
2345  case MagickBooleanOptions: return(BooleanOptions);
2346  case MagickCacheOptions: return(CacheOptions);
2347  case MagickChannelOptions: return(ChannelOptions);
2348  case MagickClassOptions: return(ClassOptions);
2349  case MagickCLIOptions: return(CLIOptions);
2350  case MagickClipPathOptions: return(ClipPathOptions);
2352  case MagickCommandOptions: return(CommandOptions);
2354  case MagickComplexOptions: return(ComplexOptions);
2355  case MagickComposeOptions: return(ComposeOptions);
2356  case MagickCompressOptions: return(CompressOptions);
2357  case MagickDataTypeOptions: return(DataTypeOptions);
2358  case MagickDebugOptions: return(LogEventOptions);
2359  case MagickDecorateOptions: return(DecorateOptions);
2361  case MagickDisposeOptions: return(DisposeOptions);
2362  case MagickDistortOptions: return(DistortOptions);
2363  case MagickDitherOptions: return(DitherOptions);
2364  case MagickEndianOptions: return(EndianOptions);
2365  case MagickEvaluateOptions: return(EvaluateOptions);
2366  case MagickFillRuleOptions: return(FillRuleOptions);
2367  case MagickFilterOptions: return(FilterOptions);
2368  case MagickFunctionOptions: return(FunctionOptions);
2369  case MagickGradientOptions: return(GradientOptions);
2370  case MagickGravityOptions: return(GravityOptions);
2371  case MagickIntentOptions: return(IntentOptions);
2374  case MagickKernelOptions: return(KernelOptions);
2375  case MagickLayerOptions: return(LayerOptions);
2376  case MagickLineCapOptions: return(LineCapOptions);
2377  case MagickLineJoinOptions: return(LineJoinOptions);
2378  case MagickListOptions: return(ListOptions);
2379  case MagickLogEventOptions: return(LogEventOptions);
2380  case MagickMetricOptions: return(MetricOptions);
2381  case MagickMethodOptions: return(MethodOptions);
2382  case MagickModeOptions: return(ModeOptions);
2384  case MagickNoiseOptions: return(NoiseOptions);
2392  case MagickPreviewOptions: return(PreviewOptions);
2396  case MagickResourceOptions: return(ResourceOptions);
2399  case MagickStorageOptions: return(StorageOptions);
2400  case MagickStretchOptions: return(StretchOptions);
2401  case MagickToolOptions: return(ToolOptions);
2402  case MagickStyleOptions: return(StyleOptions);
2403  case MagickTypeOptions: return(TypeOptions);
2404  case MagickValidateOptions: return(ValidateOptions);
2406  case MagickWeightOptions: return(WeightOptions);
2407  default: break;
2408  }
2409  return((const OptionInfo *) NULL);
2410 }
2411 
2413  const MagickBooleanType list,const char *options)
2414 {
2415  char
2416  token[MagickPathExtent];
2417 
2418  const OptionInfo
2419  *command_info,
2420  *option_info;
2421 
2422  int
2423  sentinel;
2424 
2426  negate;
2427 
2428  register char
2429  *q;
2430 
2431  register const char
2432  *p;
2433 
2434  register ssize_t
2435  i;
2436 
2437  ssize_t
2438  option_types;
2439 
2440  option_info=GetOptionInfo(option);
2441  if (option_info == (const OptionInfo *) NULL)
2442  return(UndefinedOptionFlag);
2443  option_types=0;
2444  sentinel=',';
2445  if (strchr(options,'|') != (char *) NULL)
2446  sentinel='|';
2447  for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2448  {
2449  while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2450  (*p != '\0'))
2451  p++;
2452  negate=(*p == '!') ? MagickTrue : MagickFalse;
2453  if (negate != MagickFalse)
2454  p++;
2455  q=token;
2456  while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2457  (*p != '\0'))
2458  {
2459  if ((q-token) >= (MagickPathExtent-1))
2460  break;
2461  *q++=(*p++);
2462  }
2463  *q='\0';
2464  for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2465  if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2466  break;
2467  command_info=option_info+i;
2468  if ((command_info->mnemonic == (const char *) NULL) &&
2469  ((strchr(token+1,'-') != (char *) NULL) ||
2470  (strchr(token+1,'_') != (char *) NULL)))
2471  {
2472  while ((q=strchr(token+1,'-')) != (char *) NULL)
2473  (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2474  while ((q=strchr(token+1,'_')) != (char *) NULL)
2475  (void) CopyMagickString(q,q+1,MagickPathExtent-strlen(q));
2476  for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2477  if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2478  break;
2479  command_info=option_info+i;
2480  }
2481  if (command_info->mnemonic == (const char *) NULL)
2482  return(-1);
2483  if (negate != MagickFalse)
2484  option_types=option_types &~ command_info->flags;
2485  else
2486  option_types=option_types | command_info->flags;
2487  if (list == MagickFalse)
2488  break;
2489  }
2490  return(option_types);
2491 }
2492 
2493 /*
2494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2495 % %
2496 % %
2497 % %
2498 % G e t C o m m a n d O p t i o n I n f o %
2499 % %
2500 % %
2501 % %
2502 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2503 %
2504 % GetCommandOptionInfo() returns a pointer to the matching OptionInfo entry
2505 % for the "CommandOptions" table. It returns both the type (argument count)
2506 % and flags (argument type).
2507 %
2508 % The format of the GetCommandOptionInfo method is:
2509 %
2510 % const char **GetCommandOptionInfo(const char *option)
2511 %
2512 % A description of each parameter follows:
2513 %
2514 % o option: the option.
2515 %
2516 */
2518 {
2519  register ssize_t
2520  i;
2521 
2522  for (i=0; CommandOptions[i].mnemonic != (char *) NULL; i++)
2523  if (LocaleCompare(option,CommandOptions[i].mnemonic) == 0)
2524  break;
2525  return(CommandOptions+i);
2526 }
2527 
2528 /*
2529 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2530 % %
2531 % %
2532 % %
2533 % G e t C o m m a n d O p t i o n s %
2534 % %
2535 % %
2536 % %
2537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2538 %
2539 % GetCommandOptions() returns a list of command options.
2540 %
2541 % The format of the GetCommandOptions method is:
2542 %
2543 % const char **GetCommandOptions(const CommandOption option)
2544 %
2545 % A description of each parameter follows:
2546 %
2547 % o option: the option.
2548 %
2549 */
2551 {
2552  char
2553  **options;
2554 
2555  const OptionInfo
2556  *option_info;
2557 
2558  register ssize_t
2559  i;
2560 
2561  option_info=GetOptionInfo(option);
2562  if (option_info == (const OptionInfo *) NULL)
2563  return((char **) NULL);
2564  for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
2565  options=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*options));
2566  if (options == (char **) NULL)
2567  ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
2568  for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2569  options[i]=AcquireString(option_info[i].mnemonic);
2570  options[i]=(char *) NULL;
2571  return(options);
2572 }
2573 
2574 /*
2575 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2576 % %
2577 % %
2578 % %
2579 % G e t N e x t I m a g e O p t i o n %
2580 % %
2581 % %
2582 % %
2583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2584 %
2585 % GetNextImageOption() gets the next global option value.
2586 %
2587 % The format of the GetNextImageOption method is:
2588 %
2589 % char *GetNextImageOption(const ImageInfo *image_info)
2590 %
2591 % A description of each parameter follows:
2592 %
2593 % o image_info: the image info.
2594 %
2595 */
2597 {
2598  assert(image_info != (ImageInfo *) NULL);
2599  assert(image_info->signature == MagickCoreSignature);
2600  if (image_info->debug != MagickFalse)
2602  image_info->filename);
2603  if (image_info->options == (void *) NULL)
2604  return((char *) NULL);
2605  return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
2606 }
2607 
2608 /*
2609 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2610 % %
2611 % %
2612 % %
2613 % I s C o m m a n d O p t i o n %
2614 % %
2615 % %
2616 % %
2617 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2618 %
2619 % IsCommandOption() returns MagickTrue if the option begins with a - or + and
2620 % the first character that follows is alphanumeric.
2621 %
2622 % The format of the IsCommandOption method is:
2623 %
2624 % MagickBooleanType IsCommandOption(const char *option)
2625 %
2626 % A description of each parameter follows:
2627 %
2628 % o option: the option.
2629 %
2630 */
2632 {
2633  assert(option != (const char *) NULL);
2634  if ((*option != '-') && (*option != '+'))
2635  return(MagickFalse);
2636  if (strlen(option) == 1)
2637  return(((*option == '{') || (*option == '}') || (*option == '[') ||
2638  (*option == ']')) ? MagickTrue : MagickFalse);
2639  option++;
2640  if (isalpha((int) ((unsigned char) *option)) == 0)
2641  return(MagickFalse);
2642  return(MagickTrue);
2643 }
2644 
2645 /*
2646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2647 % %
2648 % %
2649 % %
2650 % C o m m a n d O p t i o n T o M n e m o n i c %
2651 % %
2652 % %
2653 % %
2654 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2655 %
2656 % CommandOptionToMnemonic() returns an enumerated value as a mnemonic.
2657 %
2658 % The format of the CommandOptionToMnemonic method is:
2659 %
2660 % const char *CommandOptionToMnemonic(const CommandOption option,
2661 % const ssize_t type)
2662 %
2663 % A description of each parameter follows:
2664 %
2665 % o option: the option.
2666 %
2667 % o type: one or more values separated by commas.
2668 %
2669 */
2671  const ssize_t type)
2672 {
2673  const OptionInfo
2674  *option_info;
2675 
2676  register ssize_t
2677  i;
2678 
2679  option_info=GetOptionInfo(option);
2680  if (option_info == (const OptionInfo *) NULL)
2681  return((const char *) NULL);
2682  for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2683  if (type == option_info[i].type)
2684  break;
2685  if (option_info[i].mnemonic == (const char *) NULL)
2686  return("Unrecognized");
2687  return(option_info[i].mnemonic);
2688 }
2689 
2690 /*
2691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2692 % %
2693 % %
2694 %