Coverage Report

Created: 2026-06-30 07:12

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