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