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