2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 %
10 % OOO P T IIIII OOO N N %
13 % MagickCore Option Methods %
20 % Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % http://www.imagemagick.org/script/license.php %
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. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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/resource_.h"
71 #include "magick/splay-tree.h"
72 #include "magick/statistic.h"
73 #include "magick/string_.h"
74 #include "magick/token.h"
75 #include "magick/utility.h"
80 static const OptionInfo
83 { "Undefined", (long) UndefinedAlign, MagickTrue },
84 { "Center", (long) CenterAlign, MagickFalse },
85 { "End", (long) RightAlign, MagickFalse },
86 { "Left", (long) LeftAlign, MagickFalse },
87 { "Middle", (long) CenterAlign, MagickFalse },
88 { "Right", (long) RightAlign, MagickFalse },
89 { "Start", (long) LeftAlign, MagickFalse },
90 { (char *) NULL, (long) UndefinedAlign, MagickFalse }
94 { "Undefined", (long) UndefinedAlphaChannel, MagickTrue },
95 { "Activate", (long) ActivateAlphaChannel, MagickFalse },
96 { "Background", (long) BackgroundAlphaChannel, MagickFalse },
97 { "Copy", (long) CopyAlphaChannel, MagickFalse },
98 { "Deactivate", (long) DeactivateAlphaChannel, MagickFalse },
99 { "Extract", (long) ExtractAlphaChannel, MagickFalse },
100 { "Off", (long) DeactivateAlphaChannel, MagickFalse },
101 { "On", (long) ActivateAlphaChannel, MagickFalse },
102 { "Opaque", (long) OpaqueAlphaChannel, MagickFalse },
103 { "Set", (long) SetAlphaChannel, MagickFalse },
104 { "Shape", (long) ShapeAlphaChannel, MagickFalse },
105 { "Reset", (long) SetAlphaChannel, MagickTrue }, /* deprecated */
106 { "Transparent", (long) TransparentAlphaChannel, MagickFalse },
107 { (char *) NULL, (long) UndefinedAlphaChannel, MagickFalse }
111 { "False", 0L, MagickFalse },
112 { "True", 1L, MagickFalse },
113 { "0", 0L, MagickFalse },
114 { "1", 1L, MagickFalse },
115 { (char *) NULL, 0L, MagickFalse }
119 { "Undefined", (long) UndefinedChannel, MagickTrue },
120 { "All", (long) AllChannels, MagickFalse },
121 { "Alpha", (long) OpacityChannel, MagickFalse },
122 { "Black", (long) BlackChannel, MagickFalse },
123 { "Blue", (long) BlueChannel, MagickFalse },
124 { "Cyan", (long) CyanChannel, MagickFalse },
125 { "Default", (long) DefaultChannels, MagickFalse },
126 { "Gray", (long) GrayChannel, MagickFalse },
127 { "Green", (long) GreenChannel, MagickFalse },
128 { "Hue", (long) RedChannel, MagickFalse },
129 { "Index", (long) IndexChannel, MagickFalse },
130 { "Lightness", (long) BlueChannel, MagickFalse },
131 { "Luminance", (long) BlueChannel, MagickFalse },
132 { "Luminosity", (long) BlueChannel, MagickFalse }, /* deprecated */
133 { "Magenta", (long) MagentaChannel, MagickFalse },
134 { "Matte", (long) OpacityChannel, MagickFalse },
135 { "Opacity", (long) OpacityChannel, MagickFalse },
136 { "Red", (long) RedChannel, MagickFalse },
137 { "Saturation", (long) GreenChannel, MagickFalse },
138 { "Yellow", (long) YellowChannel, MagickFalse },
139 { "Sync", (long) SyncChannels, MagickFalse }, /* special channel flag */
140 { (char *) NULL, (long) UndefinedChannel, MagickFalse }
144 { "Undefined", (long) UndefinedClass, MagickTrue },
145 { "DirectClass", (long) DirectClass, MagickFalse },
146 { "PseudoClass", (long) PseudoClass, MagickFalse },
147 { (char *) NULL, (long) UndefinedClass, MagickFalse }
151 { "Undefined", (long) UndefinedPathUnits, MagickTrue },
152 { "ObjectBoundingBox", (long) ObjectBoundingBox, MagickFalse },
153 { "UserSpace", (long) UserSpace, MagickFalse },
154 { "UserSpaceOnUse", (long) UserSpaceOnUse, MagickFalse },
155 { (char *) NULL, (long) UndefinedPathUnits, MagickFalse }
159 { "+adjoin", 0L, MagickFalse },
160 { "-adjoin", 0L, MagickFalse },
161 { "+adaptive-sharpen", 1L, MagickFalse },
162 { "-adaptive-sharpen", 1L, MagickFalse },
163 { "+adaptive-threshold", 1L, MagickFalse },
164 { "-adaptive-threshold", 1L, MagickFalse },
165 { "+affine", 0L, MagickFalse },
166 { "-affine", 1L, MagickFalse },
167 { "+affinity", 0L, MagickFalse },
168 { "-affinity", 1L, MagickFalse },
169 { "+alpha", 1L, MagickFalse },
170 { "-alpha", 1L, MagickFalse },
171 { "+annotate", 0L, MagickFalse },
172 { "-annotate", 2L, MagickFalse },
173 { "+antialias", 0L, MagickFalse },
174 { "-antialias", 0L, MagickFalse },
175 { "+append", 0L, MagickFalse },
176 { "-append", 0L, MagickFalse },
177 { "+authenticate", 0L, MagickFalse },
178 { "-authenticate", 1L, MagickFalse },
179 { "+auto-gamma", 0L, MagickTrue }, /* under development */
180 { "-auto-gamma", 0L, MagickTrue }, /* under development */
181 { "+auto-level", 0L, MagickTrue }, /* under development */
182 { "-auto-level", 0L, MagickTrue }, /* under development */
183 { "+auto-orient", 0L, MagickFalse },
184 { "-auto-orient", 0L, MagickFalse },
185 { "+average", 0L, MagickFalse },
186 { "-average", 0L, MagickFalse },
187 { "+backdrop", 0L, MagickFalse },
188 { "-backdrop", 1L, MagickFalse },
189 { "+background", 0L, MagickFalse },
190 { "-background", 1L, MagickFalse },
191 { "+bench", 0L, MagickTrue },
192 { "-bench", 1L, MagickTrue },
193 { "+bias", 0L, MagickFalse },
194 { "-bias", 1L, MagickFalse },
195 { "+black-threshold", 0L, MagickFalse },
196 { "-black-threshold", 1L, MagickFalse },
197 { "+blend", 0L, MagickFalse },
198 { "-blend", 1L, MagickFalse },
199 { "+blue-primary", 0L, MagickFalse },
200 { "-blue-primary", 1L, MagickFalse },
201 { "+blue-shift", 1L, MagickFalse },
202 { "-blue-shift", 1L, MagickFalse },
203 { "+blur", 0L, MagickFalse },
204 { "-blur", 1L, MagickFalse },
205 { "+border", 0L, MagickFalse },
206 { "-border", 1L, MagickFalse },
207 { "+bordercolor", 0L, MagickFalse },
208 { "-bordercolor", 1L, MagickFalse },
209 { "+borderwidth", 0L, MagickFalse },
210 { "-borderwidth", 1L, MagickFalse },
211 { "+box", 0L, MagickFalse },
212 { "-box", 1L, MagickFalse },
213 { "+brightness-contrast", 0L, MagickFalse },
214 { "-brightness-contrast", 1L, MagickFalse },
215 { "+cache", 0L, MagickFalse },
216 { "-cache", 1L, MagickFalse },
217 { "+cdl", 1L, MagickFalse },
218 { "-cdl", 1L, MagickFalse },
219 { "+channel", 0L, MagickFalse },
220 { "-channel", 1L, MagickFalse },
221 { "+charcoal", 0L, MagickFalse },
222 { "-charcoal", 0L, MagickFalse },
223 { "+chop", 0L, MagickFalse },
224 { "-chop", 1L, MagickFalse },
225 { "+clip", 0L, MagickFalse },
226 { "-clip", 0L, MagickFalse },
227 { "+clip-mask", 0L, MagickFalse },
228 { "-clip-mask", 1L, MagickFalse },
229 { "+clip-path", 0L, MagickFalse },
230 { "-clip-path", 1L, MagickFalse },
231 { "+clone", 0L, MagickFalse },
232 { "-clone", 1L, MagickFalse },
233 { "+clut", 0L, MagickFalse },
234 { "-clut", 0L, MagickFalse },
235 { "+coalesce", 0L, MagickFalse },
236 { "-coalesce", 0L, MagickFalse },
237 { "+colorize", 0L, MagickFalse },
238 { "-colorize", 1L, MagickFalse },
239 { "+colormap", 0L, MagickFalse },
240 { "-colormap", 1L, MagickFalse },
241 { "+color-matrix", 0L, MagickFalse },
242 { "-color-matrix", 1L, MagickFalse },
243 { "+colors", 0L, MagickFalse },
244 { "-colors", 1L, MagickFalse },
245 { "+colorspace", 0L, MagickFalse },
246 { "-colorspace", 1L, MagickFalse },
247 { "+combine", 0L, MagickFalse },
248 { "-combine", 0L, MagickFalse },
249 { "+comment", 0L, MagickFalse },
250 { "-comment", 1L, MagickFalse },
251 { "+compose", 0L, MagickFalse },
252 { "-compose", 1L, MagickFalse },
253 { "+composite", 0L, MagickFalse },
254 { "-composite", 0L, MagickFalse },
255 { "+compress", 0L, MagickFalse },
256 { "-compress", 1L, MagickFalse },
257 { "+concurrent", 0L, MagickTrue },
258 { "-concurrent", 0L, MagickTrue },
259 { "+contrast", 0L, MagickFalse },
260 { "-contrast", 0L, MagickFalse },
261 { "+contrast-stretch", 0L, MagickFalse },
262 { "-contrast-stretch", 1L, MagickFalse },
263 { "+convolve", 0L, MagickFalse },
264 { "-convolve", 1L, MagickFalse },
265 { "+crop", 0L, MagickFalse },
266 { "-crop", 1L, MagickFalse },
267 { "+cycle", 0L, MagickFalse },
268 { "-cycle", 1L, MagickFalse },
269 { "+debug", 0L, MagickFalse },
270 { "-debug", 1L, MagickFalse },
271 { "+decipher", 1L, MagickFalse },
272 { "-decipher", 1L, MagickFalse },
273 { "+deconstruct", 0L, MagickFalse },
274 { "-deconstruct", 0L, MagickFalse },
275 { "+define", 1L, MagickFalse },
276 { "-define", 1L, MagickFalse },
277 { "+delay", 0L, MagickFalse },
278 { "-delay", 1L, MagickFalse },
279 { "+delete", 0L, MagickFalse },
280 { "-delete", 1L, MagickFalse },
281 { "+density", 0L, MagickFalse },
282 { "-density", 1L, MagickFalse },
283 { "+depth", 0L, MagickFalse },
284 { "-depth", 1L, MagickFalse },
285 { "+descend", 0L, MagickFalse },
286 { "-descend", 1L, MagickFalse },
287 { "+deskew", 0L, MagickFalse },
288 { "-deskew", 1L, MagickFalse },
289 { "+despeckle", 0L, MagickFalse },
290 { "-despeckle", 0L, MagickFalse },
291 { "+direction", 0L, MagickFalse },
292 { "-direction", 1L, MagickFalse },
293 { "+displace", 0L, MagickFalse },
294 { "-displace", 1L, MagickFalse },
295 { "+display", 0L, MagickFalse },
296 { "-display", 1L, MagickFalse },
297 { "+dispose", 0L, MagickFalse },
298 { "-dispose", 1L, MagickFalse },
299 { "+dissolve", 0L, MagickFalse },
300 { "-dissolve", 1L, MagickFalse },
301 { "+distort", 2L, MagickFalse },
302 { "-distort", 2L, MagickFalse },
303 { "+dither", 0L, MagickFalse },
304 { "-dither", 1L, MagickFalse },
305 { "+draw", 0L, MagickFalse },
306 { "-draw", 1L, MagickFalse },
307 { "+duration", 1L, MagickTrue },
308 { "-duration", 1L, MagickTrue },
309 { "+edge", 0L, MagickFalse },
310 { "-edge", 1L, MagickFalse },
311 { "+emboss", 0L, MagickFalse },
312 { "-emboss", 1L, MagickFalse },
313 { "+encipher", 1L, MagickFalse },
314 { "-encipher", 1L, MagickFalse },
315 { "+encoding", 0L, MagickFalse },
316 { "-encoding", 1L, MagickFalse },
317 { "+endian", 0L, MagickFalse },
318 { "-endian", 1L, MagickFalse },
319 { "+enhance", 0L, MagickFalse },
320 { "-enhance", 0L, MagickFalse },
321 { "+equalize", 0L, MagickFalse },
322 { "-equalize", 0L, MagickFalse },
323 { "+evaluate", 0L, MagickFalse },
324 { "-evaluate", 2L, MagickFalse },
325 { "+evaluate-sequence", 0L, MagickFalse },
326 { "-evaluate-sequence", 1L, MagickFalse },
327 { "+extent", 0L, MagickFalse },
328 { "-extent", 1L, MagickFalse },
329 { "+extract", 0L, MagickFalse },
330 { "-extract", 1L, MagickFalse },
331 { "+family", 0L, MagickFalse },
332 { "-family", 1L, MagickFalse },
333 { "+fft", 0L, MagickFalse },
334 { "-fft", 0L, MagickFalse },
335 { "+fill", 0L, MagickFalse },
336 { "-fill", 1L, MagickFalse },
337 { "+filter", 0L, MagickFalse },
338 { "-filter", 1L, MagickFalse },
339 { "+flatten", 0L, MagickFalse },
340 { "-flatten", 0L, MagickFalse },
341 { "+flip", 0L, MagickFalse },
342 { "-flip", 0L, MagickFalse },
343 { "+floodfill", 0L, MagickFalse },
344 { "-floodfill", 2L, MagickFalse },
345 { "+flop", 0L, MagickFalse },
346 { "-flop", 0L, MagickFalse },
347 { "+font", 0L, MagickFalse },
348 { "-font", 1L, MagickFalse },
349 { "+foreground", 0L, MagickFalse },
350 { "-foreground", 1L, MagickFalse },
351 { "+format", 0L, MagickFalse },
352 { "-format", 1L, MagickFalse },
353 { "+frame", 0L, MagickFalse },
354 { "-frame", 1L, MagickFalse },
355 { "+fuzz", 0L, MagickFalse },
356 { "-fuzz", 1L, MagickFalse },
357 { "+fx", 0L, MagickFalse },
358 { "-fx", 1L, MagickFalse },
359 { "+gamma", 0L, MagickFalse },
360 { "-gamma", 1L, MagickFalse },
361 { "+gaussian", 0L, MagickFalse },
362 { "-gaussian", 1L, MagickFalse },
363 { "+gaussian-blur", 0L, MagickFalse },
364 { "-gaussian-blur", 1L, MagickFalse },
365 { "+geometry", 0L, MagickFalse },
366 { "-geometry", 1L, MagickFalse },
367 { "+gravity", 0L, MagickFalse },
368 { "-gravity", 1L, MagickFalse },
369 { "+green-primary", 0L, MagickFalse },
370 { "-green-primary", 1L, MagickFalse },
371 { "+hald-clut", 0L, MagickFalse },
372 { "-hald-clut", 0L, MagickFalse },
373 { "+help", 0L, MagickFalse },
374 { "-help", 0L, MagickFalse },
375 { "+highlight-color", 1L, MagickFalse },
376 { "-highlight-color", 1L, MagickFalse },
377 { "+iconGeometry", 0L, MagickFalse },
378 { "-iconGeometry", 1L, MagickFalse },
379 { "+iconic", 0L, MagickFalse },
380 { "-iconic", 1L, MagickFalse },
381 { "+identify", 0L, MagickFalse },
382 { "-identify", 0L, MagickFalse },
383 { "+immutable", 0L, MagickFalse },
384 { "-immutable", 0L, MagickFalse },
385 { "+implode", 0L, MagickFalse },
386 { "-implode", 1L, MagickFalse },
387 { "+insert", 0L, MagickFalse },
388 { "-insert", 1L, MagickFalse },
389 { "+intent", 0L, MagickFalse },
390 { "-intent", 1L, MagickFalse },
391 { "+interlace", 0L, MagickFalse },
392 { "-interlace", 1L, MagickFalse },
393 { "+interpolate", 0L, MagickFalse },
394 { "-interpolate", 1L, MagickFalse },
395 { "+interword-spacing", 0L, MagickFalse },
396 { "-interword-spacing", 1L, MagickFalse },
397 { "+kerning", 0L, MagickFalse },
398 { "-kerning", 1L, MagickFalse },
399 { "+label", 0L, MagickFalse },
400 { "-label", 1L, MagickFalse },
401 { "+lat", 0L, MagickFalse },
402 { "-lat", 1L, MagickFalse },
403 { "+layers", 0L, MagickFalse },
404 { "-layers", 1L, MagickFalse },
405 { "+level", 1L, MagickFalse },
406 { "-level", 1L, MagickFalse },
407 { "+level-colors", 1L, MagickFalse },
408 { "-level-colors", 1L, MagickFalse },
409 { "+limit", 0L, MagickFalse },
410 { "-limit", 2L, MagickFalse },
411 { "+linear-stretch", 0L, MagickFalse },
412 { "-linear-stretch", 1L, MagickFalse },
413 { "+linewidth", 0L, MagickFalse },
414 { "-linewidth", 1L, MagickFalse },
415 { "+liquid-rescale", 0L, MagickFalse },
416 { "-liquid-rescale", 1L, MagickFalse },
417 { "+list", 0L, MagickFalse },
418 { "-list", 1L, MagickFalse },
419 { "+log", 0L, MagickFalse },
420 { "-log", 1L, MagickFalse },
421 { "+loop", 0L, MagickFalse },
422 { "-loop", 1L, MagickFalse },
423 { "+lowlight-color", 1L, MagickFalse },
424 { "-lowlight-color", 1L, MagickFalse },
425 { "+magnify", 0L, MagickFalse },
426 { "-magnify", 1L, MagickFalse },
427 { "+map", 0L, MagickFalse },
428 { "-map", 1L, MagickFalse },
429 { "+mask", 0L, MagickFalse },
430 { "-mask", 1L, MagickFalse },
431 { "+matte", 0L, MagickFalse },
432 { "-matte", 0L, MagickFalse },
433 { "+mattecolor", 0L, MagickFalse },
434 { "-mattecolor", 1L, MagickFalse },
435 { "+maximum", 0L, MagickFalse },
436 { "-maximum", 0L, MagickFalse },
437 { "+median", 0L, MagickFalse },
438 { "-median", 1L, MagickFalse },
439 { "+metric", 0L, MagickFalse },
440 { "-metric", 1L, MagickFalse },
441 { "+minimum", 0L, MagickFalse },
442 { "-minimum", 0L, MagickFalse },
443 { "+mode", 0L, MagickFalse },
444 { "-mode", 1L, MagickFalse },
445 { "+modulate", 0L, MagickFalse },
446 { "-modulate", 1L, MagickFalse },
447 { "+monitor", 0L, MagickFalse },
448 { "-monitor", 0L, MagickFalse },
449 { "+monochrome", 0L, MagickFalse },
450 { "-monochrome", 0L, MagickFalse },
451 { "+morph", 0L, MagickFalse },
452 { "-morph", 1L, MagickFalse },
453 { "+morphology", 0L, MagickFalse },
454 { "-morphology", 2L, MagickFalse },
455 { "+mosaic", 0L, MagickFalse },
456 { "-mosaic", 0L, MagickFalse },
457 { "+motion-blur", 0L, MagickFalse },
458 { "-motion-blur", 1L, MagickFalse },
459 { "+name", 0L, MagickFalse },
460 { "-name", 1L, MagickFalse },
461 { "+negate", 0L, MagickFalse },
462 { "-negate", 0L, MagickFalse },
463 { "+noise", 1L, MagickFalse },
464 { "-noise", 1L, MagickFalse },
465 { "+noop", 0L, MagickFalse },
466 { "-noop", 0L, MagickFalse },
467 { "+normalize", 0L, MagickFalse },
468 { "-normalize", 0L, MagickFalse },
469 { "+opaque", 1L, MagickFalse },
470 { "-opaque", 1L, MagickFalse },
471 { "+ordered-dither", 0L, MagickFalse },
472 { "-ordered-dither", 1L, MagickFalse },
473 { "+orient", 0L, MagickFalse },
474 { "-orient", 1L, MagickFalse },
475 { "+origin", 0L, MagickFalse },
476 { "-origin", 1L, MagickFalse },
477 { "+page", 0L, MagickFalse },
478 { "-page", 1L, MagickFalse },
479 { "+paint", 0L, MagickFalse },
480 { "-paint", 1L, MagickFalse },
481 { "+path", 0L, MagickFalse },
482 { "-path", 1L, MagickFalse },
483 { "+pause", 0L, MagickFalse },
484 { "-pause", 1L, MagickFalse },
485 { "+passphrase", 0L, MagickFalse },
486 { "-passphrase", 1L, MagickFalse },
487 { "+pen", 0L, MagickFalse },
488 { "-pen", 1L, MagickFalse },
489 { "+ping", 0L, MagickFalse },
490 { "-ping", 0L, MagickFalse },
491 { "+pointsize", 0L, MagickFalse },
492 { "-pointsize", 1L, MagickFalse },
493 { "+polaroid", 0L, MagickFalse },
494 { "-polaroid", 1L, MagickFalse },
495 { "+posterize", 0L, MagickFalse },
496 { "-posterize", 1L, MagickFalse },
497 { "+preview", 0L, MagickFalse },
498 { "-preview", 1L, MagickFalse },
499 { "+process", 0L, MagickFalse },
500 { "-process", 1L, MagickFalse },
501 { "+profile", 1L, MagickFalse },
502 { "-profile", 1L, MagickFalse },
503 { "+quality", 0L, MagickFalse },
504 { "-quality", 1L, MagickFalse },
505 { "+quiet", 0L, MagickFalse },
506 { "-quiet", 0L, MagickFalse },
507 { "+radial-blur", 0L, MagickFalse },
508 { "-radial-blur", 1L, MagickFalse },
509 { "+raise", 0L, MagickFalse },
510 { "-raise", 1L, MagickFalse },
511 { "+random-threshold", 0L, MagickFalse },
512 { "-random-threshold", 1L, MagickFalse },
513 { "+recolor", 0L, MagickFalse },
514 { "-recolor", 1L, MagickFalse },
515 { "+red-primary", 0L, MagickFalse },
516 { "-red-primary", 1L, MagickFalse },
517 { "+regard-warnings", 0L, MagickFalse },
518 { "-regard-warnings", 0L, MagickFalse },
519 { "+region", 0L, MagickFalse },
520 { "-region", 1L, MagickFalse },
521 { "+remote", 0L, MagickFalse },
522 { "-remote", 1L, MagickFalse },
523 { "+render", 0L, MagickFalse },
524 { "-render", 0L, MagickFalse },
525 { "+repage", 0L, MagickFalse },
526 { "-repage", 1L, MagickFalse },
527 { "+resample", 0L, MagickFalse },
528 { "-resample", 1L, MagickFalse },
529 { "+resize", 0L, MagickFalse },
530 { "-resize", 1L, MagickFalse },
531 { "+respect-parenthesis", 0L, MagickFalse },
532 { "-respect-parenthesis", 0L, MagickFalse },
533 { "+reverse", 0L, MagickFalse },
534 { "-reverse", 0L, MagickFalse },
535 { "+roll", 0L, MagickFalse },
536 { "-roll", 1L, MagickFalse },
537 { "+rotate", 0L, MagickFalse },
538 { "-rotate", 1L, MagickFalse },
539 { "+sample", 0L, MagickFalse },
540 { "-sample", 1L, MagickFalse },
541 { "+sampling-factor", 0L, MagickFalse },
542 { "-sampling-factor", 1L, MagickFalse },
543 { "+sans", 0L, MagickFalse },
544 { "-sans", 1L, MagickFalse },
545 { "+sans0", 0L, MagickFalse },
546 { "-sans0", 0L, MagickFalse },
547 { "+sans2", 2L, MagickFalse },
548 { "-sans2", 2L, MagickFalse },
549 { "+scale", 0L, MagickFalse },
550 { "-scale", 1L, MagickFalse },
551 { "+scene", 0L, MagickFalse },
552 { "-scene", 1L, MagickFalse },
553 { "+scenes", 0L, MagickFalse },
554 { "-scenes", 1L, MagickFalse },
555 { "+screen", 0L, MagickFalse },
556 { "-screen", 1L, MagickFalse },
557 { "+seed", 0L, MagickFalse },
558 { "-seed", 1L, MagickFalse },
559 { "+segment", 0L, MagickFalse },
560 { "-segment", 1L, MagickFalse },
561 { "+separate", 0L, MagickFalse },
562 { "-separate", 0L, MagickFalse },
563 { "+sepia-tone", 0L, MagickFalse },
564 { "-sepia-tone", 1L, MagickFalse },
565 { "+set", 1L, MagickFalse },
566 { "-set", 2L, MagickFalse },
567 { "+shade", 0L, MagickFalse },
568 { "-shade", 1L, MagickFalse },
569 { "+shadow", 0L, MagickFalse },
570 { "-shadow", 1L, MagickFalse },
571 { "+shared-memory", 0L, MagickFalse },
572 { "-shared-memory", 1L, MagickFalse },
573 { "+sharpen", 0L, MagickFalse },
574 { "-sharpen", 1L, MagickFalse },
575 { "+shave", 0L, MagickFalse },
576 { "-shave", 1L, MagickFalse },
577 { "+shear", 0L, MagickFalse },
578 { "-shear", 1L, MagickFalse },
579 { "+sigmoidal-contrast", 0L, MagickFalse },
580 { "-sigmoidal-contrast", 1L, MagickFalse },
581 { "+silent", 0L, MagickFalse },
582 { "-silent", 1L, MagickFalse },
583 { "+size", 0L, MagickFalse },
584 { "-size", 1L, MagickFalse },
585 { "+sketch", 0L, MagickFalse },
586 { "-sketch", 1L, MagickFalse },
587 { "+snaps", 0L, MagickFalse },
588 { "-snaps", 1L, MagickFalse },
589 { "+solarize", 0L, MagickFalse },
590 { "-solarize", 1L, MagickFalse },
591 { "+splice", 0L, MagickFalse },
592 { "-splice", 1L, MagickFalse },
593 { "+sparse-color", 2L, MagickFalse },
594 { "-sparse-color", 2L, MagickFalse },
595 { "+spread", 0L, MagickFalse },
596 { "-spread", 1L, MagickFalse },
597 { "+stegano", 0L, MagickFalse },
598 { "-stegano", 1L, MagickFalse },
599 { "+stereo", 0L, MagickFalse },
600 { "-stereo", 1L, MagickFalse },
601 { "+stretch", 0L, MagickFalse },
602 { "-stretch", 1L, MagickFalse },
603 { "+strip", 0L, MagickFalse },
604 { "-strip", 0L, MagickFalse },
605 { "+stroke", 0L, MagickFalse },
606 { "-stroke", 1L, MagickFalse },
607 { "+strokewidth", 0L, MagickFalse },
608 { "-strokewidth", 1L, MagickFalse },
609 { "+style", 0L, MagickFalse },
610 { "-style", 1L, MagickFalse },
611 { "+swap", 0L, MagickFalse },
612 { "-swap", 1L, MagickFalse },
613 { "+swirl", 0L, MagickFalse },
614 { "-swirl", 1L, MagickFalse },
615 { "+text-font", 0L, MagickFalse },
616 { "-text-font", 1L, MagickFalse },
617 { "+texture", 0L, MagickFalse },
618 { "-texture", 1L, MagickFalse },
619 { "+threshold", 0L, MagickFalse },
620 { "-threshold", 1L, MagickFalse },
621 { "+thumbnail", 0L, MagickFalse },
622 { "-thumbnail", 1L, MagickFalse },
623 { "+thumnail", 0L, MagickFalse },
624 { "-thumnail", 1L, MagickFalse },
625 { "+tile", 0L, MagickFalse },
626 { "-tile", 1L, MagickFalse },
627 { "+tile-offset", 0L, MagickFalse },
628 { "-tile-offset", 1L, MagickFalse },
629 { "+tint", 0L, MagickFalse },
630 { "-tint", 1L, MagickFalse },
631 { "+title", 0L, MagickFalse },
632 { "-title", 1L, MagickFalse },
633 { "+transform", 0L, MagickFalse },
634 { "-transform", 0L, MagickFalse },
635 { "+transparent", 1L, MagickFalse },
636 { "-transparent", 1L, MagickFalse },
637 { "+transparent-color", 1L, MagickFalse },
638 { "-transparent-color", 1L, MagickFalse },
639 { "+transpose", 0L, MagickFalse },
640 { "-transpose", 0L, MagickFalse },
641 { "+transverse", 0L, MagickFalse },
642 { "-transverse", 0L, MagickFalse },
643 { "+treedepth", 0L, MagickFalse },
644 { "-treedepth", 1L, MagickFalse },
645 { "+trim", 0L, MagickFalse },
646 { "-trim", 0L, MagickFalse },
647 { "+type", 0L, MagickFalse },
648 { "-type", 1L, MagickFalse },
649 { "+undercolor", 0L, MagickFalse },
650 { "-undercolor", 1L, MagickFalse },
651 { "+unique-colors", 0L, MagickFalse },
652 { "-unique-colors", 0L, MagickFalse },
653 { "+units", 0L, MagickFalse },
654 { "-units", 1L, MagickFalse },
655 { "+unsharp", 0L, MagickFalse },
656 { "-unsharp", 1L, MagickFalse },
657 { "+update", 0L, MagickFalse },
658 { "-update", 1L, MagickFalse },
659 { "+use-pixmap", 0L, MagickFalse },
660 { "-use-pixmap", 1L, MagickFalse },
661 { "+verbose", 0L, MagickFalse },
662 { "-verbose", 0L, MagickFalse },
663 { "+version", 0L, MagickFalse },
664 { "-version", 1L, MagickFalse },
665 { "+view", 0L, MagickFalse },
666 { "-view", 1L, MagickFalse },
667 { "+vignette", 0L, MagickFalse },
668 { "-vignette", 1L, MagickFalse },
669 { "+virtual-pixel", 0L, MagickFalse },
670 { "-virtual-pixel", 1L, MagickFalse },
671 { "+visual", 0L, MagickFalse },
672 { "-visual", 1L, MagickFalse },
673 { "+watermark", 0L, MagickFalse },
674 { "-watermark", 1L, MagickFalse },
675 { "+wave", 0L, MagickFalse },
676 { "-wave", 1L, MagickFalse },
677 { "+weight", 0L, MagickFalse },
678 { "-weight", 1L, MagickFalse },
679 { "+white-point", 0L, MagickFalse },
680 { "-white-point", 1L, MagickFalse },
681 { "+white-threshold", 0L, MagickFalse },
682 { "-white-threshold", 1L, MagickFalse },
683 { "+window", 0L, MagickFalse },
684 { "-window", 1L, MagickFalse },
685 { "+window-group", 0L, MagickFalse },
686 { "-window-group", 1L, MagickFalse },
687 { "+write", 1L, MagickFalse },
688 { "-write", 1L, MagickFalse },
689 { (char *) NULL, (long) 0L, MagickFalse }
693 { "Undefined", (long) UndefinedCompositeOp, MagickTrue },
694 { "Atop", (long) AtopCompositeOp, MagickFalse },
695 { "Blend", (long) BlendCompositeOp, MagickFalse },
696 { "Blur", (long) BlurCompositeOp, MagickFalse },
697 { "Bumpmap", (long) BumpmapCompositeOp, MagickFalse },
698 { "ChangeMask", (long) ChangeMaskCompositeOp, MagickFalse },
699 { "Clear", (long) ClearCompositeOp, MagickFalse },
700 { "ColorBurn", (long) ColorBurnCompositeOp, MagickFalse },
701 { "ColorDodge", (long) ColorDodgeCompositeOp, MagickFalse },
702 { "Colorize", (long) ColorizeCompositeOp, MagickFalse },
703 { "CopyBlack", (long) CopyBlackCompositeOp, MagickFalse },
704 { "CopyBlue", (long) CopyBlueCompositeOp, MagickFalse },
705 { "CopyCyan", (long) CopyCyanCompositeOp, MagickFalse },
706 { "CopyGreen", (long) CopyGreenCompositeOp, MagickFalse },
707 { "Copy", (long) CopyCompositeOp, MagickFalse },
708 { "CopyMagenta", (long) CopyMagentaCompositeOp, MagickFalse },
709 { "CopyOpacity", (long) CopyOpacityCompositeOp, MagickFalse },
710 { "CopyRed", (long) CopyRedCompositeOp, MagickFalse },
711 { "CopyYellow", (long) CopyYellowCompositeOp, MagickFalse },
712 { "Darken", (long) DarkenCompositeOp, MagickFalse },
713 { "Divide", (long) DivideCompositeOp, MagickFalse },
714 { "Dst", (long) DstCompositeOp, MagickFalse },
715 { "Difference", (long) DifferenceCompositeOp, MagickFalse },
716 { "Displace", (long) DisplaceCompositeOp, MagickFalse },
717 { "Dissolve", (long) DissolveCompositeOp, MagickFalse },
718 { "Distort", (long) DistortCompositeOp, MagickFalse },
719 { "DstAtop", (long) DstAtopCompositeOp, MagickFalse },
720 { "DstIn", (long) DstInCompositeOp, MagickFalse },
721 { "DstOut", (long) DstOutCompositeOp, MagickFalse },
722 { "DstOver", (long) DstOverCompositeOp, MagickFalse },
723 { "Dst", (long) DstCompositeOp, MagickFalse },
724 { "Exclusion", (long) ExclusionCompositeOp, MagickFalse },
725 { "HardLight", (long) HardLightCompositeOp, MagickFalse },
726 { "Hue", (long) HueCompositeOp, MagickFalse },
727 { "In", (long) InCompositeOp, MagickFalse },
728 { "Lighten", (long) LightenCompositeOp, MagickFalse },
729 { "LinearBurn", (long) LinearBurnCompositeOp, MagickFalse },
730 { "LinearDodge", (long) LinearDodgeCompositeOp, MagickFalse },
731 { "LinearLight", (long) LinearLightCompositeOp, MagickFalse },
732 { "Luminize", (long) LuminizeCompositeOp, MagickFalse },
733 { "Mathematics", (long) MathematicsCompositeOp, MagickFalse },
734 { "Minus", (long) MinusCompositeOp, MagickFalse },
735 { "Modulate", (long) ModulateCompositeOp, MagickFalse },
736 { "ModulusAdd", (long) ModulusAddCompositeOp, MagickFalse },
737 { "ModulusSubtract", (long) ModulusSubtractCompositeOp, MagickFalse },
738 { "Multiply", (long) MultiplyCompositeOp, MagickFalse },
739 { "None", (long) NoCompositeOp, MagickFalse },
740 { "Out", (long) OutCompositeOp, MagickFalse },
741 { "Overlay", (long) OverlayCompositeOp, MagickFalse },
742 { "Over", (long) OverCompositeOp, MagickFalse },
743 { "PegtopLight", (long) PegtopLightCompositeOp, MagickFalse },
744 { "PinLight", (long) PinLightCompositeOp, MagickFalse },
745 { "Plus", (long) PlusCompositeOp, MagickFalse },
746 { "Replace", (long) ReplaceCompositeOp, MagickFalse },
747 { "Saturate", (long) SaturateCompositeOp, MagickFalse },
748 { "Screen", (long) ScreenCompositeOp, MagickFalse },
749 { "SoftLight", (long) SoftLightCompositeOp, MagickFalse },
750 { "Src", (long) SrcCompositeOp, MagickFalse },
751 { "SrcAtop", (long) SrcAtopCompositeOp, MagickFalse },
752 { "SrcIn", (long) SrcInCompositeOp, MagickFalse },
753 { "SrcOut", (long) SrcOutCompositeOp, MagickFalse },
754 { "SrcOver", (long) SrcOverCompositeOp, MagickFalse },
755 { "Src", (long) SrcCompositeOp, MagickFalse },
756 { "VividLight", (long) VividLightCompositeOp, MagickFalse },
757 { "Xor", (long) XorCompositeOp, MagickFalse },
758 { "Add", (long) AddCompositeOp, MagickTrue }, /* depreciate */
759 { "Subtract", (long) SubtractCompositeOp, MagickTrue }, /* depreciate */
760 { "Threshold", (long) ThresholdCompositeOp, MagickTrue }, /* depreciate */
761 { (char *) NULL, (long) UndefinedCompositeOp, MagickFalse }
765 { "Undefined", (long) UndefinedCompression, MagickTrue },
766 { "B44", (long) B44Compression, MagickFalse },
767 { "B44A", (long) B44ACompression, MagickFalse },
768 { "BZip", (long) BZipCompression, MagickFalse },
769 { "DXT1", (long) DXT1Compression, MagickFalse },
770 { "DXT3", (long) DXT3Compression, MagickFalse },
771 { "DXT5", (long) DXT5Compression, MagickFalse },
772 { "Fax", (long) FaxCompression, MagickFalse },
773 { "Group4", (long) Group4Compression, MagickFalse },
774 { "JPEG", (long) JPEGCompression, MagickFalse },
775 { "JPEG2000", (long) JPEG2000Compression, MagickFalse },
776 { "Lossless", (long) LosslessJPEGCompression, MagickFalse },
777 { "LosslessJPEG", (long) LosslessJPEGCompression, MagickFalse },
778 { "LZW", (long) LZWCompression, MagickFalse },
779 { "None", (long) NoCompression, MagickFalse },
780 { "Piz", (long) PizCompression, MagickFalse },
781 { "Pxr24", (long) Pxr24Compression, MagickFalse },
782 { "RLE", (long) RLECompression, MagickFalse },
783 { "Zip", (long) ZipCompression, MagickFalse },
784 { "RunlengthEncoded", (long) RLECompression, MagickFalse },
785 { "ZipS", (long) ZipSCompression, MagickFalse },
786 { (char *) NULL, (long) UndefinedCompression, MagickFalse }
788 ColorspaceOptions[] =
790 { "Undefined", (long) UndefinedColorspace, MagickTrue },
791 { "CMY", (long) CMYColorspace, MagickFalse },
792 { "CMYK", (long) CMYKColorspace, MagickFalse },
793 { "Gray", (long) GRAYColorspace, MagickFalse },
794 { "HSB", (long) HSBColorspace, MagickFalse },
795 { "HSL", (long) HSLColorspace, MagickFalse },
796 { "HWB", (long) HWBColorspace, MagickFalse },
797 { "Lab", (long) LabColorspace, MagickFalse },
798 { "Log", (long) LogColorspace, MagickFalse },
799 { "OHTA", (long) OHTAColorspace, MagickFalse },
800 { "Rec601Luma", (long) Rec601LumaColorspace, MagickFalse },
801 { "Rec601YCbCr", (long) Rec601YCbCrColorspace, MagickFalse },
802 { "Rec709Luma", (long) Rec709LumaColorspace, MagickFalse },
803 { "Rec709YCbCr", (long) Rec709YCbCrColorspace, MagickFalse },
804 { "RGB", (long) RGBColorspace, MagickFalse },
805 { "sRGB", (long) sRGBColorspace, MagickFalse },
806 { "Transparent", (long) TransparentColorspace, MagickFalse },
807 { "XYZ", (long) XYZColorspace, MagickFalse },
808 { "YCbCr", (long) YCbCrColorspace, MagickFalse },
809 { "YCC", (long) YCCColorspace, MagickFalse },
810 { "YIQ", (long) YIQColorspace, MagickFalse },
811 { "YPbPr", (long) YPbPrColorspace, MagickFalse },
812 { "YUV", (long) YUVColorspace, MagickFalse },
813 { (char *) NULL, (long) UndefinedColorspace, MagickFalse }
817 { "Undefined", (long) UndefinedData, MagickTrue },
818 { "Byte", (long) ByteData, MagickFalse },
819 { "Long", (long) LongData, MagickFalse },
820 { "Short", (long) ShortData, MagickFalse },
821 { "String", (long) StringData, MagickFalse },
822 { (char *) NULL, (long) UndefinedData, MagickFalse }
826 { "Undefined", (long) UndefinedDecoration, MagickTrue },
827 { "LineThrough", (long) LineThroughDecoration, MagickFalse },
828 { "None", (long) NoDecoration, MagickFalse },
829 { "Overline", (long) OverlineDecoration, MagickFalse },
830 { "Underline", (long) UnderlineDecoration, MagickFalse },
831 { (char *) NULL, (long) UndefinedDecoration, MagickFalse }
835 { "Undefined", (long) UndefinedDirection, MagickTrue },
836 { "right-to-left", (long) RightToLeftDirection, MagickFalse },
837 { "left-to-right", (long) LeftToRightDirection, MagickFalse },
838 { (char *) NULL, (long) UndefinedDirection, MagickFalse }
842 { "Undefined", (long) UndefinedDispose, MagickTrue },
843 { "Background", (long) BackgroundDispose, MagickFalse },
844 { "None", (long) NoneDispose, MagickFalse },
845 { "Previous", (long) PreviousDispose, MagickFalse },
846 { "Undefined", (long) UndefinedDispose, MagickFalse },
847 { "0", (long) UndefinedDispose, MagickFalse },
848 { "1", (long) NoneDispose, MagickFalse },
849 { "2", (long) BackgroundDispose, MagickFalse },
850 { "3", (long) PreviousDispose, MagickFalse },
851 { (char *) NULL, (long) UndefinedDispose, MagickFalse }
855 { "Undefined", (long) UndefinedDistortion, MagickTrue },
856 { "Affine", (long) AffineDistortion, MagickFalse },
857 { "AffineProjection", (long) AffineProjectionDistortion, MagickFalse },
858 { "ScaleRotateTranslate", (long) ScaleRotateTranslateDistortion, MagickFalse },
859 { "SRT", (long) ScaleRotateTranslateDistortion, MagickFalse },
860 { "Perspective", (long) PerspectiveDistortion, MagickFalse },
861 { "PerspectiveProjection", (long) PerspectiveProjectionDistortion, MagickFalse },
862 { "Bilinear", (long) BilinearForwardDistortion, MagickTrue },
863 { "BilinearForward", (long) BilinearForwardDistortion, MagickFalse },
864 { "BilinearReverse", (long) BilinearReverseDistortion, MagickFalse },
865 { "Polynomial", (long) PolynomialDistortion, MagickFalse },
866 { "Arc", (long) ArcDistortion, MagickFalse },
867 { "Polar", (long) PolarDistortion, MagickFalse },
868 { "DePolar", (long) DePolarDistortion, MagickFalse },
869 { "Barrel", (long) BarrelDistortion, MagickFalse },
870 { "BarrelInverse", (long) BarrelInverseDistortion, MagickFalse },
871 { "Shepards", (long) ShepardsDistortion, MagickFalse },
872 { (char *) NULL, (long) UndefinedDistortion, MagickFalse }
876 { "Undefined", (long) UndefinedDitherMethod, MagickTrue },
877 { "None", (long) NoDitherMethod, MagickFalse },
878 { "FloydSteinberg", (long) FloydSteinbergDitherMethod, MagickFalse },
879 { "Riemersma", (long) RiemersmaDitherMethod, MagickFalse },
880 { (char *) NULL, (long) UndefinedEndian, MagickFalse }
884 { "Undefined", (long) UndefinedEndian, MagickTrue },
885 { "LSB", (long) LSBEndian, MagickFalse },
886 { "MSB", (long) MSBEndian, MagickFalse },
887 { (char *) NULL, (long) UndefinedEndian, MagickFalse }
891 { "Undefined", (long) UndefinedEvaluateOperator, MagickTrue },
892 { "Add", (long) AddEvaluateOperator, MagickFalse },
893 { "AddModulus", (long) AddModulusEvaluateOperator, MagickFalse },
894 { "And", (long) AndEvaluateOperator, MagickFalse },
895 { "Cos", (long) CosineEvaluateOperator, MagickFalse },
896 { "Cosine", (long) CosineEvaluateOperator, MagickFalse },
897 { "Divide", (long) DivideEvaluateOperator, MagickFalse },
898 { "GaussianNoise", (long) GaussianNoiseEvaluateOperator, MagickFalse },
899 { "ImpulseNoise", (long) ImpulseNoiseEvaluateOperator, MagickFalse },
900 { "LaplacianNoise", (long) LaplacianNoiseEvaluateOperator, MagickFalse },
901 { "LeftShift", (long) LeftShiftEvaluateOperator, MagickFalse },
902 { "Log", (long) LogEvaluateOperator, MagickFalse },
903 { "Max", (long) MaxEvaluateOperator, MagickFalse },
904 { "Mean", (long) MeanEvaluateOperator, MagickFalse },
905 { "Min", (long) MinEvaluateOperator, MagickFalse },
906 { "MultiplicativeNoise", (long) MultiplicativeNoiseEvaluateOperator, MagickFalse },
907 { "Multiply", (long) MultiplyEvaluateOperator, MagickFalse },
908 { "Or", (long) OrEvaluateOperator, MagickFalse },
909 { "PoissonNoise", (long) PoissonNoiseEvaluateOperator, MagickFalse },
910 { "Pow", (long) PowEvaluateOperator, MagickFalse },
911 { "RightShift", (long) RightShiftEvaluateOperator, MagickFalse },
912 { "Set", (long) SetEvaluateOperator, MagickFalse },
913 { "Sin", (long) SineEvaluateOperator, MagickFalse },
914 { "Sine", (long) SineEvaluateOperator, MagickFalse },
915 { "Subtract", (long) SubtractEvaluateOperator, MagickFalse },
916 { "Threshold", (long) ThresholdEvaluateOperator, MagickFalse },
917 { "ThresholdBlack", (long) ThresholdBlackEvaluateOperator, MagickFalse },
918 { "ThresholdWhite", (long) ThresholdWhiteEvaluateOperator, MagickFalse },
919 { "UniformNoise", (long) UniformNoiseEvaluateOperator, MagickFalse },
920 { "Xor", (long) XorEvaluateOperator, MagickFalse },
921 { (char *) NULL, (long) UndefinedEvaluateOperator, MagickFalse }
925 { "Undefined", (long) UndefinedRule, MagickTrue },
926 { "Evenodd", (long) EvenOddRule, MagickFalse },
927 { "NonZero", (long) NonZeroRule, MagickFalse },
928 { (char *) NULL, (long) UndefinedRule, MagickFalse }
932 { "Undefined", (long) UndefinedFilter, MagickTrue },
933 { "Bartlett", (long) BartlettFilter, MagickFalse },
934 { "Bessel", (long) BesselFilter, MagickFalse },
935 { "Blackman", (long) BlackmanFilter, MagickFalse },
936 { "Bohman", (long) BohmanFilter, MagickFalse },
937 { "Box", (long) BoxFilter, MagickFalse },
938 { "Catrom", (long) CatromFilter, MagickFalse },
939 { "Cubic", (long) CubicFilter, MagickFalse },
940 { "Gaussian", (long) GaussianFilter, MagickFalse },
941 { "Hamming", (long) HammingFilter, MagickFalse },
942 { "Hanning", (long) HanningFilter, MagickFalse },
943 { "Hermite", (long) HermiteFilter, MagickFalse },
944 { "Kaiser", (long) KaiserFilter, MagickFalse },
945 { "Lagrange", (long) LagrangeFilter, MagickFalse },
946 { "Lanczos", (long) LanczosFilter, MagickFalse },
947 { "Mitchell", (long) MitchellFilter, MagickFalse },
948 { "Parzen", (long) ParzenFilter, MagickFalse },
949 { "Point", (long) PointFilter, MagickFalse },
950 { "Quadratic", (long) QuadraticFilter, MagickFalse },
951 { "Sinc", (long) SincFilter, MagickFalse },
952 { "Triangle", (long) TriangleFilter, MagickFalse },
953 { "Welsh", (long) WelshFilter, MagickFalse },
954 { (char *) NULL, (long) UndefinedFilter, MagickFalse }
958 { "Undefined", (long) UndefinedFunction, MagickTrue },
959 { "Polynomial", (long) PolynomialFunction, MagickFalse },
960 { "Sinusoid", (long) SinusoidFunction, MagickFalse },
961 { "ArcSin", (long) ArcsinFunction, MagickFalse },
962 { "ArcTan", (long) ArctanFunction, MagickFalse },
963 { (char *) NULL, (long) UndefinedFunction, MagickFalse }
967 { "Undefined", (long) UndefinedGravity, MagickTrue },
968 { "None", (long) UndefinedGravity, MagickFalse },
969 { "Center", (long) CenterGravity, MagickFalse },
970 { "East", (long) EastGravity, MagickFalse },
971 { "Forget", (long) ForgetGravity, MagickFalse },
972 { "NorthEast", (long) NorthEastGravity, MagickFalse },
973 { "North", (long) NorthGravity, MagickFalse },
974 { "NorthWest", (long) NorthWestGravity, MagickFalse },
975 { "SouthEast", (long) SouthEastGravity, MagickFalse },
976 { "South", (long) SouthGravity, MagickFalse },
977 { "SouthWest", (long) SouthWestGravity, MagickFalse },
978 { "West", (long) WestGravity, MagickFalse },
979 { "Static", (long) StaticGravity, MagickFalse },
980 { (char *) NULL, UndefinedGravity, MagickFalse }
984 { "append", MagickTrue, MagickFalse },
985 { "affinity", MagickTrue, MagickFalse },
986 { "average", MagickTrue, MagickFalse },
987 { "clut", MagickTrue, MagickFalse },
988 { "coalesce", MagickTrue, MagickFalse },
989 { "combine", MagickTrue, MagickFalse },
990 { "composite", MagickTrue, MagickFalse },
991 { "crop", MagickTrue, MagickFalse },
992 { "debug", MagickTrue, MagickFalse },
993 { "deconstruct", MagickTrue, MagickFalse },
994 { "delete", MagickTrue, MagickFalse },
995 { "evaluate-seqence", MagickTrue, MagickFalse },
996 { "fft", MagickTrue, MagickFalse },
997 { "flatten", MagickTrue, MagickFalse },
998 { "fx", MagickTrue, MagickFalse },
999 { "hald-clut", MagickTrue, MagickFalse },
1000 { "ift", MagickTrue, MagickFalse },
1001 { "identify", MagickTrue, MagickFalse },
1002 { "insert", MagickTrue, MagickFalse },
1003 { "layers", MagickTrue, MagickFalse },
1004 { "limit", MagickTrue, MagickFalse },
1005 { "map", MagickTrue, MagickFalse },
1006 { "maximum", MagickTrue, MagickFalse },
1007 { "minimum", MagickTrue, MagickFalse },
1008 { "morph", MagickTrue, MagickFalse },
1009 { "mosaic", MagickTrue, MagickFalse },
1010 { "optimize", MagickTrue, MagickFalse },
1011 { "process", MagickTrue, MagickFalse },
1012 { "quiet", MagickTrue, MagickFalse },
1013 { "separate", MagickTrue, MagickFalse },
1014 { "swap", MagickTrue, MagickFalse },
1015 { "write", MagickTrue, MagickFalse },
1016 { (char *) NULL, MagickFalse, MagickFalse }
1020 { "Undefined", (long) UndefinedIntent, MagickTrue },
1021 { "Absolute", (long) AbsoluteIntent, MagickFalse },
1022 { "Perceptual", (long) PerceptualIntent, MagickFalse },
1023 { "Relative", (long) RelativeIntent, MagickFalse },
1024 { "Saturation", (long) SaturationIntent, MagickFalse },
1025 { (char *) NULL, (long) UndefinedIntent, MagickFalse }
1027 InterlaceOptions[] =
1029 { "Undefined", (long) UndefinedInterlace, MagickTrue },
1030 { "Line", (long) LineInterlace, MagickFalse },
1031 { "None", (long) NoInterlace, MagickFalse },
1032 { "Plane", (long) PlaneInterlace, MagickFalse },
1033 { "Partition", (long) PartitionInterlace, MagickFalse },
1034 { "GIF", (long) GIFInterlace, MagickFalse },
1035 { "JPEG", (long) JPEGInterlace, MagickFalse },
1036 { "PNG", (long) PNGInterlace, MagickFalse },
1037 { (char *) NULL, (long) UndefinedInterlace, MagickFalse }
1039 InterpolateOptions[] =
1041 { "Undefined", (long) UndefinedInterpolatePixel, MagickTrue },
1042 { "Average", (long) AverageInterpolatePixel, MagickFalse },
1043 { "Bicubic", (long) BicubicInterpolatePixel, MagickFalse },
1044 { "Bilinear", (long) BilinearInterpolatePixel, MagickFalse },
1045 { "filter", (long) FilterInterpolatePixel, MagickFalse },
1046 { "Integer", (long) IntegerInterpolatePixel, MagickFalse },
1047 { "Mesh", (long) MeshInterpolatePixel, MagickFalse },
1048 { "NearestNeighbor", (long) NearestNeighborInterpolatePixel, MagickFalse },
1049 { "Spline", (long) SplineInterpolatePixel, MagickFalse },
1050 { (char *) NULL, (long) UndefinedInterpolatePixel, MagickFalse }
1054 { "Undefined", (long) UndefinedKernel, MagickTrue },
1055 { "Gaussian", (long) GaussianKernel, MagickFalse },
1056 { "Blur", (long) BlurKernel, MagickFalse },
1057 { "Comet", (long) CometKernel, MagickFalse },
1058 { "Laplacian", (long) LaplacianKernel, MagickTrue }, /* not implemented */
1059 { "DOG", (long) DOGKernel, MagickTrue }, /* not implemented */
1060 { "LOG", (long) LOGKernel, MagickTrue }, /* not implemented */
1061 { "Rectangle", (long) RectangleKernel, MagickFalse },
1062 { "Square", (long) SquareKernel, MagickFalse },
1063 { "Diamond", (long) DiamondKernel, MagickFalse },
1064 { "Disk", (long) DiskKernel, MagickFalse },
1065 { "Plus", (long) PlusKernel, MagickFalse },
1066 { "Chebyshev", (long) ChebyshevKernel, MagickFalse },
1067 { "Manhatten", (long) ManhattenKernel, MagickFalse },
1068 { "Euclidean", (long) EuclideanKernel, MagickFalse },
1069 { "User Defined", (long) UserDefinedKernel, MagickTrue }, /* internel */
1070 { (char *) NULL, (long) UndefinedKernel, MagickFalse }
1074 { "Undefined", (long) UndefinedLayer, MagickTrue },
1075 { "Coalesce", (long) CoalesceLayer, MagickFalse },
1076 { "CompareAny", (long) CompareAnyLayer, MagickFalse },
1077 { "CompareClear", (long) CompareClearLayer, MagickFalse },
1078 { "CompareOverlay", (long) CompareOverlayLayer, MagickFalse },
1079 { "Dispose", (long) DisposeLayer, MagickFalse },
1080 { "Optimize", (long) OptimizeLayer, MagickFalse },
1081 { "OptimizeFrame", (long) OptimizeImageLayer, MagickFalse },
1082 { "OptimizePlus", (long) OptimizePlusLayer, MagickFalse },
1083 { "OptimizeTransparency", (long) OptimizeTransLayer, MagickFalse },
1084 { "RemoveDups", (long) RemoveDupsLayer, MagickFalse },
1085 { "RemoveZero", (long) RemoveZeroLayer, MagickFalse },
1086 { "Composite", (long) CompositeLayer, MagickFalse },
1087 { "Merge", (long) MergeLayer, MagickFalse },
1088 { "Flatten", (long) FlattenLayer, MagickFalse },
1089 { "Mosaic", (long) MosaicLayer, MagickFalse },
1090 { "TrimBounds", (long) TrimBoundsLayer, MagickFalse },
1091 { (char *) NULL, (long) UndefinedLayer, MagickFalse }
1095 { "Undefined", (long) UndefinedCap, MagickTrue },
1096 { "Butt", (long) ButtCap, MagickFalse },
1097 { "Round", (long) RoundCap, MagickFalse },
1098 { "Square", (long) SquareCap, MagickFalse },
1099 { (char *) NULL, (long) UndefinedCap, MagickFalse }
1103 { "Undefined", (long) UndefinedJoin, MagickTrue },
1104 { "Bevel", (long) BevelJoin, MagickFalse },
1105 { "Miter", (long) MiterJoin, MagickFalse },
1106 { "Round", (long) RoundJoin, MagickFalse },
1107 { (char *) NULL, (long) UndefinedJoin, MagickFalse }
1111 { "Align", (long) MagickAlignOptions, MagickFalse },
1112 { "Alpha", (long) MagickAlphaOptions, MagickFalse },
1113 { "Boolean", (long) MagickBooleanOptions, MagickFalse },
1114 { "Channel", (long) MagickChannelOptions, MagickFalse },
1115 { "Class", (long) MagickClassOptions, MagickFalse },
1116 { "ClipPath", (long) MagickClipPathOptions, MagickFalse },
1117 { "Coder", (long) MagickCoderOptions, MagickFalse },
1118 { "Color", (long) MagickColorOptions, MagickFalse },
1119 { "Colorspace", (long) MagickColorspaceOptions, MagickFalse },
1120 { "Command", (long) MagickCommandOptions, MagickFalse },
1121 { "Compose", (long) MagickComposeOptions, MagickFalse },
1122 { "Compress", (long) MagickCompressOptions, MagickFalse },
1123 { "Configure", (long) MagickConfigureOptions, MagickFalse },
1124 { "DataType", (long) MagickDataTypeOptions, MagickFalse },
1125 { "Debug", (long) MagickDebugOptions, MagickFalse },
1126 { "Decoration", (long) MagickDecorateOptions, MagickFalse },
1127 { "Delegate", (long) MagickDelegateOptions, MagickFalse },
1128 { "Direction", (long) MagickDirectionOptions, MagickFalse },
1129 { "Dispose", (long) MagickDisposeOptions, MagickFalse },
1130 { "Distort", (long) MagickDistortOptions, MagickFalse },
1131 { "Dither", (long) MagickDitherOptions, MagickFalse },
1132 { "Endian", (long) MagickEndianOptions, MagickFalse },
1133 { "Evaluate", (long) MagickEvaluateOptions, MagickFalse },
1134 { "FillRule", (long) MagickFillRuleOptions, MagickFalse },
1135 { "Filter", (long) MagickFilterOptions, MagickFalse },
1136 { "Font", (long) MagickFontOptions, MagickFalse },
1137 { "Format", (long) MagickFormatOptions, MagickFalse },
1138 { "Function", (long) MagickFunctionOptions, MagickFalse },
1139 { "Gravity", (long) MagickGravityOptions, MagickFalse },
1140 { "ImageList", (long) MagickImageListOptions, MagickFalse },
1141 { "Intent", (long) MagickIntentOptions, MagickFalse },
1142 { "Interlace", (long) MagickInterlaceOptions, MagickFalse },
1143 { "Interpolate", (long) MagickInterpolateOptions, MagickFalse },
1144 { "Kernel", (long) MagickKernelOptions, MagickFalse },
1145 { "Layers", (long) MagickLayerOptions, MagickFalse },
1146 { "LineCap", (long) MagickLineCapOptions, MagickFalse },
1147 { "LineJoin", (long) MagickLineJoinOptions, MagickFalse },
1148 { "List", (long) MagickListOptions, MagickFalse },
1149 { "Locale", (long) MagickLocaleOptions, MagickFalse },
1150 { "LogEvent", (long) MagickLogEventOptions, MagickFalse },
1151 { "Log", (long) MagickLogOptions, MagickFalse },
1152 { "Magic", (long) MagickMagicOptions, MagickFalse },
1153 { "Method", (long) MagickMethodOptions, MagickFalse },
1154 { "Metric", (long) MagickMetricOptions, MagickFalse },
1155 { "Mime", (long) MagickMimeOptions, MagickFalse },
1156 { "Mode", (long) MagickModeOptions, MagickFalse },
1157 { "Morphology", (long) MagickMorphologyOptions, MagickFalse },
1158 { "Module", (long) MagickModuleOptions, MagickFalse },
1159 { "Noise", (long) MagickNoiseOptions, MagickFalse },
1160 { "Orientation", (long) MagickOrientationOptions, MagickFalse },
1161 { "Policy", (long) MagickPolicyOptions, MagickFalse },
1162 { "PolicyDomain", (long) MagickPolicyDomainOptions, MagickFalse },
1163 { "PolicyRights", (long) MagickPolicyRightsOptions, MagickFalse },
1164 { "Preview", (long) MagickPreviewOptions, MagickFalse },
1165 { "Primitive", (long) MagickPrimitiveOptions, MagickFalse },
1166 { "QuantumFormat", (long) MagickQuantumFormatOptions, MagickFalse },
1167 { "Resource", (long) MagickResourceOptions, MagickFalse },
1168 { "SparseColor", (long) MagickSparseColorOptions, MagickFalse },
1169 { "Storage", (long) MagickStorageOptions, MagickFalse },
1170 { "Stretch", (long) MagickStretchOptions, MagickFalse },
1171 { "Style", (long) MagickStyleOptions, MagickFalse },
1172 { "Threshold", (long) MagickThresholdOptions, MagickFalse },
1173 { "Type", (long) MagickTypeOptions, MagickFalse },
1174 { "Units", (long) MagickResolutionOptions, MagickFalse },
1175 { "Undefined", (long) MagickUndefinedOptions, MagickTrue },
1176 { "Validate", (long) MagickValidateOptions, MagickFalse },
1177 { "VirtualPixel", (long) MagickVirtualPixelOptions, MagickFalse },
1178 { (char *) NULL, (long) MagickUndefinedOptions, MagickFalse }
1182 { "Undefined", (long) UndefinedEvents, MagickTrue },
1183 { "All", (long) (AllEvents &~ TraceEvent), MagickFalse },
1184 { "Annotate", (long) AnnotateEvent, MagickFalse },
1185 { "Blob", (long) BlobEvent, MagickFalse },
1186 { "Cache", (long) CacheEvent, MagickFalse },
1187 { "Coder", (long) CoderEvent, MagickFalse },
1188 { "Configure", (long) ConfigureEvent, MagickFalse },
1189 { "Deprecate", (long) DeprecateEvent, MagickFalse },
1190 { "Draw", (long) DrawEvent, MagickFalse },
1191 { "Exception", (long) ExceptionEvent, MagickFalse },
1192 { "Locale", (long) LocaleEvent, MagickFalse },
1193 { "Module", (long) ModuleEvent, MagickFalse },
1194 { "None", (long) NoEvents, MagickFalse },
1195 { "Policy", (long) PolicyEvent, MagickFalse },
1196 { "Resource", (long) ResourceEvent, MagickFalse },
1197 { "Trace", (long) TraceEvent, MagickFalse },
1198 { "Transform", (long) TransformEvent, MagickFalse },
1199 { "User", (long) UserEvent, MagickFalse },
1200 { "Wand", (long) WandEvent, MagickFalse },
1201 { "X11", (long) X11Event, MagickFalse },
1202 { (char *) NULL, (long) UndefinedEvents, MagickFalse }
1206 { "Undefined", (long) UndefinedMetric, MagickTrue },
1207 { "AE", (long) AbsoluteErrorMetric, MagickFalse },
1208 { "MAE", (long) MeanAbsoluteErrorMetric, MagickFalse },
1209 { "MEPP", (long) MeanErrorPerPixelMetric, MagickFalse },
1210 { "MSE", (long) MeanSquaredErrorMetric, MagickFalse },
1211 { "PAE", (long) PeakAbsoluteErrorMetric, MagickFalse },
1212 { "PSNR", (long) PeakSignalToNoiseRatioMetric, MagickFalse },
1213 { "RMSE", (long) RootMeanSquaredErrorMetric, MagickFalse },
1214 { (char *) NULL, (long) UndefinedMetric, MagickFalse }
1218 { "Undefined", (long) UndefinedMethod, MagickTrue },
1219 { "FillToBorder", (long) FillToBorderMethod, MagickFalse },
1220 { "Floodfill", (long) FloodfillMethod, MagickFalse },
1221 { "Point", (long) PointMethod, MagickFalse },
1222 { "Replace", (long) ReplaceMethod, MagickFalse },
1223 { "Reset", (long) ResetMethod, MagickFalse },
1224 { (char *) NULL, (long) UndefinedMethod, MagickFalse }
1228 { "Undefined", (long) UndefinedMode, MagickTrue },
1229 { "Concatenate", (long) ConcatenateMode, MagickFalse },
1230 { "Frame", (long) FrameMode, MagickFalse },
1231 { "Unframe", (long) UnframeMode, MagickFalse },
1232 { (char *) NULL, (long) UndefinedMode, MagickFalse }
1234 MorphologyOptions[] =
1236 { "Undefined", (long) UndefinedMorphology, MagickTrue },
1237 { "Correlate", (long) CorrelateMorphology, MagickFalse },
1238 { "Convolve", (long) ConvolveMorphology, MagickFalse },
1239 { "Dilate", (long) DilateMorphology, MagickFalse },
1240 { "Erode", (long) ErodeMorphology, MagickFalse },
1241 { "Close", (long) CloseMorphology, MagickFalse },
1242 { "Open", (long) OpenMorphology, MagickFalse },
1243 { "DilateIntensity", (long) DilateIntensityMorphology, MagickFalse },
1244 { "ErodeIntensity", (long) ErodeIntensityMorphology, MagickFalse },
1245 { "CloseIntensity", (long) CloseIntensityMorphology, MagickFalse },
1246 { "OpenIntensity", (long) OpenIntensityMorphology, MagickFalse },
1247 { "DilateI", (long) DilateIntensityMorphology, MagickFalse },
1248 { "ErodeI", (long) ErodeIntensityMorphology, MagickFalse },
1249 { "CloseI", (long) CloseIntensityMorphology, MagickFalse },
1250 { "OpenI", (long) OpenIntensityMorphology, MagickFalse },
1251 { "EdgeOut", (long) EdgeOutMorphology, MagickFalse },
1252 { "EdgeIn", (long) EdgeInMorphology, MagickFalse },
1253 { "Edge", (long) EdgeMorphology, MagickFalse },
1254 { "TopHat", (long) TopHatMorphology, MagickFalse },
1255 { "BottomHat", (long) BottomHatMorphology, MagickFalse },
1256 { "Distance", (long) DistanceMorphology, MagickFalse },
1257 { "HitAndMiss", (long) HitAndMissMorphology, MagickFalse },
1258 { "Thinning", (long) ThinningMorphology, MagickFalse },
1259 { "Thicken", (long) ThickenMorphology, MagickFalse },
1260 { (char *) NULL, (long) UndefinedMorphology, MagickFalse }
1264 { "Undefined", (long) UndefinedNoise, MagickTrue },
1265 { "Gaussian", (long) (long) GaussianNoise, MagickFalse },
1266 { "Impulse", (long) ImpulseNoise, MagickFalse },
1267 { "Laplacian", (long) LaplacianNoise, MagickFalse },
1268 { "Multiplicative", (long) MultiplicativeGaussianNoise, MagickFalse },
1269 { "Poisson", (long) PoissonNoise, MagickFalse },
1270 { "Random", (long) RandomNoise, MagickFalse },
1271 { "Uniform", (long) UniformNoise, MagickFalse },
1272 { (char *) NULL, (long) UndefinedNoise, MagickFalse }
1274 OrientationOptions[] =
1276 { "Undefined", (long) UndefinedOrientation, MagickTrue },
1277 { "TopLeft", (long) TopLeftOrientation, MagickFalse },
1278 { "TopRight", (long) TopRightOrientation, MagickFalse },
1279 { "BottomRight", (long) BottomRightOrientation, MagickFalse },
1280 { "BottomLeft", (long) BottomLeftOrientation, MagickFalse },
1281 { "LeftTop", (long) LeftTopOrientation, MagickFalse },
1282 { "RightTop", (long) RightTopOrientation, MagickFalse },
1283 { "RightBottom", (long) RightBottomOrientation, MagickFalse },
1284 { "LeftBottom", (long) LeftBottomOrientation, MagickFalse }
1286 PolicyDomainOptions[] =
1288 { "Undefined", (long) UndefinedPolicyDomain, MagickTrue },
1289 { "Coder", (long) CoderPolicyDomain, MagickFalse },
1290 { "Delegate", (long) DelegatePolicyDomain, MagickFalse },
1291 { "Filter", (long) FilterPolicyDomain, MagickFalse },
1292 { "Path", (long) PathPolicyDomain, MagickFalse },
1293 { "Resource", (long) ResourcePolicyDomain, MagickFalse },
1294 { "System", (long) SystemPolicyDomain, MagickFalse }
1296 PolicyRightsOptions[] =
1298 { "Undefined", (long) UndefinedPolicyRights, MagickTrue },
1299 { "None", (long) NoPolicyRights, MagickFalse },
1300 { "Read", (long) ReadPolicyRights, MagickFalse },
1301 { "Write", (long) WritePolicyRights, MagickFalse },
1302 { "Execute", (long) ExecutePolicyRights, MagickFalse }
1306 { "Undefined", (long) UndefinedPreview, MagickTrue },
1307 { "AddNoise", (long) AddNoisePreview, MagickFalse },
1308 { "Blur", (long) BlurPreview, MagickFalse },
1309 { "Brightness", (long) BrightnessPreview, MagickFalse },
1310 { "Charcoal", (long) CharcoalDrawingPreview, MagickFalse },
1311 { "Despeckle", (long) DespecklePreview, MagickFalse },
1312 { "Dull", (long) DullPreview, MagickFalse },
1313 { "EdgeDetect", (long) EdgeDetectPreview, MagickFalse },
1314 { "Gamma", (long) GammaPreview, MagickFalse },
1315 { "Grayscale", (long) GrayscalePreview, MagickFalse },
1316 { "Hue", (long) HuePreview, MagickFalse },
1317 { "Implode", (long) ImplodePreview, MagickFalse },
1318 { "JPEG", (long) JPEGPreview, MagickFalse },
1319 { "OilPaint", (long) OilPaintPreview, MagickFalse },
1320 { "Quantize", (long) QuantizePreview, MagickFalse },
1321 { "Raise", (long) RaisePreview, MagickFalse },
1322 { "ReduceNoise", (long) ReduceNoisePreview, MagickFalse },
1323 { "Roll", (long) RollPreview, MagickFalse },
1324 { "Rotate", (long) RotatePreview, MagickFalse },
1325 { "Saturation", (long) SaturationPreview, MagickFalse },
1326 { "Segment", (long) SegmentPreview, MagickFalse },
1327 { "Shade", (long) ShadePreview, MagickFalse },
1328 { "Sharpen", (long) SharpenPreview, MagickFalse },
1329 { "Shear", (long) ShearPreview, MagickFalse },
1330 { "Solarize", (long) SolarizePreview, MagickFalse },
1331 { "Spiff", (long) SpiffPreview, MagickFalse },
1332 { "Spread", (long) SpreadPreview, MagickFalse },
1333 { "Swirl", (long) SwirlPreview, MagickFalse },
1334 { "Threshold", (long) ThresholdPreview, MagickFalse },
1335 { "Wave", (long) WavePreview, MagickFalse },
1336 { (char *) NULL, (long) UndefinedPreview, MagickFalse }
1338 PrimitiveOptions[] =
1340 { "Undefined", (long) UndefinedPrimitive, MagickTrue },
1341 { "Arc", (long) ArcPrimitive, MagickFalse },
1342 { "Bezier", (long) BezierPrimitive, MagickFalse },
1343 { "Circle", (long) CirclePrimitive, MagickFalse },
1344 { "Color", (long) ColorPrimitive, MagickFalse },
1345 { "Ellipse", (long) EllipsePrimitive, MagickFalse },
1346 { "Image", (long) ImagePrimitive, MagickFalse },
1347 { "Line", (long) LinePrimitive, MagickFalse },
1348 { "Matte", (long) MattePrimitive, MagickFalse },
1349 { "Path", (long) PathPrimitive, MagickFalse },
1350 { "Point", (long) PointPrimitive, MagickFalse },
1351 { "Polygon", (long) PolygonPrimitive, MagickFalse },
1352 { "Polyline", (long) PolylinePrimitive, MagickFalse },
1353 { "Rectangle", (long) RectanglePrimitive, MagickFalse },
1354 { "roundRectangle", (long) RoundRectanglePrimitive, MagickFalse },
1355 { "Text", (long) TextPrimitive, MagickFalse },
1356 { (char *) NULL, (long) UndefinedPrimitive, MagickFalse }
1358 QuantumFormatOptions[] =
1360 { "Undefined", (long) UndefinedQuantumFormat, MagickTrue },
1361 { "FloatingPoint", (long) FloatingPointQuantumFormat, MagickFalse },
1362 { "Signed", (long) SignedQuantumFormat, MagickFalse },
1363 { "Unsigned", (long) UnsignedQuantumFormat, MagickFalse },
1364 { (char *) NULL, (long) FloatingPointQuantumFormat, MagickFalse }
1366 ResolutionOptions[] =
1368 { "Undefined", (long) UndefinedResolution, MagickTrue },
1369 { "PixelsPerInch", (long) PixelsPerInchResolution, MagickFalse },
1370 { "PixelsPerCentimeter", (long) PixelsPerCentimeterResolution, MagickFalse },
1371 { (char *) NULL, (long) UndefinedResolution, MagickFalse }
1375 { "Undefined", (long) UndefinedResource, MagickTrue },
1376 { "Area", (long) AreaResource, MagickFalse },
1377 { "Disk", (long) DiskResource, MagickFalse },
1378 { "File", (long) FileResource, MagickFalse },
1379 { "Map", (long) MapResource, MagickFalse },
1380 { "Memory", (long) MemoryResource, MagickFalse },
1381 { "Thread", (long) ThreadResource, MagickFalse },
1382 { "Time", (long) TimeResource, MagickFalse },
1383 { (char *) NULL, (long) UndefinedResource, MagickFalse }
1385 SparseColorOptions[] =
1387 { "Undefined", (long) UndefinedDistortion, MagickTrue },
1388 { "Barycentric", (long) BarycentricColorInterpolate, MagickFalse },
1389 { "Bilinear", (long) BilinearColorInterpolate, MagickFalse },
1390 { "Shepards", (long) ShepardsColorInterpolate, MagickFalse },
1391 { "Voronoi", (long) VoronoiColorInterpolate, MagickFalse },
1392 { (char *) NULL, (long) UndefinedResource, MagickFalse }
1396 { "Undefined", (long) UndefinedPixel, MagickTrue },
1397 { "Char", (long) CharPixel, MagickFalse },
1398 { "Double", (long) DoublePixel, MagickFalse },
1399 { "Float", (long) FloatPixel, MagickFalse },
1400 { "Integer", (long) IntegerPixel, MagickFalse },
1401 { "Long", (long) LongPixel, MagickFalse },
1402 { "Quantum", (long) QuantumPixel, MagickFalse },
1403 { "Short", (long) ShortPixel, MagickFalse },
1404 { (char *) NULL, (long) UndefinedResource, MagickFalse }
1408 { "Undefined", (long) UndefinedStretch, MagickTrue },
1409 { "Any", (long) AnyStretch, MagickFalse },
1410 { "Condensed", (long) CondensedStretch, MagickFalse },
1411 { "Expanded", (long) ExpandedStretch, MagickFalse },
1412 { "ExtraCondensed", (long) ExtraCondensedStretch, MagickFalse },
1413 { "ExtraExpanded", (long) ExtraExpandedStretch, MagickFalse },
1414 { "Normal", (long) NormalStretch, MagickFalse },
1415 { "SemiCondensed", (long) SemiCondensedStretch, MagickFalse },
1416 { "SemiExpanded", (long) SemiExpandedStretch, MagickFalse },
1417 { "UltraCondensed", (long) UltraCondensedStretch, MagickFalse },
1418 { "UltraExpanded", (long) UltraExpandedStretch, MagickFalse },
1419 { (char *) NULL, (long) UndefinedStretch, MagickFalse }
1423 { "Undefined", (long) UndefinedStyle, MagickTrue },
1424 { "Any", (long) AnyStyle, MagickFalse },
1425 { "Italic", (long) ItalicStyle, MagickFalse },
1426 { "Normal", (long) NormalStyle, MagickFalse },
1427 { "Oblique", (long) ObliqueStyle, MagickFalse },
1428 { (char *) NULL, (long) UndefinedStyle, MagickFalse }
1432 { "Undefined", (long) UndefinedType, MagickTrue },
1433 { "Bilevel", (long) BilevelType, MagickFalse },
1434 { "ColorSeparation", (long) ColorSeparationType, MagickFalse },
1435 { "ColorSeparationMatte", (long) ColorSeparationMatteType, MagickFalse },
1436 { "Grayscale", (long) GrayscaleType, MagickFalse },
1437 { "GrayscaleMatte", (long) GrayscaleMatteType, MagickFalse },
1438 { "Optimize", (long) OptimizeType, MagickFalse },
1439 { "Palette", (long) PaletteType, MagickFalse },
1440 { "PaletteBilevelMatte", (long) PaletteBilevelMatteType, MagickFalse },
1441 { "PaletteMatte", (long) PaletteMatteType, MagickFalse },
1442 { "TrueColorMatte", (long) TrueColorMatteType, MagickFalse },
1443 { "TrueColor", (long) TrueColorType, MagickFalse },
1444 { (char *) NULL, (long) UndefinedType, MagickFalse }
1448 { "Undefined", (long) UndefinedValidate, MagickTrue },
1449 { "All", (long) AllValidate, MagickFalse },
1450 { "Compare", (long) CompareValidate, MagickFalse },
1451 { "Composite", (long) CompositeValidate, MagickFalse },
1452 { "Convert", (long) ConvertValidate, MagickFalse },
1453 { "FormatsInMemory", (long) FormatsInMemoryValidate, MagickFalse },
1454 { "FormatsOnDisk", (long) FormatsOnDiskValidate, MagickFalse },
1455 { "Identify", (long) IdentifyValidate, MagickFalse },
1456 { "ImportExport", (long) ImportExportValidate, MagickFalse },
1457 { "Montage", (long) MontageValidate, MagickFalse },
1458 { "Stream", (long) StreamValidate, MagickFalse },
1459 { "None", (long) NoValidate, MagickFalse },
1460 { (char *) NULL, (long) UndefinedValidate, MagickFalse }
1462 VirtualPixelOptions[] =
1464 { "Undefined", (long) UndefinedVirtualPixelMethod, MagickTrue },
1465 { "Background", (long) BackgroundVirtualPixelMethod, MagickFalse },
1466 { "Black", (long) BlackVirtualPixelMethod, MagickFalse },
1467 { "Constant", (long) BackgroundVirtualPixelMethod, MagickTrue }, /* deprecated */
1468 { "CheckerTile", (long) CheckerTileVirtualPixelMethod, MagickFalse },
1469 { "Dither", (long) DitherVirtualPixelMethod, MagickFalse },
1470 { "Edge", (long) EdgeVirtualPixelMethod, MagickFalse },
1471 { "Gray", (long) GrayVirtualPixelMethod, MagickFalse },
1472 { "HorizontalTile", (long) HorizontalTileVirtualPixelMethod, MagickFalse },
1473 { "HorizontalTileEdge", (long) HorizontalTileEdgeVirtualPixelMethod, MagickFalse },
1474 { "Mirror", (long) MirrorVirtualPixelMethod, MagickFalse },
1475 { "Random", (long) RandomVirtualPixelMethod, MagickFalse },
1476 { "Tile", (long) TileVirtualPixelMethod, MagickFalse },
1477 { "Transparent", (long) TransparentVirtualPixelMethod, MagickFalse },
1478 { "VerticalTile", (long) VerticalTileVirtualPixelMethod, MagickFalse },
1479 { "VerticalTileEdge", (long) VerticalTileEdgeVirtualPixelMethod, MagickFalse },
1480 { "White", (long) WhiteVirtualPixelMethod, MagickFalse },
1481 { (char *) NULL, (long) UndefinedVirtualPixelMethod, MagickFalse }
1485 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1489 % C l o n e I m a g e O p t i o n s %
1493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1495 % CloneImageOptions() clones one or more image options.
1497 % The format of the CloneImageOptions method is:
1499 % MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1500 % const ImageInfo *clone_info)
1502 % A description of each parameter follows:
1504 % o image_info: the image info.
1506 % o clone_info: the clone image info.
1509 MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1510 const ImageInfo *clone_info)
1512 assert(image_info != (ImageInfo *) NULL);
1513 assert(image_info->signature == MagickSignature);
1514 if (image_info->debug != MagickFalse)
1515 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1516 image_info->filename);
1517 assert(clone_info != (const ImageInfo *) NULL);
1518 assert(clone_info->signature == MagickSignature);
1519 if (clone_info->options != (void *) NULL)
1520 image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
1521 (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
1526 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1530 % D e f i n e I m a g e O p t i o n %
1534 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1536 % DefineImageOption() associates a key/value pair with an image option.
1538 % The format of the DefineImageOption method is:
1540 % MagickBooleanType DefineImageOption(ImageInfo *image_info,
1541 % const char *option)
1543 % A description of each parameter follows:
1545 % o image_info: the image info.
1547 % o option: the image option.
1550 MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
1555 value[MaxTextExtent];
1560 assert(image_info != (ImageInfo *) NULL);
1561 assert(option != (const char *) NULL);
1562 (void) CopyMagickString(key,option,MaxTextExtent);
1563 for (p=key; *p != '\0'; p++)
1568 (void) CopyMagickString(value,p+1,MaxTextExtent);
1570 return(SetImageOption(image_info,key,value));
1574 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1578 % D e l e t e I m a g e O p t i o n %
1582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1584 % DeleteImageOption() deletes an key from the image map.
1586 % The format of the DeleteImageOption method is:
1588 % MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1591 % A description of each parameter follows:
1593 % o image_info: the image info.
1595 % o option: the image option.
1598 MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1601 assert(image_info != (ImageInfo *) NULL);
1602 assert(image_info->signature == MagickSignature);
1603 if (image_info->debug != MagickFalse)
1604 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1605 image_info->filename);
1606 if (image_info->options == (void *) NULL)
1607 return(MagickFalse);
1608 return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
1612 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1616 % D e s t r o y I m a g e O p t i o n s %
1620 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1622 % DestroyImageOptions() releases memory associated with image option values.
1624 % The format of the DestroyDefines method is:
1626 % void DestroyImageOptions(ImageInfo *image_info)
1628 % A description of each parameter follows:
1630 % o image_info: the image info.
1633 MagickExport void DestroyImageOptions(ImageInfo *image_info)
1635 assert(image_info != (ImageInfo *) NULL);
1636 assert(image_info->signature == MagickSignature);
1637 if (image_info->debug != MagickFalse)
1638 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1639 image_info->filename);
1640 if (image_info->options != (void *) NULL)
1641 image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
1645 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1649 % G e t I m a g e O p t i o n %
1653 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1655 % GetImageOption() gets a value associated with an image option.
1657 % The format of the GetImageOption method is:
1659 % const char *GetImageOption(const ImageInfo *image_info,
1662 % A description of each parameter follows:
1664 % o image_info: the image info.
1669 MagickExport const char *GetImageOption(const ImageInfo *image_info,
1675 assert(image_info != (ImageInfo *) NULL);
1676 assert(image_info->signature == MagickSignature);
1677 if (image_info->debug != MagickFalse)
1678 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1679 image_info->filename);
1680 if (image_info->options == (void *) NULL)
1681 return((const char *) NULL);
1682 option=(const char *) GetValueFromSplayTree((SplayTreeInfo *)
1683 image_info->options,key);
1688 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1692 % G e t M a g i c k O p t i o n s %
1696 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1698 % GetMagickOptions() returns a list of values.
1700 % The format of the GetMagickOptions method is:
1702 % const char **GetMagickOptions(const MagickOption value)
1704 % A description of each parameter follows:
1706 % o value: the value.
1710 static const OptionInfo *GetOptionInfo(const MagickOption option)
1714 case MagickAlignOptions: return(AlignOptions);
1715 case MagickAlphaOptions: return(AlphaOptions);
1716 case MagickBooleanOptions: return(BooleanOptions);
1717 case MagickChannelOptions: return(ChannelOptions);
1718 case MagickClassOptions: return(ClassOptions);
1719 case MagickClipPathOptions: return(ClipPathOptions);
1720 case MagickColorspaceOptions: return(ColorspaceOptions);
1721 case MagickCommandOptions: return(CommandOptions);
1722 case MagickComposeOptions: return(ComposeOptions);
1723 case MagickCompressOptions: return(CompressOptions);
1724 case MagickDataTypeOptions: return(DataTypeOptions);
1725 case MagickDebugOptions: return(LogEventOptions);
1726 case MagickDecorateOptions: return(DecorateOptions);
1727 case MagickDirectionOptions: return(DirectionOptions);
1728 case MagickDisposeOptions: return(DisposeOptions);
1729 case MagickDistortOptions: return(DistortOptions);
1730 case MagickDitherOptions: return(DitherOptions);
1731 case MagickEndianOptions: return(EndianOptions);
1732 case MagickEvaluateOptions: return(EvaluateOptions);
1733 case MagickFillRuleOptions: return(FillRuleOptions);
1734 case MagickFilterOptions: return(FilterOptions);
1735 case MagickFunctionOptions: return(FunctionOptions);
1736 case MagickGravityOptions: return(GravityOptions);
1737 case MagickImageListOptions: return(ImageListOptions);
1738 case MagickIntentOptions: return(IntentOptions);
1739 case MagickInterlaceOptions: return(InterlaceOptions);
1740 case MagickInterpolateOptions: return(InterpolateOptions);
1741 case MagickKernelOptions: return(KernelOptions);
1742 case MagickLayerOptions: return(LayerOptions);
1743 case MagickLineCapOptions: return(LineCapOptions);
1744 case MagickLineJoinOptions: return(LineJoinOptions);
1745 case MagickListOptions: return(ListOptions);
1746 case MagickLogEventOptions: return(LogEventOptions);
1747 case MagickMetricOptions: return(MetricOptions);
1748 case MagickMethodOptions: return(MethodOptions);
1749 case MagickModeOptions: return(ModeOptions);
1750 case MagickMorphologyOptions: return(MorphologyOptions);
1751 case MagickNoiseOptions: return(NoiseOptions);
1752 case MagickOrientationOptions: return(OrientationOptions);
1753 case MagickPolicyDomainOptions: return(PolicyDomainOptions);
1754 case MagickPolicyRightsOptions: return(PolicyRightsOptions);
1755 case MagickPreviewOptions: return(PreviewOptions);
1756 case MagickPrimitiveOptions: return(PrimitiveOptions);
1757 case MagickQuantumFormatOptions: return(QuantumFormatOptions);
1758 case MagickResolutionOptions: return(ResolutionOptions);
1759 case MagickResourceOptions: return(ResourceOptions);
1760 case MagickSparseColorOptions: return(SparseColorOptions);
1761 case MagickStorageOptions: return(StorageOptions);
1762 case MagickStretchOptions: return(StretchOptions);
1763 case MagickStyleOptions: return(StyleOptions);
1764 case MagickTypeOptions: return(TypeOptions);
1765 case MagickValidateOptions: return(ValidateOptions);
1766 case MagickVirtualPixelOptions: return(VirtualPixelOptions);
1769 return((const OptionInfo *) NULL);
1772 MagickExport char **GetMagickOptions(const MagickOption value)
1783 option_info=GetOptionInfo(value);
1784 if (option_info == (const OptionInfo *) NULL)
1785 return((char **) NULL);
1786 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
1787 values=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*values));
1788 if (values == (char **) NULL)
1789 ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
1790 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
1791 values[i]=AcquireString(option_info[i].mnemonic);
1792 values[i]=(char *) NULL;
1797 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1801 % G e t N e x t I m a g e O p t i o n %
1805 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1807 % GetNextImageOption() gets the next image option value.
1809 % The format of the GetNextImageOption method is:
1811 % char *GetNextImageOption(const ImageInfo *image_info)
1813 % A description of each parameter follows:
1815 % o image_info: the image info.
1818 MagickExport char *GetNextImageOption(const ImageInfo *image_info)
1820 assert(image_info != (ImageInfo *) NULL);
1821 assert(image_info->signature == MagickSignature);
1822 if (image_info->debug != MagickFalse)
1823 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1824 image_info->filename);
1825 if (image_info->options == (void *) NULL)
1826 return((char *) NULL);
1827 return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
1831 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1835 % I s M a g i c k O p t i o n %
1839 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1841 % IsMagickOption() returns MagickTrue if the option begins with a - or + and
1842 % the first character that follows is alphanumeric.
1844 % The format of the IsMagickOption method is:
1846 % MagickBooleanType IsMagickOption(const char *option)
1848 % A description of each parameter follows:
1850 % o option: the option.
1853 MagickExport MagickBooleanType IsMagickOption(const char *option)
1855 assert(option != (const char *) NULL);
1856 if ((*option != '-') && (*option != '+'))
1857 return(MagickFalse);
1858 if (strlen(option) == 1)
1859 return(MagickFalse);
1861 if (isalpha((int) ((unsigned char) *option)) == 0)
1862 return(MagickFalse);
1867 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1871 % M a g i c k O p t i o n T o M n e m o n i c %
1875 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1877 % MagickOptionToMnemonic() returns an enumerated value as a mnemonic.
1879 % The format of the MagickOptionToMnemonic method is:
1881 % const char *MagickOptionToMnemonic(const MagickOption option,
1884 % A description of each parameter follows:
1886 % o option: the option.
1888 % o type: one or more values separated by commas.
1891 MagickExport const char *MagickOptionToMnemonic(const MagickOption option,
1900 option_info=GetOptionInfo(option);
1901 if (option_info == (const OptionInfo *) NULL)
1902 return((const char *) NULL);
1903 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
1904 if (type == option_info[i].type)
1906 if (option_info[i].mnemonic == (const char *) NULL)
1907 return("undefined");
1908 return(option_info[i].mnemonic);
1912 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1916 % L i s t M a g i c k O p t i o n s %
1920 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1922 % ListMagickOptions() lists the contents of enumerated option type(s).
1924 % The format of the ListMagickOptions method is:
1926 % MagickBooleanType ListMagickOptions(FILE *file,const MagickOption option,
1927 % ExceptionInfo *exception)
1929 % A description of each parameter follows:
1931 % o file: list options to this file handle.
1933 % o option: list these options.
1935 % o exception: return any errors or warnings in this structure.
1938 MagickExport MagickBooleanType ListMagickOptions(FILE *file,
1939 const MagickOption option,ExceptionInfo *magick_unused(exception))
1947 if (file == (FILE *) NULL)
1949 option_info=GetOptionInfo(option);
1950 if (option_info == (const OptionInfo *) NULL)
1951 return(MagickFalse);
1952 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
1954 if (option_info[i].stealth != MagickFalse)
1956 (void) fprintf(file,"%s\n",option_info[i].mnemonic);
1962 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1966 % P a r s e C h a n n e l O p t i o n %
1970 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1972 % ParseChannelOption() parses a string and returns an enumerated channel
1975 % The format of the ParseChannelOption method is:
1977 % long ParseChannelOption(const char *channels)
1979 % A description of each parameter follows:
1981 % o options: One or more values separated by commas.
1984 MagickExport long ParseChannelOption(const char *channels)
1992 channel=ParseMagickOption(MagickChannelOptions,MagickTrue,channels);
1996 for (i=0; i < (long) strlen(channels); i++)
1998 switch (channels[i])
2003 channel|=OpacityChannel;
2009 channel|=BlueChannel;
2015 channel|=CyanChannel;
2021 channel|=GreenChannel;
2027 channel|=IndexChannel;
2033 channel|=BlackChannel;
2039 channel|=MagentaChannel;
2045 channel|=OpacityChannel;
2051 channel|=RedChannel;
2057 channel|=YellowChannel;
2063 More channel flags follow shorthand. For example "RGB,sync"
2064 Gather the additional channel flags and merge with shorthand
2068 more_channel=ParseMagickOption(MagickChannelOptions,MagickTrue,
2070 if (more_channel < 0)
2071 return(more_channel);
2072 channel |= more_channel;
2083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2087 % P a r s e M a g i c k O p t i o n %
2091 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2093 % ParseMagickOption() parses a string and returns an enumerated option type(s).
2095 % The format of the ParseMagickOption method is:
2097 % long ParseMagickOption(const MagickOption option,
2098 % const MagickBooleanType list,const char *options)
2100 % A description of each parameter follows:
2102 % o option: Index to the option table to lookup
2104 % o list: A option other than zero permits more than one option separated by
2107 % o options: One or more options separated by commas.
2110 MagickExport long ParseMagickOption(const MagickOption option,
2111 const MagickBooleanType list,const char *options)
2114 token[MaxTextExtent];
2137 option_info=GetOptionInfo(option);
2138 if (option_info == (const OptionInfo *) NULL)
2142 if (strchr(options,'|') != (char *) NULL)
2144 for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2146 while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2149 negate=(*p == '!') ? MagickTrue : MagickFalse;
2150 if (negate != MagickFalse)
2153 while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2156 if ((q-token) >= MaxTextExtent)
2161 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2162 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2165 option_types=option_types &~ option_info[i].type;
2167 option_types=option_types | option_info[i].type;
2170 if ((option_info[i].mnemonic == (char *) NULL) &&
2171 ((strchr(token+1,'-') != (char *) NULL) ||
2172 (strchr(token+1,'_') != (char *) NULL)))
2174 while ((q=strchr(token+1,'-')) != (char *) NULL)
2175 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2176 while ((q=strchr(token+1,'_')) != (char *) NULL)
2177 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2178 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2179 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2182 option_types=option_types &~ option_info[i].type;
2184 option_types=option_types | option_info[i].type;
2188 if (option_info[i].mnemonic == (char *) NULL)
2190 if (list == MagickFalse)
2193 return(option_types);
2197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2201 % R e m o v e I m a g e O p t i o n %
2205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2207 % RemoveImageOption() removes an option from the image and returns its value.
2209 % The format of the RemoveImageOption method is:
2211 % char *RemoveImageOption(ImageInfo *image_info,const char *option)
2213 % A description of each parameter follows:
2215 % o image_info: the image info.
2217 % o option: the image option.
2220 MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
2225 assert(image_info != (ImageInfo *) NULL);
2226 assert(image_info->signature == MagickSignature);
2227 if (image_info->debug != MagickFalse)
2228 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2229 image_info->filename);
2230 if (image_info->options == (void *) NULL)
2231 return((char *) NULL);
2232 value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
2233 image_info->options,option);
2238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2242 % R e s e t I m a g e O p t i o n %
2246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2248 % ResetImageOptions() resets the image_info option. That is, it deletes
2249 % all options associated with the image_info structure.
2251 % The format of the ResetImageOptions method is:
2253 % ResetImageOptions(ImageInfo *image_info)
2255 % A description of each parameter follows:
2257 % o image_info: the image info.
2260 MagickExport void ResetImageOptions(const ImageInfo *image_info)
2262 assert(image_info != (ImageInfo *) NULL);
2263 assert(image_info->signature == MagickSignature);
2264 if (image_info->debug != MagickFalse)
2265 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2266 image_info->filename);
2267 if (image_info->options == (void *) NULL)
2269 ResetSplayTree((SplayTreeInfo *) image_info->options);
2273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2277 % R e s e t I m a g e O p t i o n I t e r a t o r %
2281 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2283 % ResetImageOptionIterator() resets the image_info values iterator. Use it
2284 % in conjunction with GetNextImageOption() to iterate over all the values
2285 % associated with an image option.
2287 % The format of the ResetImageOptionIterator method is:
2289 % ResetImageOptionIterator(ImageInfo *image_info)
2291 % A description of each parameter follows:
2293 % o image_info: the image info.
2296 MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
2298 assert(image_info != (ImageInfo *) NULL);
2299 assert(image_info->signature == MagickSignature);
2300 if (image_info->debug != MagickFalse)
2301 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2302 image_info->filename);
2303 if (image_info->options == (void *) NULL)
2305 ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
2309 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2313 % S e t I m a g e O p t i o n %
2317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2319 % SetImageOption() associates an value with an image option.
2321 % The format of the SetImageOption method is:
2323 % MagickBooleanType SetImageOption(ImageInfo *image_info,
2324 % const char *option,const char *value)
2326 % A description of each parameter follows:
2328 % o image_info: the image info.
2330 % o option: the image option.
2332 % o values: the image option values.
2335 MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
2336 const char *option,const char *value)
2341 assert(image_info != (ImageInfo *) NULL);
2342 assert(image_info->signature == MagickSignature);
2343 if (image_info->debug != MagickFalse)
2344 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2345 image_info->filename);
2346 if (LocaleCompare(option,"size") == 0)
2347 (void) CloneString(&image_info->size,value);
2348 if (image_info->options == (void *) NULL)
2349 image_info->options=NewSplayTree(CompareSplayTreeString,
2350 RelinquishMagickMemory,RelinquishMagickMemory);
2351 status=AddValueToSplayTree((SplayTreeInfo *) image_info->options,
2352 ConstantString(option),ConstantString(value));