blob: 0bbf724c06b59c864ecc9e34ab2f554ac1a533a2 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
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 %
cristyde984cd2013-12-01 14:49:27 +000016% Cristy %
cristy3ed852e2009-09-05 21:47:34 +000017% March 2000 %
18% %
19% %
cristyfe676ee2013-11-18 13:03:38 +000020% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
cristy3ed852e2009-09-05 21:47:34 +000021% 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% http://www.imagemagick.org/script/license.php %
27% %
28% Unless required by applicable law or agreed to in writing, software %
29% distributed under the License is distributed on an "AS IS" BASIS, %
30% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31% See the License for the specific language governing permissions and %
32% limitations under the License. %
33% %
34%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35%
36%
37%
38*/
39
40/*
41 Include declarations.
42*/
cristy4c08aed2011-07-01 19:47:50 +000043#include "MagickCore/studio.h"
44#include "MagickCore/artifact.h"
45#include "MagickCore/cache.h"
46#include "MagickCore/color.h"
47#include "MagickCore/compare.h"
48#include "MagickCore/constitute.h"
49#include "MagickCore/distort.h"
50#include "MagickCore/draw.h"
51#include "MagickCore/effect.h"
52#include "MagickCore/exception.h"
53#include "MagickCore/exception-private.h"
cristy790190d2013-10-04 00:51:51 +000054#include "MagickCore/fourier.h"
cristy4c08aed2011-07-01 19:47:50 +000055#include "MagickCore/fx.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"
cristy71ffec42014-06-25 12:52:49 +000067#include "MagickCore/option-private.h"
cristyac73d1f2013-03-12 00:51:09 +000068#include "MagickCore/pixel.h"
cristy4c08aed2011-07-01 19:47:50 +000069#include "MagickCore/policy.h"
70#include "MagickCore/property.h"
71#include "MagickCore/quantize.h"
72#include "MagickCore/quantum.h"
73#include "MagickCore/resample.h"
74#include "MagickCore/resource_.h"
75#include "MagickCore/splay-tree.h"
76#include "MagickCore/statistic.h"
77#include "MagickCore/string_.h"
78#include "MagickCore/token.h"
79#include "MagickCore/utility.h"
cristy3ed852e2009-09-05 21:47:34 +000080
81/*
82 ImageMagick options.
83*/
84static const OptionInfo
85 AlignOptions[] =
86 {
cristy042ee782011-04-22 18:48:30 +000087 { "Undefined", UndefinedAlign, UndefinedOptionFlag, MagickTrue },
88 { "Center", CenterAlign, UndefinedOptionFlag, MagickFalse },
89 { "End", RightAlign, UndefinedOptionFlag, MagickFalse },
90 { "Left", LeftAlign, UndefinedOptionFlag, MagickFalse },
91 { "Middle", CenterAlign, UndefinedOptionFlag, MagickFalse },
92 { "Right", RightAlign, UndefinedOptionFlag, MagickFalse },
93 { "Start", LeftAlign, UndefinedOptionFlag, MagickFalse },
94 { (char *) NULL, UndefinedAlign, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +000095 },
cristy288a3532012-08-28 00:19:44 +000096 AlphaChannelOptions[] =
cristy3ed852e2009-09-05 21:47:34 +000097 {
cristy042ee782011-04-22 18:48:30 +000098 { "Undefined", UndefinedAlphaChannel, UndefinedOptionFlag, MagickTrue },
99 { "Activate", ActivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
100 { "Background", BackgroundAlphaChannel, UndefinedOptionFlag, MagickFalse },
101 { "Copy", CopyAlphaChannel, UndefinedOptionFlag, MagickFalse },
102 { "Deactivate", DeactivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
103 { "Extract", ExtractAlphaChannel, UndefinedOptionFlag, MagickFalse },
104 { "Off", DeactivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
105 { "On", ActivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
106 { "Opaque", OpaqueAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy61808382012-01-30 01:24:49 +0000107 { "Remove", RemoveAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000108 { "Set", SetAlphaChannel, UndefinedOptionFlag, MagickFalse },
109 { "Shape", ShapeAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000110 { "Reset", SetAlphaChannel, DeprecateOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000111 { "Transparent", TransparentAlphaChannel, UndefinedOptionFlag, MagickFalse },
112 { (char *) NULL, UndefinedAlphaChannel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000113 },
114 BooleanOptions[] =
115 {
anthony72feaa62012-01-17 06:46:23 +0000116 { "False", MagickFalse, UndefinedOptionFlag, MagickFalse },
117 { "True", MagickTrue, UndefinedOptionFlag, MagickFalse },
118 { "0", MagickFalse, UndefinedOptionFlag, MagickFalse },
119 { "1", MagickTrue, UndefinedOptionFlag, MagickFalse },
120 { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000121 },
cristy947cef22013-01-17 14:16:40 +0000122 CacheOptions[] =
123 {
124 { "Disk", DiskCache, UndefinedOptionFlag, MagickFalse },
125 { "Distributed", DistributedCache, UndefinedOptionFlag, MagickFalse },
126 { "Map", MapCache, UndefinedOptionFlag, MagickFalse },
127 { "Memory", MemoryCache, UndefinedOptionFlag, MagickFalse },
128 { "Ping", PingCache, UndefinedOptionFlag, MagickFalse },
129 { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
130 },
cristy3ed852e2009-09-05 21:47:34 +0000131 ChannelOptions[] =
132 {
cristy042ee782011-04-22 18:48:30 +0000133 { "Undefined", UndefinedChannel, UndefinedOptionFlag, MagickTrue },
anthony30b912a2012-03-22 01:20:28 +0000134 /* special */
cristy9a9230e2011-04-26 14:56:14 +0000135 { "All", CompositeChannels, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000136 { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
137 { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
138 /* individual channel */
139 { "A", AlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy953c4bd2012-02-24 01:04:04 +0000140 { "Alpha", AlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000141 { "Black", BlackChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000142 { "B", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000143 { "Blue", BlueChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000144 { "C", CyanChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000145 { "Cyan", CyanChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000146 { "Gray", GrayChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000147 { "G", GreenChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000148 { "Green", GreenChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000149 { "H", RedChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000150 { "Hue", RedChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000151 { "K", BlackChannel, UndefinedOptionFlag, MagickFalse },
152 { "L", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000153 { "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
154 { "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000155 { "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
anthony30b912a2012-03-22 01:20:28 +0000156 { "M", MagentaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000157 { "Magenta", MagentaChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000158 { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
159 { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
160 { "R", RedChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000161 { "Red", RedChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000162 { "S", GreenChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000163 { "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000164 { "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000165 { "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000166 { (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000167 },
168 ClassOptions[] =
169 {
cristy042ee782011-04-22 18:48:30 +0000170 { "Undefined", UndefinedClass, UndefinedOptionFlag, MagickTrue },
171 { "DirectClass", DirectClass, UndefinedOptionFlag, MagickFalse },
172 { "PseudoClass", PseudoClass, UndefinedOptionFlag, MagickFalse },
173 { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000174 },
175 ClipPathOptions[] =
176 {
cristy042ee782011-04-22 18:48:30 +0000177 { "Undefined", UndefinedPathUnits, UndefinedOptionFlag, MagickTrue },
178 { "ObjectBoundingBox", ObjectBoundingBox, UndefinedOptionFlag, MagickFalse },
179 { "UserSpace", UserSpace, UndefinedOptionFlag, MagickFalse },
180 { "UserSpaceOnUse", UserSpaceOnUse, UndefinedOptionFlag, MagickFalse },
181 { (char *) NULL, UndefinedPathUnits, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000182 },
183 CommandOptions[] =
184 {
anthony686b1a32012-02-15 14:50:53 +0000185 /* WARNING: this must be sorted by name, then by switch character
cristy87c02f42012-02-24 00:19:10 +0000186 So that it can be referenced using a binary search for speed.
187 See GetCommandOptionInfo() below for details.
anthony686b1a32012-02-15 14:50:53 +0000188
189 Check on sort...
190 magick -list command > t1
191 sort -k 1.2 t1 | diff t1 -
192 Should not show any differences...
193 */
anthony464f1c42012-04-22 08:51:01 +0000194 { "(", 0L, NoImageOperatorFlag, MagickTrue },
195 { ")", 0L, NoImageOperatorFlag, MagickTrue },
196 { "{", 0L, NoImageOperatorFlag, MagickTrue },
197 { "}", 0L, NoImageOperatorFlag, MagickTrue },
198 { "--", 1L, NoImageOperatorFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000199 { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000200 { "-adaptive-blur", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000201 { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000202 { "-adaptive-resize", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000203 { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000204 { "-adaptive-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000205 { "+adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
206 { "-adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000207 { "+affine", 0L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
208 { "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
anthony31f1bf72012-01-30 12:37:22 +0000209 { "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000210 { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
211 { "+alpha", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000212 { "-alpha", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000213 { "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
anthony964d28e2012-05-17 23:39:46 +0000214 { "-annotate", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000215 { "+antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
216 { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000217 { "+append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
218 { "-append", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000219 { "+attenuate", 0L, ImageInfoOptionFlag, MagickFalse },
anthony92c93bd2012-03-19 14:02:47 +0000220 { "-attenuate", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000221 { "+authenticate", 0L, ImageInfoOptionFlag, MagickFalse },
222 { "-authenticate", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000223 { "+auto-gamma", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000224 { "-auto-gamma", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000225 { "+auto-level", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000226 { "-auto-level", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000227 { "+auto-orient", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000228 { "-auto-orient", 0L, SimpleOperatorFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000229 { "+average", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000230 { "-average", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000231 { "+backdrop", 0L, NonMagickOptionFlag | NeverInterpretArgsFlag, MagickFalse },
232 { "-backdrop", 1L, NonMagickOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000233 { "+background", 0L, ImageInfoOptionFlag, MagickFalse },
234 { "-background", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000235 { "+bench", 1L, DeprecateOptionFlag, MagickTrue },
anthony9a6469e2011-05-04 11:07:31 +0000236 { "-bench", 1L, GenesisOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000237 { "+bias", 0L, ImageInfoOptionFlag, MagickFalse },
238 { "-bias", 1L, ImageInfoOptionFlag, MagickFalse },
239 { "+black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
240 { "-black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000241 { "+black-threshold", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000242 { "-black-threshold", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000243 { "+blend", 0L, NonMagickOptionFlag, MagickFalse },
244 { "-blend", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000245 { "+blue-primary", 0L, ImageInfoOptionFlag, MagickFalse },
246 { "-blue-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000247 { "+blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
248 { "-blue-shift", 1L, SimpleOperatorFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000249 { "+blur", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000250 { "-blur", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000251 { "+border", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000252 { "-border", 1L, SimpleOperatorFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000253 { "+bordercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
254 { "-bordercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000255 { "+borderwidth", 0L, NonMagickOptionFlag, MagickFalse },
256 { "-borderwidth", 1L, NonMagickOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000257 { "+box", 0L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
258 { "-box", 1L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000259 { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000260 { "-brightness-contrast", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000261 { "+cache", 0L, GlobalOptionFlag, MagickFalse },
262 { "-cache", 1L, GlobalOptionFlag, MagickFalse },
cristy2fc10e52014-04-26 14:13:53 +0000263 { "+canny", 1L, DeprecateOptionFlag, MagickTrue },
cristybd7d96a2014-04-19 20:27:43 +0000264 { "-canny", 1L, SimpleOperatorFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000265 { "+caption", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
266 { "-caption", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000267 { "+cdl", 1L, DeprecateOptionFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000268 { "-cdl", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthonydf9471d2012-03-22 03:53:05 +0000269 { "+channel", 0L, ImageInfoOptionFlag, MagickFalse },
270 { "-channel", 1L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000271 { "-channel-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
cristyf57e5482013-02-17 22:11:27 +0000272 { "+charcoal", 1L, DeprecateOptionFlag, MagickTrue },
273 { "-charcoal", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000274 { "+chop", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000275 { "-chop", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000276 { "+clamp", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000277 { "-clamp", 0L, SimpleOperatorFlag, MagickFalse },
278 { "+clip", 0L, SimpleOperatorFlag, MagickFalse },
279 { "-clip", 0L, SimpleOperatorFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000280 { "+clip-mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
281 { "-clip-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000282 { "+clip-path", 1L, SimpleOperatorFlag, MagickFalse },
283 { "-clip-path", 1L, SimpleOperatorFlag, MagickFalse },
284 { "+clone", 0L, NoImageOperatorFlag, MagickFalse },
285 { "-clone", 1L, NoImageOperatorFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000286 { "+clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000287 { "-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000288 { "+coalesce", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000289 { "-coalesce", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000290 { "+color-matrix", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000291 { "-color-matrix", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000292 { "+colorize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000293 { "-colorize", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000294 { "+colormap", 0L, NonMagickOptionFlag, MagickFalse },
295 { "-colormap", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000296 { "+colors", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000297 { "-colors", 1L, SimpleOperatorFlag, MagickFalse },
298 { "+colorspace", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
299 { "-colorspace", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
anthony5a4ff372013-05-01 04:48:57 +0000300 { "+combine", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
301 { "-combine", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000302 { "+comment", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
303 { "-comment", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
cristya111cac2013-08-20 00:30:49 +0000304 { "+compare", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
305 { "-compare", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
cristy34919ed2013-10-06 15:42:40 +0000306 { "+complex", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristy1141c852013-10-04 15:17:30 +0000307 { "-complex", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000308 { "+compose", 0L, ImageInfoOptionFlag, MagickFalse },
309 { "-compose", 1L, ImageInfoOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000310 { "+composite", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000311 { "-composite", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000312 { "+compress", 0L, ImageInfoOptionFlag, MagickFalse },
313 { "-compress", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000314 { "+concurrent", 0L, DeprecateOptionFlag, MagickTrue },
anthonyebb73a22012-03-22 14:25:52 +0000315 { "-concurrent", 0L, GenesisOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000316 { "+contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
317 { "-contrast", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000318 { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000319 { "-contrast-stretch", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000320 { "+convolve", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000321 { "-convolve", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000322 { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000323 { "-crop", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000324 { "+cycle", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000325 { "-cycle", 1L, SimpleOperatorFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000326 { "+debug", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
327 { "-debug", 1L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000328 { "+decipher", 1L, DeprecateOptionFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000329 { "-decipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000330 { "+deconstruct", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000331 { "-deconstruct", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
anthonya322a832013-04-27 06:28:03 +0000332 { "+define", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
333 { "-define", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000334 { "+delay", 0L, ImageInfoOptionFlag, MagickFalse },
335 { "-delay", 1L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000336 { "+delete", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
337 { "-delete", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000338 { "+density", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000339 { "-density", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000340 { "+depth", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
341 { "-depth", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000342 { "+descend", 0L, NonMagickOptionFlag, MagickFalse },
343 { "-descend", 1L, NonMagickOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000344 { "+deskew", 0L, SimpleOperatorFlag, MagickFalse },
345 { "-deskew", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000346 { "+despeckle", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000347 { "-despeckle", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000348 { "+direction", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
349 { "-direction", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000350 { "+displace", 0L, NonMagickOptionFlag, MagickFalse },
351 { "-displace", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000352 { "+display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000353 { "-display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000354 { "+dispose", 0L, ImageInfoOptionFlag, MagickFalse },
355 { "-dispose", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000356 { "+dissolve", 0L, NonMagickOptionFlag, MagickFalse },
357 { "-dissolve", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000358 { "+dissimilarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
359 { "-dissimilarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
anthony964d28e2012-05-17 23:39:46 +0000360 { "+distort", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
361 { "-distort", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000362 { "+dither", 0L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
363 { "-dither", 1L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000364 { "+draw", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000365 { "-draw", 1L, SimpleOperatorFlag, MagickFalse },
366 { "+duplicate", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
367 { "-duplicate", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony9a6469e2011-05-04 11:07:31 +0000368 { "+duration", 1L, GenesisOptionFlag, MagickFalse },
369 { "-duration", 1L, GenesisOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000370 { "+edge", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000371 { "-edge", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000372 { "+emboss", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000373 { "-emboss", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000374 { "+encipher", 1L, DeprecateOptionFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000375 { "-encipher", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000376 { "+encoding", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000377 { "-encoding", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000378 { "+endian", 0L, ImageInfoOptionFlag, MagickFalse },
379 { "-endian", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000380 { "+enhance", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000381 { "-enhance", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000382 { "+equalize", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000383 { "-equalize", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000384 { "+evaluate", 2L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000385 { "-evaluate", 2L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000386 { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000387 { "-evaluate-sequence", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000388 { "-exit", 0L, SpecialOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000389 { "+extent", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000390 { "-extent", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000391 { "+extract", 0L, ImageInfoOptionFlag, MagickFalse },
392 { "-extract", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000393 { "+family", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000394 { "-family", 1L, DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000395 { "+features", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
396 { "-features", 1L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
397 { "+fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
398 { "-fft", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000399 { "+fill", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
400 { "-fill", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000401 { "+filter", 0L, ImageInfoOptionFlag, MagickFalse },
402 { "-filter", 1L, ImageInfoOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000403 { "+flatten", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000404 { "-flatten", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000405 { "+flip", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000406 { "-flip", 0L, SimpleOperatorFlag, MagickFalse },
407 { "+floodfill", 2L, SimpleOperatorFlag, MagickFalse },
408 { "-floodfill", 2L, SimpleOperatorFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000409 { "+flop", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000410 { "-flop", 0L, SimpleOperatorFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000411 { "+font", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
412 { "-font", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000413 { "+foreground", 0L, NonMagickOptionFlag, MagickFalse },
414 { "-foreground", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000415 { "+format", 0L, ImageInfoOptionFlag, MagickFalse },
anthonya322a832013-04-27 06:28:03 +0000416 { "-format", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000417 { "+frame", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000418 { "-frame", 1L, SimpleOperatorFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000419 { "+function", 2L, DeprecateOptionFlag, MagickTrue },
anthony964d28e2012-05-17 23:39:46 +0000420 { "-function", 2L,SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000421 { "+fuzz", 0L, ImageInfoOptionFlag, MagickFalse },
422 { "-fuzz", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000423 { "+fx", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000424 { "-fx", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony7a4d6102012-07-01 09:48:25 +0000425 { "+gamma", 1L, SimpleOperatorFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000426 { "-gamma", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000427 { "+gaussian", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000428 { "-gaussian", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000429 { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000430 { "-gaussian-blur", 1L, SimpleOperatorFlag, MagickFalse },
431 { "+geometry", 0L, SimpleOperatorFlag, MagickFalse },
432 { "-geometry", 1L, SimpleOperatorFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000433 { "+gravity", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
434 { "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristye0b9b8f2013-03-28 12:39:39 +0000435 { "+grayscale", 1L, SimpleOperatorFlag, MagickTrue },
436 { "-grayscale", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000437 { "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse },
438 { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000439 { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000440 { "-hald-clut", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000441 { "+highlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
442 { "-highlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
cristy2fc10e52014-04-26 14:13:53 +0000443 { "+hough-lines", 1L, DeprecateOptionFlag, MagickTrue },
cristybd7d96a2014-04-19 20:27:43 +0000444 { "-hough-lines", 1L, SimpleOperatorFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000445 { "+iconGeometry", 0L, NonMagickOptionFlag, MagickFalse },
446 { "-iconGeometry", 1L, NonMagickOptionFlag, MagickFalse },
447 { "+iconic", 0L, NonMagickOptionFlag, MagickFalse },
anthonya322a832013-04-27 06:28:03 +0000448 { "-iconic", 0L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000449 { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000450 { "-identify", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
451 { "+ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
452 { "-ift", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000453 { "+immutable", 0L, NonMagickOptionFlag, MagickFalse },
454 { "-immutable", 0L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000455 { "+implode", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000456 { "-implode", 1L, SimpleOperatorFlag, MagickFalse },
457 { "+insert", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
458 { "-insert", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
cristya14c5122013-03-15 10:42:52 +0000459 { "+intensity", 0L, ImageInfoOptionFlag, MagickFalse },
460 { "-intensity", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000461 { "+intent", 0L, ImageInfoOptionFlag, MagickFalse },
462 { "-intent", 1L, ImageInfoOptionFlag, MagickFalse },
463 { "+interlace", 0L, ImageInfoOptionFlag, MagickFalse },
464 { "-interlace", 1L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000465 { "+interline-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
466 { "-interline-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000467 { "+interpolate", 0L, ImageInfoOptionFlag, MagickFalse },
468 { "-interpolate", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000469 { "+interpolative-resize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000470 { "-interpolative-resize", 1L, SimpleOperatorFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000471 { "+interword-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
472 { "-interword-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000473 { "+kerning", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
474 { "-kerning", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000475 { "+label", 0L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
476 { "-label", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000477 { "+lat", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000478 { "-lat", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000479 { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000480 { "-layers", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
481 { "+level", 1L, SimpleOperatorFlag, MagickFalse },
482 { "-level", 1L, SimpleOperatorFlag, MagickFalse },
483 { "+level-colors", 1L, SimpleOperatorFlag, MagickFalse },
484 { "-level-colors", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000485 { "+limit", 0L, DeprecateOptionFlag, MagickTrue },
anthonyea068a52012-04-09 05:46:25 +0000486 { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000487 { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000488 { "-linear-stretch", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000489 { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000490 { "-liquid-rescale", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000491 { "+list", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000492 { "-list", 1L, NoImageOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000493 { "+log", 0L, DeprecateOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000494 { "-log", 1L, GlobalOptionFlag, MagickFalse },
495 { "+loop", 0L, ImageInfoOptionFlag, MagickFalse },
496 { "-loop", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000497 { "+lowlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
498 { "-lowlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
cristy7220ee42013-04-14 01:30:34 +0000499 { "+magnify", 0L, DeprecateOptionFlag, MagickTrue },
500 { "-magnify", 0L, SimpleOperatorFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000501 { "+map", 0L, ReplacedOptionFlag | ListOperatorFlag | FireOptionFlag, MagickTrue },
502 { "-map", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthony4837ac22012-05-18 23:39:48 +0000503 { "+mask", 0L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
504 { "-mask", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000505 { "+matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
506 { "-matte", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthonyde1a57f2011-05-02 09:45:30 +0000507 { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse },
508 { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000509 { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
510 { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristy2fc10e52014-04-26 14:13:53 +0000511 { "+mean-shift", 1L, DeprecateOptionFlag, MagickTrue },
512 { "-mean-shift", 1L, SimpleOperatorFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000513 { "+median", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000514 { "-median", 1L, ReplacedOptionFlag | SimpleOperatorFlag | FireOptionFlag, MagickTrue },
cristy6c8baa72013-08-20 00:39:06 +0000515 { "+metric", 0L, DeprecateOptionFlag | FireOptionFlag, MagickFalse },
516 { "-metric", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000517 { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
518 { "-minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristybd4a3c22014-01-07 15:09:37 +0000519 { "+moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
520 { "-moments", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000521 { "+mode", 1L, NonMagickOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000522 { "-mode", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000523 { "+modulate", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000524 { "-modulate", 1L, SimpleOperatorFlag, MagickFalse },
525 { "+monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
526 { "-monitor", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000527 { "+monochrome", 0L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000528 { "-monochrome", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000529 { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000530 { "-morph", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000531 { "+morphology", 2L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000532 { "-morphology", 2L, SimpleOperatorFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000533 { "+mosaic", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000534 { "-mosaic", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000535 { "+motion-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000536 { "-motion-blur", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000537 { "+name", 0L, NonMagickOptionFlag, MagickFalse },
538 { "-name", 1L, NonMagickOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000539 { "+negate", 0L, SimpleOperatorFlag, MagickFalse },
540 { "-negate", 0L, SimpleOperatorFlag, MagickFalse },
541 { "+noise", 1L, SimpleOperatorFlag, MagickFalse },
542 { "-noise", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickFalse },
543 { "-noop", 0L, NoImageOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000544 { "+normalize", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000545 { "-normalize", 0L, SimpleOperatorFlag, MagickFalse },
546 { "+opaque", 1L, SimpleOperatorFlag, MagickFalse },
547 { "-opaque", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000548 { "+ordered-dither", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000549 { "-ordered-dither", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000550 { "+orient", 0L, ImageInfoOptionFlag, MagickFalse },
551 { "-orient", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000552 { "+page", 0L, ImageInfoOptionFlag, MagickFalse },
553 { "-page", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000554 { "+paint", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000555 { "-paint", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000556 { "+path", 0L, NonMagickOptionFlag, MagickFalse },
557 { "-path", 1L, NonMagickOptionFlag, MagickFalse },
558 { "+pause", 0L, NonMagickOptionFlag, MagickFalse },
559 { "-pause", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000560 { "+ping", 0L, ImageInfoOptionFlag, MagickFalse },
561 { "-ping", 0L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000562 { "+pointsize", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
563 { "-pointsize", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000564 { "+polaroid", 0L, SimpleOperatorFlag, MagickFalse },
565 { "-polaroid", 1L, SimpleOperatorFlag, MagickFalse },
cristyf56e6ad2012-11-11 19:29:38 +0000566 { "+poly", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
567 { "-poly", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000568 { "+posterize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000569 { "-posterize", 1L, SimpleOperatorFlag, MagickFalse },
anthonya3ef4ed2012-03-17 06:52:53 +0000570 { "+precision", 0L, ImageInfoOptionFlag, MagickFalse },
571 { "-precision", 1L, ImageInfoOptionFlag, MagickFalse },
572 { "+preview", 0L, DeprecateOptionFlag, MagickTrue },
573 { "-preview", 1L, GlobalOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000574 { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthonya322a832013-04-27 06:28:03 +0000575 { "-print", 1L, NoImageOperatorFlag | AlwaysInterpretArgsFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000576 { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000577 { "-process", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
578 { "+profile", 1L, SimpleOperatorFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000579 { "-profile", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000580 { "+quality", 0L, ImageInfoOptionFlag, MagickFalse },
581 { "-quality", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000582 { "+quantize", 0L, QuantizeInfoOptionFlag, MagickFalse },
583 { "-quantize", 1L, QuantizeInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000584 { "+quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
585 { "-quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
dirk6d612cf2014-03-13 21:17:23 +0000586 { "-rotational-blur", 1L, SimpleOperatorFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000587 { "+raise", 1L, SimpleOperatorFlag, MagickFalse },
588 { "-raise", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000589 { "+random-threshold", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000590 { "-random-threshold", 1L, SimpleOperatorFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000591 { "-read", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000592 { "+recolor", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000593 { "-recolor", 1L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
anthonyde1a57f2011-05-02 09:45:30 +0000594 { "+red-primary", 0L, ImageInfoOptionFlag, MagickFalse },
595 { "-red-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000596 { "+regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
597 { "-regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000598 { "+region", 0L, NoImageOperatorFlag, MagickFalse },
599 { "-region", 1L, NoImageOperatorFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000600 { "+remap", 0L, ListOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
601 { "-remap", 1L, SimpleOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000602 { "+remote", 0L, NonMagickOptionFlag, MagickFalse },
603 { "-remote", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000604 { "+render", 0L, DrawInfoOptionFlag, MagickFalse },
605 { "-render", 0L, DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000606 { "+repage", 0L, SimpleOperatorFlag, MagickFalse },
607 { "-repage", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000608 { "+resample", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000609 { "-resample", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000610 { "+resize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000611 { "-resize", 1L, SimpleOperatorFlag, MagickFalse },
anthonyd111fda2012-04-13 03:07:40 +0000612 { "+respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
613 { "-respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000614 { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000615 { "-reverse", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000616 { "+roll", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000617 { "-roll", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000618 { "+rotate", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000619 { "-rotate", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000620 { "+sample", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000621 { "-sample", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000622 { "+sampling-factor", 0L, ImageInfoOptionFlag, MagickFalse },
623 { "-sampling-factor", 1L, ImageInfoOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000624 { "+sans", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
625 { "-sans", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
626 { "+sans0", 0L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'noop' */
627 { "-sans0", 0L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
anthony0da1e9c2012-11-17 05:28:22 +0000628 { "+sans1", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
629 { "-sans1", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue }, /* equivelent to 'sans' */
anthony4837ac22012-05-18 23:39:48 +0000630 { "+sans2", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
631 { "-sans2", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000632 { "+scale", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000633 { "-scale", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000634 { "+scene", 0L, ImageInfoOptionFlag, MagickFalse },
635 { "-scene", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000636 { "+scenes", 0L, NonMagickOptionFlag, MagickFalse },
637 { "-scenes", 1L, NonMagickOptionFlag, MagickFalse },
638 { "+screen", 0L, NonMagickOptionFlag, MagickFalse },
639 { "-screen", 1L, NonMagickOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000640 { "-script", 1L, SpecialOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000641 { "+seed", 0L, GlobalOptionFlag, MagickFalse },
642 { "-seed", 1L, GlobalOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000643 { "+segment", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000644 { "-segment", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000645 { "+selective-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000646 { "-selective-blur", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000647 { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000648 { "-separate", 0L, SimpleOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000649 { "+sepia-tone", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000650 { "-sepia-tone", 1L, SimpleOperatorFlag, MagickFalse },
anthonya322a832013-04-27 06:28:03 +0000651 { "+set", 1L, NoImageOperatorFlag, MagickFalse },
anthony0da1e9c2012-11-17 05:28:22 +0000652 { "-set", 2L, NoImageOperatorFlag | NeverInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000653 { "+shade", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000654 { "-shade", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000655 { "+shadow", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000656 { "-shadow", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000657 { "+shared-memory", 0L, NonMagickOptionFlag, MagickFalse },
658 { "-shared-memory", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000659 { "+sharpen", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000660 { "-sharpen", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000661 { "+shave", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000662 { "-shave", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000663 { "+shear", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000664 { "-shear", 1L, SimpleOperatorFlag, MagickFalse },
665 { "+sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
666 { "-sigmoidal-contrast", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000667 { "+silent", 0L, NonMagickOptionFlag, MagickFalse },
668 { "-silent", 1L, NonMagickOptionFlag, MagickFalse },
cristy62e52182013-03-15 14:26:17 +0000669 { "+similarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
670 { "-similarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000671 { "+size", 0L, ImageInfoOptionFlag, MagickFalse },
672 { "-size", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000673 { "+sketch", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000674 { "-sketch", 1L, SimpleOperatorFlag, MagickFalse },
675 { "+smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
676 { "-smush", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000677 { "+snaps", 0L, NonMagickOptionFlag, MagickFalse },
678 { "-snaps", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000679 { "+solarize", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000680 { "-solarize", 1L, SimpleOperatorFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000681 { "+sparse-color", 1L, DeprecateOptionFlag, MagickTrue },
anthony964d28e2012-05-17 23:39:46 +0000682 { "-sparse-color", 2L, SimpleOperatorFlag | AlwaysInterpretArgsFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000683 { "+splice", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000684 { "-splice", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000685 { "+spread", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000686 { "-spread", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000687 { "+statistic", 2L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000688 { "-statistic", 2L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000689 { "+stegano", 0L, NonMagickOptionFlag, MagickFalse },
690 { "-stegano", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000691 { "+stereo", 0L, DeprecateOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000692 { "-stereo", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000693 { "+stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000694 { "-stretch", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000695 { "+strip", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000696 { "-strip", 0L, SimpleOperatorFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000697 { "+stroke", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
698 { "-stroke", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000699 { "+strokewidth", 1L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000700 { "-strokewidth", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000701 { "+style", 0L, DrawInfoOptionFlag, MagickFalse },
702 { "-style", 1L, DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000703 { "+subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
704 { "-subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
705 { "-subimage", 0L, ListOperatorFlag, MagickFalse },
706 { "+swap", 0L, ListOperatorFlag | FireOptionFlag, MagickFalse },
707 { "-swap", 1L, ListOperatorFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000708 { "+swirl", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000709 { "-swirl", 1L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000710 { "+synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
711 { "-synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
712 { "+taint", 0L, ImageInfoOptionFlag, MagickFalse },
713 { "-taint", 0L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000714 { "+text-font", 0L, NonMagickOptionFlag, MagickFalse },
715 { "-text-font", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000716 { "+texture", 0L, ImageInfoOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000717 { "-texture", 1L, ImageInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000718 { "+threshold", 0L, SimpleOperatorFlag, MagickFalse },
719 { "-threshold", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000720 { "+thumbnail", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000721 { "-thumbnail", 1L, SimpleOperatorFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000722 { "+tile", 0L, DrawInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
723 { "-tile", 1L, DrawInfoOptionFlag | NeverInterpretArgsFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000724 { "+tile-offset", 0L, ImageInfoOptionFlag, MagickFalse },
725 { "-tile-offset", 1L, ImageInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000726 { "+tint", 1L, SimpleOperatorFlag, MagickFalse },
727 { "-tint", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000728 { "+title", 0L, NonMagickOptionFlag, MagickFalse },
729 { "-title", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000730 { "+transform", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000731 { "-transform", 0L, ReplacedOptionFlag | SimpleOperatorFlag, MagickTrue },
732 { "+transparent", 1L, SimpleOperatorFlag, MagickFalse },
733 { "-transparent", 1L, SimpleOperatorFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000734 { "+transparent-color", 0L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000735 { "-transparent-color", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000736 { "+transpose", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000737 { "-transpose", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000738 { "+transverse", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000739 { "-transverse", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000740 { "+treedepth", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000741 { "-treedepth", 1L, QuantizeInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000742 { "+trim", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000743 { "-trim", 0L, SimpleOperatorFlag, MagickFalse },
744 { "+type", 0L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
745 { "-type", 1L, ImageInfoOptionFlag | SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000746 { "+undercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000747 { "-undercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony464f1c42012-04-22 08:51:01 +0000748 { "+unique", 0L, SimpleOperatorFlag, MagickFalse },
749 { "-unique", 0L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000750 { "+unique-colors", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000751 { "-unique-colors", 0L, SimpleOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000752 { "+units", 0L, ImageInfoOptionFlag, MagickFalse },
753 { "-units", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000754 { "+unsharp", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000755 { "-unsharp", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000756 { "+update", 0L, NonMagickOptionFlag, MagickFalse },
757 { "-update", 1L, NonMagickOptionFlag, MagickFalse },
758 { "+use-pixmap", 0L, NonMagickOptionFlag, MagickFalse },
759 { "-use-pixmap", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000760 { "+verbose", 0L, ImageInfoOptionFlag, MagickFalse },
761 { "-verbose", 0L, ImageInfoOptionFlag, MagickFalse },
cristyc404ff62012-02-05 15:17:09 +0000762 { "+version", 0L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000763 { "-version", 0L, NoImageOperatorFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000764 { "+view", 0L, ImageInfoOptionFlag, MagickFalse },
765 { "-view", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000766 { "+vignette", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000767 { "-vignette", 1L, SimpleOperatorFlag, MagickFalse },
anthonyebb73a22012-03-22 14:25:52 +0000768 { "+virtual-pixel", 0L, ImageInfoOptionFlag, MagickFalse },
769 { "-virtual-pixel", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000770 { "+visual", 0L, NonMagickOptionFlag, MagickFalse },
771 { "-visual", 1L, NonMagickOptionFlag, MagickFalse },
772 { "+watermark", 0L, NonMagickOptionFlag, MagickFalse },
773 { "-watermark", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000774 { "+wave", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000775 { "-wave", 1L, SimpleOperatorFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000776 { "+weight", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000777 { "-weight", 1L, DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000778 { "+white-point", 0L, ImageInfoOptionFlag, MagickFalse },
779 { "-white-point", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000780 { "+white-threshold", 1L, DeprecateOptionFlag, MagickTrue },
anthony464f1c42012-04-22 08:51:01 +0000781 { "-white-threshold", 1L, SimpleOperatorFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000782 { "+window", 0L, NonMagickOptionFlag, MagickFalse },
783 { "-window", 1L, NonMagickOptionFlag, MagickFalse },
784 { "+window-group", 0L, NonMagickOptionFlag, MagickFalse },
785 { "-window-group", 1L, NonMagickOptionFlag, MagickFalse },
anthony4837ac22012-05-18 23:39:48 +0000786 { "+write", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
787 { "-write", 1L, NoImageOperatorFlag | NeverInterpretArgsFlag | FireOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000788 { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000789 },
790 ComposeOptions[] =
791 {
cristy042ee782011-04-22 18:48:30 +0000792 { "Undefined", UndefinedCompositeOp, UndefinedOptionFlag, MagickTrue },
793 { "Atop", AtopCompositeOp, UndefinedOptionFlag, MagickFalse },
794 { "Blend", BlendCompositeOp, UndefinedOptionFlag, MagickFalse },
795 { "Blur", BlurCompositeOp, UndefinedOptionFlag, MagickFalse },
796 { "Bumpmap", BumpmapCompositeOp, UndefinedOptionFlag, MagickFalse },
797 { "ChangeMask", ChangeMaskCompositeOp, UndefinedOptionFlag, MagickFalse },
798 { "Clear", ClearCompositeOp, UndefinedOptionFlag, MagickFalse },
799 { "ColorBurn", ColorBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
800 { "ColorDodge", ColorDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
801 { "Colorize", ColorizeCompositeOp, UndefinedOptionFlag, MagickFalse },
cristye4a40472011-12-22 02:56:19 +0000802 { "CopyAlpha", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000803 { "CopyBlack", CopyBlackCompositeOp, UndefinedOptionFlag, MagickFalse },
804 { "CopyBlue", CopyBlueCompositeOp, UndefinedOptionFlag, MagickFalse },
805 { "CopyCyan", CopyCyanCompositeOp, UndefinedOptionFlag, MagickFalse },
806 { "CopyGreen", CopyGreenCompositeOp, UndefinedOptionFlag, MagickFalse },
807 { "Copy", CopyCompositeOp, UndefinedOptionFlag, MagickFalse },
808 { "CopyMagenta", CopyMagentaCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000809 { "CopyRed", CopyRedCompositeOp, UndefinedOptionFlag, MagickFalse },
810 { "CopyYellow", CopyYellowCompositeOp, UndefinedOptionFlag, MagickFalse },
811 { "Darken", DarkenCompositeOp, UndefinedOptionFlag, MagickFalse },
812 { "DarkenIntensity", DarkenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
813 { "DivideDst", DivideDstCompositeOp, UndefinedOptionFlag, MagickFalse },
814 { "DivideSrc", DivideSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
815 { "Dst", DstCompositeOp, UndefinedOptionFlag, MagickFalse },
816 { "Difference", DifferenceCompositeOp, UndefinedOptionFlag, MagickFalse },
817 { "Displace", DisplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
818 { "Dissolve", DissolveCompositeOp, UndefinedOptionFlag, MagickFalse },
819 { "Distort", DistortCompositeOp, UndefinedOptionFlag, MagickFalse },
820 { "DstAtop", DstAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
821 { "DstIn", DstInCompositeOp, UndefinedOptionFlag, MagickFalse },
822 { "DstOut", DstOutCompositeOp, UndefinedOptionFlag, MagickFalse },
823 { "DstOver", DstOverCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000824 { "Exclusion", ExclusionCompositeOp, UndefinedOptionFlag, MagickFalse },
825 { "HardLight", HardLightCompositeOp, UndefinedOptionFlag, MagickFalse },
826 { "Hue", HueCompositeOp, UndefinedOptionFlag, MagickFalse },
827 { "In", InCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy98621462011-12-31 22:31:11 +0000828 { "Intensity", IntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000829 { "Lighten", LightenCompositeOp, UndefinedOptionFlag, MagickFalse },
830 { "LightenIntensity", LightenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
831 { "LinearBurn", LinearBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
832 { "LinearDodge", LinearDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
833 { "LinearLight", LinearLightCompositeOp, UndefinedOptionFlag, MagickFalse },
834 { "Luminize", LuminizeCompositeOp, UndefinedOptionFlag, MagickFalse },
835 { "Mathematics", MathematicsCompositeOp, UndefinedOptionFlag, MagickFalse },
836 { "MinusDst", MinusDstCompositeOp, UndefinedOptionFlag, MagickFalse },
837 { "MinusSrc", MinusSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
838 { "Modulate", ModulateCompositeOp, UndefinedOptionFlag, MagickFalse },
839 { "ModulusAdd", ModulusAddCompositeOp, UndefinedOptionFlag, MagickFalse },
840 { "ModulusSubtract", ModulusSubtractCompositeOp, UndefinedOptionFlag, MagickFalse },
841 { "Multiply", MultiplyCompositeOp, UndefinedOptionFlag, MagickFalse },
842 { "None", NoCompositeOp, UndefinedOptionFlag, MagickFalse },
843 { "Out", OutCompositeOp, UndefinedOptionFlag, MagickFalse },
844 { "Overlay", OverlayCompositeOp, UndefinedOptionFlag, MagickFalse },
845 { "Over", OverCompositeOp, UndefinedOptionFlag, MagickFalse },
846 { "PegtopLight", PegtopLightCompositeOp, UndefinedOptionFlag, MagickFalse },
847 { "PinLight", PinLightCompositeOp, UndefinedOptionFlag, MagickFalse },
848 { "Plus", PlusCompositeOp, UndefinedOptionFlag, MagickFalse },
849 { "Replace", ReplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
850 { "Saturate", SaturateCompositeOp, UndefinedOptionFlag, MagickFalse },
851 { "Screen", ScreenCompositeOp, UndefinedOptionFlag, MagickFalse },
852 { "SoftLight", SoftLightCompositeOp, UndefinedOptionFlag, MagickFalse },
853 { "Src", SrcCompositeOp, UndefinedOptionFlag, MagickFalse },
854 { "SrcAtop", SrcAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
855 { "SrcIn", SrcInCompositeOp, UndefinedOptionFlag, MagickFalse },
856 { "SrcOut", SrcOutCompositeOp, UndefinedOptionFlag, MagickFalse },
857 { "SrcOver", SrcOverCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000858 { "VividLight", VividLightCompositeOp, UndefinedOptionFlag, MagickFalse },
859 { "Xor", XorCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000860 { "Divide", DivideDstCompositeOp, DeprecateOptionFlag, MagickTrue },
861 { "Minus", MinusDstCompositeOp, DeprecateOptionFlag, MagickTrue },
cristy1df692a2011-04-23 17:09:35 +0000862 { "Threshold", ThresholdCompositeOp, DeprecateOptionFlag, MagickTrue },
anthonyea068a52012-04-09 05:46:25 +0000863 { "CopyOpacity", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000864 { (char *) NULL, UndefinedCompositeOp, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000865 },
866 CompressOptions[] =
867 {
cristy042ee782011-04-22 18:48:30 +0000868 { "Undefined", UndefinedCompression, UndefinedOptionFlag, MagickTrue },
869 { "B44", B44Compression, UndefinedOptionFlag, MagickFalse },
870 { "B44A", B44ACompression, UndefinedOptionFlag, MagickFalse },
871 { "BZip", BZipCompression, UndefinedOptionFlag, MagickFalse },
872 { "DXT1", DXT1Compression, UndefinedOptionFlag, MagickFalse },
873 { "DXT3", DXT3Compression, UndefinedOptionFlag, MagickFalse },
874 { "DXT5", DXT5Compression, UndefinedOptionFlag, MagickFalse },
875 { "Fax", FaxCompression, UndefinedOptionFlag, MagickFalse },
876 { "Group4", Group4Compression, UndefinedOptionFlag, MagickFalse },
cristy6d5e20f2011-04-25 13:48:54 +0000877 { "JBIG1", JBIG1Compression, UndefinedOptionFlag, MagickFalse },
878 { "JBIG2", JBIG2Compression, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000879 { "JPEG", JPEGCompression, UndefinedOptionFlag, MagickFalse },
880 { "JPEG2000", JPEG2000Compression, UndefinedOptionFlag, MagickFalse },
881 { "Lossless", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
882 { "LosslessJPEG", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
883 { "LZMA", LZMACompression, UndefinedOptionFlag, MagickFalse },
884 { "LZW", LZWCompression, UndefinedOptionFlag, MagickFalse },
885 { "None", NoCompression, UndefinedOptionFlag, MagickFalse },
886 { "Piz", PizCompression, UndefinedOptionFlag, MagickFalse },
887 { "Pxr24", Pxr24Compression, UndefinedOptionFlag, MagickFalse },
888 { "RLE", RLECompression, UndefinedOptionFlag, MagickFalse },
889 { "Zip", ZipCompression, UndefinedOptionFlag, MagickFalse },
890 { "RunlengthEncoded", RLECompression, UndefinedOptionFlag, MagickFalse },
891 { "ZipS", ZipSCompression, UndefinedOptionFlag, MagickFalse },
892 { (char *) NULL, UndefinedCompression, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000893 },
894 ColorspaceOptions[] =
895 {
cristy042ee782011-04-22 18:48:30 +0000896 { "Undefined", UndefinedColorspace, UndefinedOptionFlag, MagickTrue },
cristy978b6a32012-06-24 15:17:32 +0000897 { "CIELab", LabColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000898 { "CMY", CMYColorspace, UndefinedOptionFlag, MagickFalse },
899 { "CMYK", CMYKColorspace, UndefinedOptionFlag, MagickFalse },
900 { "Gray", GRAYColorspace, UndefinedOptionFlag, MagickFalse },
cristy722fc0c2012-08-04 23:15:43 +0000901 { "HCL", HCLColorspace, UndefinedOptionFlag, MagickFalse },
cristy710cbd42013-05-02 21:39:35 +0000902 { "HCLp", HCLpColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000903 { "HSB", HSBColorspace, UndefinedOptionFlag, MagickFalse },
cristyaf64eb22013-05-02 14:07:10 +0000904 { "HSI", HSIColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000905 { "HSL", HSLColorspace, UndefinedOptionFlag, MagickFalse },
cristy246c3132013-05-02 16:35:53 +0000906 { "HSV", HSVColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000907 { "HWB", HWBColorspace, UndefinedOptionFlag, MagickFalse },
908 { "Lab", LabColorspace, UndefinedOptionFlag, MagickFalse },
cristy1f099312012-08-29 17:22:14 +0000909 { "LCH", LCHColorspace, UndefinedOptionFlag, MagickFalse },
cristydf42b172013-04-05 13:35:37 +0000910 { "LCHab", LCHabColorspace, UndefinedOptionFlag, MagickFalse },
911 { "LCHuv", LCHuvColorspace, UndefinedOptionFlag, MagickFalse },
cristy09d746f2012-08-29 17:54:59 +0000912 { "LMS", LMSColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000913 { "Log", LogColorspace, UndefinedOptionFlag, MagickFalse },
cristycb82c8e2012-08-01 12:54:37 +0000914 { "Luv", LuvColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000915 { "OHTA", OHTAColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000916 { "Rec601YCbCr", Rec601YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000917 { "Rec709YCbCr", Rec709YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
918 { "RGB", RGBColorspace, UndefinedOptionFlag, MagickFalse },
cristy34632332013-05-03 10:21:05 +0000919 { "scRGB", scRGBColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000920 { "sRGB", sRGBColorspace, UndefinedOptionFlag, MagickFalse },
921 { "Transparent", TransparentColorspace, UndefinedOptionFlag, MagickFalse },
922 { "XYZ", XYZColorspace, UndefinedOptionFlag, MagickFalse },
923 { "YCbCr", YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
cristyc282d1b2013-05-06 23:37:48 +0000924 { "YDbDr", YDbDrColorspace, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000925 { "YCC", YCCColorspace, UndefinedOptionFlag, MagickFalse },
926 { "YIQ", YIQColorspace, UndefinedOptionFlag, MagickFalse },
927 { "YPbPr", YPbPrColorspace, UndefinedOptionFlag, MagickFalse },
928 { "YUV", YUVColorspace, UndefinedOptionFlag, MagickFalse },
929 { (char *) NULL, UndefinedColorspace, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000930 },
cristy790190d2013-10-04 00:51:51 +0000931 ComplexOptions[] =
932 {
933 { "Undefined", UndefinedComplexOperator, UndefinedOptionFlag, MagickTrue },
cristy19f78862013-10-05 22:21:46 +0000934 { "Add", AddComplexOperator, UndefinedOptionFlag, MagickFalse },
cristy790190d2013-10-04 00:51:51 +0000935 { "Conjugate", ConjugateComplexOperator, UndefinedOptionFlag, MagickFalse },
936 { "Divide", DivideComplexOperator, UndefinedOptionFlag, MagickFalse },
cristyf46941c2013-10-06 22:25:41 +0000937 { "MagnitudePhase", MagnitudePhaseComplexOperator, UndefinedOptionFlag, MagickFalse },
cristy790190d2013-10-04 00:51:51 +0000938 { "Multiply", MultiplyComplexOperator, UndefinedOptionFlag, MagickFalse },
cristyf46941c2013-10-06 22:25:41 +0000939 { "RealImaginary", RealImaginaryComplexOperator, UndefinedOptionFlag, MagickFalse },
cristy19f78862013-10-05 22:21:46 +0000940 { "Subtract", SubtractComplexOperator, UndefinedOptionFlag, MagickFalse },
cristy790190d2013-10-04 00:51:51 +0000941 { (char *) NULL, UndefinedComplexOperator, UndefinedOptionFlag, MagickFalse }
942 },
cristy3ed852e2009-09-05 21:47:34 +0000943 DataTypeOptions[] =
944 {
cristy042ee782011-04-22 18:48:30 +0000945 { "Undefined", UndefinedData, UndefinedOptionFlag, MagickTrue },
946 { "Byte", ByteData, UndefinedOptionFlag, MagickFalse },
947 { "Long", LongData, UndefinedOptionFlag, MagickFalse },
948 { "Short", ShortData, UndefinedOptionFlag, MagickFalse },
949 { "String", StringData, UndefinedOptionFlag, MagickFalse },
950 { (char *) NULL, UndefinedData, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000951 },
952 DecorateOptions[] =
953 {
cristy042ee782011-04-22 18:48:30 +0000954 { "Undefined", UndefinedDecoration, UndefinedOptionFlag, MagickTrue },
955 { "LineThrough", LineThroughDecoration, UndefinedOptionFlag, MagickFalse },
956 { "None", NoDecoration, UndefinedOptionFlag, MagickFalse },
957 { "Overline", OverlineDecoration, UndefinedOptionFlag, MagickFalse },
958 { "Underline", UnderlineDecoration, UndefinedOptionFlag, MagickFalse },
959 { (char *) NULL, UndefinedDecoration, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000960 },
cristyc9b12952010-03-28 01:12:28 +0000961 DirectionOptions[] =
962 {
cristy042ee782011-04-22 18:48:30 +0000963 { "Undefined", UndefinedDirection, UndefinedOptionFlag, MagickTrue },
964 { "right-to-left", RightToLeftDirection, UndefinedOptionFlag, MagickFalse },
965 { "left-to-right", LeftToRightDirection, UndefinedOptionFlag, MagickFalse },
966 { (char *) NULL, UndefinedDirection, UndefinedOptionFlag, MagickFalse }
cristyc9b12952010-03-28 01:12:28 +0000967 },
cristy3ed852e2009-09-05 21:47:34 +0000968 DisposeOptions[] =
969 {
cristy042ee782011-04-22 18:48:30 +0000970 { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickTrue },
971 { "Background", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
972 { "None", NoneDispose, UndefinedOptionFlag, MagickFalse },
973 { "Previous", PreviousDispose, UndefinedOptionFlag, MagickFalse },
974 { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
975 { "0", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
976 { "1", NoneDispose, UndefinedOptionFlag, MagickFalse },
977 { "2", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
978 { "3", PreviousDispose, UndefinedOptionFlag, MagickFalse },
979 { (char *) NULL, UndefinedDispose, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000980 },
981 DistortOptions[] =
982 {
cristy042ee782011-04-22 18:48:30 +0000983 { "Affine", AffineDistortion, UndefinedOptionFlag, MagickFalse },
984 { "AffineProjection", AffineProjectionDistortion, UndefinedOptionFlag, MagickFalse },
985 { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
986 { "SRT", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
987 { "Perspective", PerspectiveDistortion, UndefinedOptionFlag, MagickFalse },
988 { "PerspectiveProjection", PerspectiveProjectionDistortion, UndefinedOptionFlag, MagickFalse },
989 { "Bilinear", BilinearForwardDistortion, UndefinedOptionFlag, MagickTrue },
990 { "BilinearForward", BilinearForwardDistortion, UndefinedOptionFlag, MagickFalse },
991 { "BilinearReverse", BilinearReverseDistortion, UndefinedOptionFlag, MagickFalse },
992 { "Polynomial", PolynomialDistortion, UndefinedOptionFlag, MagickFalse },
993 { "Arc", ArcDistortion, UndefinedOptionFlag, MagickFalse },
994 { "Polar", PolarDistortion, UndefinedOptionFlag, MagickFalse },
995 { "DePolar", DePolarDistortion, UndefinedOptionFlag, MagickFalse },
996 { "Barrel", BarrelDistortion, UndefinedOptionFlag, MagickFalse },
anthonye0d9bbd2011-06-15 01:05:57 +0000997 { "Cylinder2Plane", Cylinder2PlaneDistortion, UndefinedOptionFlag, MagickTrue },
998 { "Plane2Cylinder", Plane2CylinderDistortion, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000999 { "BarrelInverse", BarrelInverseDistortion, UndefinedOptionFlag, MagickFalse },
1000 { "Shepards", ShepardsDistortion, UndefinedOptionFlag, MagickFalse },
1001 { "Resize", ResizeDistortion, UndefinedOptionFlag, MagickFalse },
1002 { (char *) NULL, UndefinedDistortion, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001003 },
1004 DitherOptions[] =
1005 {
cristy042ee782011-04-22 18:48:30 +00001006 { "Undefined", UndefinedDitherMethod, UndefinedOptionFlag, MagickTrue },
1007 { "None", NoDitherMethod, UndefinedOptionFlag, MagickFalse },
1008 { "FloydSteinberg", FloydSteinbergDitherMethod, UndefinedOptionFlag, MagickFalse },
1009 { "Riemersma", RiemersmaDitherMethod, UndefinedOptionFlag, MagickFalse },
1010 { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001011 },
1012 EndianOptions[] =
1013 {
cristy042ee782011-04-22 18:48:30 +00001014 { "Undefined", UndefinedEndian, UndefinedOptionFlag, MagickTrue },
1015 { "LSB", LSBEndian, UndefinedOptionFlag, MagickFalse },
1016 { "MSB", MSBEndian, UndefinedOptionFlag, MagickFalse },
1017 { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001018 },
1019 EvaluateOptions[] =
1020 {
cristy042ee782011-04-22 18:48:30 +00001021 { "Undefined", UndefinedEvaluateOperator, UndefinedOptionFlag, MagickTrue },
1022 { "Abs", AbsEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1023 { "Add", AddEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1024 { "AddModulus", AddModulusEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1025 { "And", AndEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1026 { "Cos", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1027 { "Cosine", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1028 { "Divide", DivideEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1029 { "Exp", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1030 { "Exponential", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1031 { "GaussianNoise", GaussianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1032 { "ImpulseNoise", ImpulseNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1033 { "LaplacianNoise", LaplacianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1034 { "LeftShift", LeftShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1035 { "Log", LogEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1036 { "Max", MaxEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1037 { "Mean", MeanEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1038 { "Median", MedianEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1039 { "Min", MinEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1040 { "MultiplicativeNoise", MultiplicativeNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1041 { "Multiply", MultiplyEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1042 { "Or", OrEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1043 { "PoissonNoise", PoissonNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1044 { "Pow", PowEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1045 { "RightShift", RightShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy7c4c78f2014-06-15 21:57:39 +00001046 { "RMS", RootMeanSquareEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1047 { "RootMeanSquare", RootMeanSquareEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001048 { "Set", SetEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1049 { "Sin", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1050 { "Sine", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1051 { "Subtract", SubtractEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy12a3f8e2012-01-31 01:53:19 +00001052 { "Sum", SumEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001053 { "Threshold", ThresholdEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1054 { "ThresholdBlack", ThresholdBlackEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1055 { "ThresholdWhite", ThresholdWhiteEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1056 { "UniformNoise", UniformNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1057 { "Xor", XorEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1058 { (char *) NULL, UndefinedEvaluateOperator, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001059 },
1060 FillRuleOptions[] =
1061 {
cristy042ee782011-04-22 18:48:30 +00001062 { "Undefined", UndefinedRule, UndefinedOptionFlag, MagickTrue },
1063 { "Evenodd", EvenOddRule, UndefinedOptionFlag, MagickFalse },
1064 { "NonZero", NonZeroRule, UndefinedOptionFlag, MagickFalse },
1065 { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001066 },
1067 FilterOptions[] =
1068 {
cristy042ee782011-04-22 18:48:30 +00001069 { "Undefined", UndefinedFilter, UndefinedOptionFlag, MagickTrue },
1070 { "Bartlett", BartlettFilter, UndefinedOptionFlag, MagickFalse },
1071 { "Blackman", BlackmanFilter, UndefinedOptionFlag, MagickFalse },
1072 { "Bohman", BohmanFilter, UndefinedOptionFlag, MagickFalse },
1073 { "Box", BoxFilter, UndefinedOptionFlag, MagickFalse },
1074 { "Catrom", CatromFilter, UndefinedOptionFlag, MagickFalse },
anthony5d4a1702012-05-08 01:22:41 +00001075 { "Cosine", CosineFilter, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001076 { "Cubic", CubicFilter, UndefinedOptionFlag, MagickFalse },
1077 { "Gaussian", GaussianFilter, UndefinedOptionFlag, MagickFalse },
1078 { "Hamming", HammingFilter, UndefinedOptionFlag, MagickFalse },
anthonyf60ffd72012-08-20 03:25:30 +00001079 { "Hann", HannFilter, UndefinedOptionFlag, MagickFalse },
1080 { "Hanning", HannFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
cristy042ee782011-04-22 18:48:30 +00001081 { "Hermite", HermiteFilter, UndefinedOptionFlag, MagickFalse },
1082 { "Jinc", JincFilter, UndefinedOptionFlag, MagickFalse },
1083 { "Kaiser", KaiserFilter, UndefinedOptionFlag, MagickFalse },
1084 { "Lagrange", LagrangeFilter, UndefinedOptionFlag, MagickFalse },
1085 { "Lanczos", LanczosFilter, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001086 { "Lanczos2", Lanczos2Filter, UndefinedOptionFlag, MagickFalse },
1087 { "Lanczos2Sharp", Lanczos2SharpFilter, UndefinedOptionFlag, MagickFalse },
anthonyaa806422012-10-17 00:56:10 +00001088 { "LanczosRadius", LanczosRadiusFilter, UndefinedOptionFlag, MagickFalse },
1089 { "LanczosSharp", LanczosSharpFilter, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001090 { "Mitchell", MitchellFilter, UndefinedOptionFlag, MagickFalse },
1091 { "Parzen", ParzenFilter, UndefinedOptionFlag, MagickFalse },
1092 { "Point", PointFilter, UndefinedOptionFlag, MagickFalse },
1093 { "Quadratic", QuadraticFilter, UndefinedOptionFlag, MagickFalse },
1094 { "Robidoux", RobidouxFilter, UndefinedOptionFlag, MagickFalse },
anthony45531092012-04-23 00:33:53 +00001095 { "RobidouxSharp", RobidouxSharpFilter, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001096 { "Sinc", SincFilter, UndefinedOptionFlag, MagickFalse },
1097 { "SincFast", SincFastFilter, UndefinedOptionFlag, MagickFalse },
anthonycf4e33d2012-06-08 07:33:23 +00001098 { "Spline", SplineFilter, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001099 { "Triangle", TriangleFilter, UndefinedOptionFlag, MagickFalse },
anthonyf60ffd72012-08-20 03:25:30 +00001100 { "Welch", WelchFilter, UndefinedOptionFlag, MagickFalse },
1101 { "Welsh", WelchFilter, UndefinedOptionFlag, MagickTrue }, /*misspell*/
cristy042ee782011-04-22 18:48:30 +00001102 { (char *) NULL, UndefinedFilter, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001103 },
1104 FunctionOptions[] =
1105 {
cristy042ee782011-04-22 18:48:30 +00001106 { "Undefined", UndefinedFunction, UndefinedOptionFlag, MagickTrue },
1107 { "Polynomial", PolynomialFunction, UndefinedOptionFlag, MagickFalse },
1108 { "Sinusoid", SinusoidFunction, UndefinedOptionFlag, MagickFalse },
1109 { "ArcSin", ArcsinFunction, UndefinedOptionFlag, MagickFalse },
1110 { "ArcTan", ArctanFunction, UndefinedOptionFlag, MagickFalse },
1111 { (char *) NULL, UndefinedFunction, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001112 },
1113 GravityOptions[] =
1114 {
cristy042ee782011-04-22 18:48:30 +00001115 { "Undefined", UndefinedGravity, UndefinedOptionFlag, MagickTrue },
1116 { "None", UndefinedGravity, UndefinedOptionFlag, MagickFalse },
1117 { "Center", CenterGravity, UndefinedOptionFlag, MagickFalse },
1118 { "East", EastGravity, UndefinedOptionFlag, MagickFalse },
1119 { "Forget", ForgetGravity, UndefinedOptionFlag, MagickFalse },
1120 { "NorthEast", NorthEastGravity, UndefinedOptionFlag, MagickFalse },
1121 { "North", NorthGravity, UndefinedOptionFlag, MagickFalse },
1122 { "NorthWest", NorthWestGravity, UndefinedOptionFlag, MagickFalse },
1123 { "SouthEast", SouthEastGravity, UndefinedOptionFlag, MagickFalse },
1124 { "South", SouthGravity, UndefinedOptionFlag, MagickFalse },
1125 { "SouthWest", SouthWestGravity, UndefinedOptionFlag, MagickFalse },
1126 { "West", WestGravity, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001127 { (char *) NULL, UndefinedGravity, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001128 },
cristy3ed852e2009-09-05 21:47:34 +00001129 IntentOptions[] =
1130 {
cristy042ee782011-04-22 18:48:30 +00001131 { "Undefined", UndefinedIntent, UndefinedOptionFlag, MagickTrue },
1132 { "Absolute", AbsoluteIntent, UndefinedOptionFlag, MagickFalse },
1133 { "Perceptual", PerceptualIntent, UndefinedOptionFlag, MagickFalse },
1134 { "Relative", RelativeIntent, UndefinedOptionFlag, MagickFalse },
1135 { "Saturation", SaturationIntent, UndefinedOptionFlag, MagickFalse },
1136 { (char *) NULL, UndefinedIntent, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001137 },
1138 InterlaceOptions[] =
1139 {
cristy042ee782011-04-22 18:48:30 +00001140 { "Undefined", UndefinedInterlace, UndefinedOptionFlag, MagickTrue },
1141 { "Line", LineInterlace, UndefinedOptionFlag, MagickFalse },
1142 { "None", NoInterlace, UndefinedOptionFlag, MagickFalse },
1143 { "Plane", PlaneInterlace, UndefinedOptionFlag, MagickFalse },
1144 { "Partition", PartitionInterlace, UndefinedOptionFlag, MagickFalse },
1145 { "GIF", GIFInterlace, UndefinedOptionFlag, MagickFalse },
1146 { "JPEG", JPEGInterlace, UndefinedOptionFlag, MagickFalse },
1147 { "PNG", PNGInterlace, UndefinedOptionFlag, MagickFalse },
1148 { (char *) NULL, UndefinedInterlace, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001149 },
1150 InterpolateOptions[] =
1151 {
cristy042ee782011-04-22 18:48:30 +00001152 { "Undefined", UndefinedInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1153 { "Average", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
anthonycf4e33d2012-06-08 07:33:23 +00001154 { "Average4", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1155 { "Average9", Average9InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1156 { "Average16", Average16InterpolatePixel, UndefinedOptionFlag, MagickFalse },
1157 { "Background", BackgroundInterpolatePixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001158 { "Bilinear", BilinearInterpolatePixel, UndefinedOptionFlag, MagickFalse },
anthonycf4e33d2012-06-08 07:33:23 +00001159 { "Blend", BlendInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1160 { "Catrom", CatromInterpolatePixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001161 { "Integer", IntegerInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1162 { "Mesh", MeshInterpolatePixel, UndefinedOptionFlag, MagickFalse },
anthonycf4e33d2012-06-08 07:33:23 +00001163 { "Nearest", NearestInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1164 { "NearestNeighbor", NearestInterpolatePixel, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001165 { "Spline", SplineInterpolatePixel, UndefinedOptionFlag, MagickFalse },
anthonycf4e33d2012-06-08 07:33:23 +00001166/* { "Filter", FilterInterpolatePixel, UndefinedOptionFlag, MagickFalse }, */
cristy042ee782011-04-22 18:48:30 +00001167 { (char *) NULL, UndefinedInterpolatePixel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001168 },
anthony602ab9b2010-01-05 08:06:50 +00001169 KernelOptions[] =
1170 {
cristy042ee782011-04-22 18:48:30 +00001171 { "Undefined", UndefinedKernel, UndefinedOptionFlag, MagickTrue },
1172 { "Unity", UnityKernel, UndefinedOptionFlag, MagickFalse },
1173 { "Gaussian", GaussianKernel, UndefinedOptionFlag, MagickFalse },
1174 { "DoG", DoGKernel, UndefinedOptionFlag, MagickFalse },
1175 { "LoG", LoGKernel, UndefinedOptionFlag, MagickFalse },
1176 { "Blur", BlurKernel, UndefinedOptionFlag, MagickFalse },
1177 { "Comet", CometKernel, UndefinedOptionFlag, MagickFalse },
anthony40ca0b92012-08-02 13:23:28 +00001178 { "Binomial", BinomialKernel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001179 { "Laplacian", LaplacianKernel, UndefinedOptionFlag, MagickFalse },
1180 { "Sobel", SobelKernel, UndefinedOptionFlag, MagickFalse },
1181 { "FreiChen", FreiChenKernel, UndefinedOptionFlag, MagickFalse },
1182 { "Roberts", RobertsKernel, UndefinedOptionFlag, MagickFalse },
1183 { "Prewitt", PrewittKernel, UndefinedOptionFlag, MagickFalse },
1184 { "Compass", CompassKernel, UndefinedOptionFlag, MagickFalse },
1185 { "Kirsch", KirschKernel, UndefinedOptionFlag, MagickFalse },
1186 { "Diamond", DiamondKernel, UndefinedOptionFlag, MagickFalse },
1187 { "Square", SquareKernel, UndefinedOptionFlag, MagickFalse },
1188 { "Rectangle", RectangleKernel, UndefinedOptionFlag, MagickFalse },
1189 { "Disk", DiskKernel, UndefinedOptionFlag, MagickFalse },
1190 { "Octagon", OctagonKernel, UndefinedOptionFlag, MagickFalse },
1191 { "Plus", PlusKernel, UndefinedOptionFlag, MagickFalse },
1192 { "Cross", CrossKernel, UndefinedOptionFlag, MagickFalse },
1193 { "Ring", RingKernel, UndefinedOptionFlag, MagickFalse },
1194 { "Peaks", PeaksKernel, UndefinedOptionFlag, MagickFalse },
1195 { "Edges", EdgesKernel, UndefinedOptionFlag, MagickFalse },
1196 { "Corners", CornersKernel, UndefinedOptionFlag, MagickFalse },
1197 { "Diagonals", DiagonalsKernel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001198 { "LineEnds", LineEndsKernel, UndefinedOptionFlag, MagickFalse },
1199 { "LineJunctions", LineJunctionsKernel, UndefinedOptionFlag, MagickFalse },
1200 { "Ridges", RidgesKernel, UndefinedOptionFlag, MagickFalse },
1201 { "ConvexHull", ConvexHullKernel, UndefinedOptionFlag, MagickFalse },
1202 { "ThinSe", ThinSEKernel, UndefinedOptionFlag, MagickFalse },
1203 { "Skeleton", SkeletonKernel, UndefinedOptionFlag, MagickFalse },
1204 { "Chebyshev", ChebyshevKernel, UndefinedOptionFlag, MagickFalse },
1205 { "Manhattan", ManhattanKernel, UndefinedOptionFlag, MagickFalse },
1206 { "Octagonal", OctagonalKernel, UndefinedOptionFlag, MagickFalse },
1207 { "Euclidean", EuclideanKernel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +00001208 { "User Defined", UserDefinedKernel, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001209 { (char *) NULL, UndefinedKernel, UndefinedOptionFlag, MagickFalse }
anthony602ab9b2010-01-05 08:06:50 +00001210 },
cristy3ed852e2009-09-05 21:47:34 +00001211 LayerOptions[] =
1212 {
cristy042ee782011-04-22 18:48:30 +00001213 { "Undefined", UndefinedLayer, UndefinedOptionFlag, MagickTrue },
1214 { "Coalesce", CoalesceLayer, UndefinedOptionFlag, MagickFalse },
1215 { "CompareAny", CompareAnyLayer, UndefinedOptionFlag, MagickFalse },
1216 { "CompareClear", CompareClearLayer, UndefinedOptionFlag, MagickFalse },
1217 { "CompareOverlay", CompareOverlayLayer, UndefinedOptionFlag, MagickFalse },
1218 { "Dispose", DisposeLayer, UndefinedOptionFlag, MagickFalse },
1219 { "Optimize", OptimizeLayer, UndefinedOptionFlag, MagickFalse },
1220 { "OptimizeFrame", OptimizeImageLayer, UndefinedOptionFlag, MagickFalse },
1221 { "OptimizePlus", OptimizePlusLayer, UndefinedOptionFlag, MagickFalse },
1222 { "OptimizeTransparency", OptimizeTransLayer, UndefinedOptionFlag, MagickFalse },
1223 { "RemoveDups", RemoveDupsLayer, UndefinedOptionFlag, MagickFalse },
1224 { "RemoveZero", RemoveZeroLayer, UndefinedOptionFlag, MagickFalse },
1225 { "Composite", CompositeLayer, UndefinedOptionFlag, MagickFalse },
1226 { "Merge", MergeLayer, UndefinedOptionFlag, MagickFalse },
1227 { "Flatten", FlattenLayer, UndefinedOptionFlag, MagickFalse },
1228 { "Mosaic", MosaicLayer, UndefinedOptionFlag, MagickFalse },
1229 { "TrimBounds", TrimBoundsLayer, UndefinedOptionFlag, MagickFalse },
1230 { (char *) NULL, UndefinedLayer, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001231 },
1232 LineCapOptions[] =
1233 {
cristy042ee782011-04-22 18:48:30 +00001234 { "Undefined", UndefinedCap, UndefinedOptionFlag, MagickTrue },
1235 { "Butt", ButtCap, UndefinedOptionFlag, MagickFalse },
1236 { "Round", RoundCap, UndefinedOptionFlag, MagickFalse },
1237 { "Square", SquareCap, UndefinedOptionFlag, MagickFalse },
1238 { (char *) NULL, UndefinedCap, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001239 },
1240 LineJoinOptions[] =
1241 {
cristy042ee782011-04-22 18:48:30 +00001242 { "Undefined", UndefinedJoin, UndefinedOptionFlag, MagickTrue },
1243 { "Bevel", BevelJoin, UndefinedOptionFlag, MagickFalse },
1244 { "Miter", MiterJoin, UndefinedOptionFlag, MagickFalse },
1245 { "Round", RoundJoin, UndefinedOptionFlag, MagickFalse },
1246 { (char *) NULL, UndefinedJoin, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001247 },
1248 ListOptions[] =
1249 {
cristy042ee782011-04-22 18:48:30 +00001250 { "Align", MagickAlignOptions, UndefinedOptionFlag, MagickFalse },
cristy288a3532012-08-28 00:19:44 +00001251 { "Alpha", MagickAlphaChannelOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001252 { "Boolean", MagickBooleanOptions, UndefinedOptionFlag, MagickFalse },
cristy947cef22013-01-17 14:16:40 +00001253 { "Cache", MagickCacheOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001254 { "Channel", MagickChannelOptions, UndefinedOptionFlag, MagickFalse },
1255 { "Class", MagickClassOptions, UndefinedOptionFlag, MagickFalse },
1256 { "ClipPath", MagickClipPathOptions, UndefinedOptionFlag, MagickFalse },
1257 { "Coder", MagickCoderOptions, UndefinedOptionFlag, MagickFalse },
1258 { "Color", MagickColorOptions, UndefinedOptionFlag, MagickFalse },
1259 { "Colorspace", MagickColorspaceOptions, UndefinedOptionFlag, MagickFalse },
1260 { "Command", MagickCommandOptions, UndefinedOptionFlag, MagickFalse },
cristy790190d2013-10-04 00:51:51 +00001261 { "Complex", MagickComplexOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001262 { "Compose", MagickComposeOptions, UndefinedOptionFlag, MagickFalse },
1263 { "Compress", MagickCompressOptions, UndefinedOptionFlag, MagickFalse },
1264 { "Configure", MagickConfigureOptions, UndefinedOptionFlag, MagickFalse },
1265 { "DataType", MagickDataTypeOptions, UndefinedOptionFlag, MagickFalse },
1266 { "Debug", MagickDebugOptions, UndefinedOptionFlag, MagickFalse },
1267 { "Decoration", MagickDecorateOptions, UndefinedOptionFlag, MagickFalse },
1268 { "Delegate", MagickDelegateOptions, UndefinedOptionFlag, MagickFalse },
1269 { "Direction", MagickDirectionOptions, UndefinedOptionFlag, MagickFalse },
1270 { "Dispose", MagickDisposeOptions, UndefinedOptionFlag, MagickFalse },
1271 { "Distort", MagickDistortOptions, UndefinedOptionFlag, MagickFalse },
1272 { "Dither", MagickDitherOptions, UndefinedOptionFlag, MagickFalse },
1273 { "Endian", MagickEndianOptions, UndefinedOptionFlag, MagickFalse },
1274 { "Evaluate", MagickEvaluateOptions, UndefinedOptionFlag, MagickFalse },
1275 { "FillRule", MagickFillRuleOptions, UndefinedOptionFlag, MagickFalse },
1276 { "Filter", MagickFilterOptions, UndefinedOptionFlag, MagickFalse },
1277 { "Font", MagickFontOptions, UndefinedOptionFlag, MagickFalse },
1278 { "Format", MagickFormatOptions, UndefinedOptionFlag, MagickFalse },
1279 { "Function", MagickFunctionOptions, UndefinedOptionFlag, MagickFalse },
1280 { "Gravity", MagickGravityOptions, UndefinedOptionFlag, MagickFalse },
cristyf2104462013-03-13 16:13:08 +00001281 { "Intensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001282 { "Intent", MagickIntentOptions, UndefinedOptionFlag, MagickFalse },
1283 { "Interlace", MagickInterlaceOptions, UndefinedOptionFlag, MagickFalse },
1284 { "Interpolate", MagickInterpolateOptions, UndefinedOptionFlag, MagickFalse },
1285 { "Kernel", MagickKernelOptions, UndefinedOptionFlag, MagickFalse },
1286 { "Layers", MagickLayerOptions, UndefinedOptionFlag, MagickFalse },
1287 { "LineCap", MagickLineCapOptions, UndefinedOptionFlag, MagickFalse },
1288 { "LineJoin", MagickLineJoinOptions, UndefinedOptionFlag, MagickFalse },
1289 { "List", MagickListOptions, UndefinedOptionFlag, MagickFalse },
1290 { "Locale", MagickLocaleOptions, UndefinedOptionFlag, MagickFalse },
1291 { "LogEvent", MagickLogEventOptions, UndefinedOptionFlag, MagickFalse },
1292 { "Log", MagickLogOptions, UndefinedOptionFlag, MagickFalse },
1293 { "Magic", MagickMagicOptions, UndefinedOptionFlag, MagickFalse },
1294 { "Method", MagickMethodOptions, UndefinedOptionFlag, MagickFalse },
1295 { "Metric", MagickMetricOptions, UndefinedOptionFlag, MagickFalse },
1296 { "Mime", MagickMimeOptions, UndefinedOptionFlag, MagickFalse },
1297 { "Mode", MagickModeOptions, UndefinedOptionFlag, MagickFalse },
1298 { "Morphology", MagickMorphologyOptions, UndefinedOptionFlag, MagickFalse },
1299 { "Module", MagickModuleOptions, UndefinedOptionFlag, MagickFalse },
1300 { "Noise", MagickNoiseOptions, UndefinedOptionFlag, MagickFalse },
1301 { "Orientation", MagickOrientationOptions, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001302 { "PixelChannel", MagickPixelChannelOptions, UndefinedOptionFlag, MagickFalse },
cristyac73d1f2013-03-12 00:51:09 +00001303 { "PixelIntensity", MagickPixelIntensityOptions, UndefinedOptionFlag, MagickFalse },
cristy18fd4432013-03-22 01:26:09 +00001304 { "PixelMask", MagickPixelMaskOptions, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001305 { "PixelTrait", MagickPixelTraitOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001306 { "Policy", MagickPolicyOptions, UndefinedOptionFlag, MagickFalse },
1307 { "PolicyDomain", MagickPolicyDomainOptions, UndefinedOptionFlag, MagickFalse },
1308 { "PolicyRights", MagickPolicyRightsOptions, UndefinedOptionFlag, MagickFalse },
1309 { "Preview", MagickPreviewOptions, UndefinedOptionFlag, MagickFalse },
1310 { "Primitive", MagickPrimitiveOptions, UndefinedOptionFlag, MagickFalse },
1311 { "QuantumFormat", MagickQuantumFormatOptions, UndefinedOptionFlag, MagickFalse },
1312 { "Resource", MagickResourceOptions, UndefinedOptionFlag, MagickFalse },
1313 { "SparseColor", MagickSparseColorOptions, UndefinedOptionFlag, MagickFalse },
1314 { "Statistic", MagickStatisticOptions, UndefinedOptionFlag, MagickFalse },
1315 { "Storage", MagickStorageOptions, UndefinedOptionFlag, MagickFalse },
1316 { "Stretch", MagickStretchOptions, UndefinedOptionFlag, MagickFalse },
1317 { "Style", MagickStyleOptions, UndefinedOptionFlag, MagickFalse },
1318 { "Threshold", MagickThresholdOptions, UndefinedOptionFlag, MagickFalse },
1319 { "Type", MagickTypeOptions, UndefinedOptionFlag, MagickFalse },
1320 { "Units", MagickResolutionOptions, UndefinedOptionFlag, MagickFalse },
1321 { "Undefined", MagickUndefinedOptions, UndefinedOptionFlag, MagickTrue },
1322 { "Validate", MagickValidateOptions, UndefinedOptionFlag, MagickFalse },
1323 { "VirtualPixel", MagickVirtualPixelOptions, UndefinedOptionFlag, MagickFalse },
1324 { (char *) NULL, MagickUndefinedOptions, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001325 },
1326 LogEventOptions[] =
1327 {
cristy042ee782011-04-22 18:48:30 +00001328 { "Undefined", UndefinedEvents, UndefinedOptionFlag, MagickTrue },
1329 { "All", (AllEvents &~ TraceEvent), UndefinedOptionFlag, MagickFalse },
cristy68b14972011-10-26 14:54:58 +00001330 { "Accelerate", AccelerateEvent, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001331 { "Annotate", AnnotateEvent, UndefinedOptionFlag, MagickFalse },
1332 { "Blob", BlobEvent, UndefinedOptionFlag, MagickFalse },
1333 { "Cache", CacheEvent, UndefinedOptionFlag, MagickFalse },
1334 { "Coder", CoderEvent, UndefinedOptionFlag, MagickFalse },
anthonya322a832013-04-27 06:28:03 +00001335 { "Command", CommandEvent, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001336 { "Configure", ConfigureEvent, UndefinedOptionFlag, MagickFalse },
1337 { "Deprecate", DeprecateEvent, UndefinedOptionFlag, MagickFalse },
1338 { "Draw", DrawEvent, UndefinedOptionFlag, MagickFalse },
1339 { "Exception", ExceptionEvent, UndefinedOptionFlag, MagickFalse },
1340 { "Locale", LocaleEvent, UndefinedOptionFlag, MagickFalse },
1341 { "Module", ModuleEvent, UndefinedOptionFlag, MagickFalse },
1342 { "None", NoEvents, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001343 { "Pixel", PixelEvent, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001344 { "Policy", PolicyEvent, UndefinedOptionFlag, MagickFalse },
1345 { "Resource", ResourceEvent, UndefinedOptionFlag, MagickFalse },
1346 { "Trace", TraceEvent, UndefinedOptionFlag, MagickFalse },
1347 { "Transform", TransformEvent, UndefinedOptionFlag, MagickFalse },
1348 { "User", UserEvent, UndefinedOptionFlag, MagickFalse },
1349 { "Wand", WandEvent, UndefinedOptionFlag, MagickFalse },
1350 { "X11", X11Event, UndefinedOptionFlag, MagickFalse },
1351 { (char *) NULL, UndefinedEvents, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001352 },
1353 MetricOptions[] =
1354 {
cristya6efb492013-07-10 23:57:14 +00001355 { "Undefined", UndefinedErrorMetric, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001356 { "AE", AbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1357 { "Fuzz", FuzzErrorMetric, UndefinedOptionFlag, MagickFalse },
1358 { "MAE", MeanAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
cristy03fa69f2014-01-08 18:36:49 +00001359 { "MEPP", MeanErrorPerPixelErrorMetric, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001360 { "MSE", MeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1361 { "NCC", NormalizedCrossCorrelationErrorMetric, UndefinedOptionFlag, MagickFalse },
1362 { "PAE", PeakAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
cristybed8f952014-01-08 18:26:15 +00001363 { "PHASh", PerceptualHashErrorMetric, UndefinedOptionFlag, MagickFalse },
cristy03d6f862014-01-08 18:34:48 +00001364 { "PSNR", PeakSignalToNoiseRatioErrorMetric, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001365 { "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
cristya6efb492013-07-10 23:57:14 +00001366 { (char *) NULL, UndefinedErrorMetric, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001367 },
1368 MethodOptions[] =
1369 {
cristy042ee782011-04-22 18:48:30 +00001370 { "Undefined", UndefinedMethod, UndefinedOptionFlag, MagickTrue },
1371 { "FillToBorder", FillToBorderMethod, UndefinedOptionFlag, MagickFalse },
1372 { "Floodfill", FloodfillMethod, UndefinedOptionFlag, MagickFalse },
1373 { "Point", PointMethod, UndefinedOptionFlag, MagickFalse },
1374 { "Replace", ReplaceMethod, UndefinedOptionFlag, MagickFalse },
1375 { "Reset", ResetMethod, UndefinedOptionFlag, MagickFalse },
1376 { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001377 },
1378 ModeOptions[] =
1379 {
cristy042ee782011-04-22 18:48:30 +00001380 { "Undefined", UndefinedMode, UndefinedOptionFlag, MagickTrue },
1381 { "Concatenate", ConcatenateMode, UndefinedOptionFlag, MagickFalse },
1382 { "Frame", FrameMode, UndefinedOptionFlag, MagickFalse },
1383 { "Unframe", UnframeMode, UndefinedOptionFlag, MagickFalse },
1384 { (char *) NULL, UndefinedMode, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001385 },
anthony602ab9b2010-01-05 08:06:50 +00001386 MorphologyOptions[] =
1387 {
cristy042ee782011-04-22 18:48:30 +00001388 { "Undefined", UndefinedMorphology, UndefinedOptionFlag, MagickTrue },
1389 { "Correlate", CorrelateMorphology, UndefinedOptionFlag, MagickFalse },
1390 { "Convolve", ConvolveMorphology, UndefinedOptionFlag, MagickFalse },
1391 { "Dilate", DilateMorphology, UndefinedOptionFlag, MagickFalse },
1392 { "Erode", ErodeMorphology, UndefinedOptionFlag, MagickFalse },
1393 { "Close", CloseMorphology, UndefinedOptionFlag, MagickFalse },
1394 { "Open", OpenMorphology, UndefinedOptionFlag, MagickFalse },
1395 { "DilateIntensity", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1396 { "ErodeIntensity", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1397 { "CloseIntensity", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1398 { "OpenIntensity", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1399 { "DilateI", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1400 { "ErodeI", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1401 { "CloseI", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1402 { "OpenI", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1403 { "Smooth", SmoothMorphology, UndefinedOptionFlag, MagickFalse },
1404 { "EdgeOut", EdgeOutMorphology, UndefinedOptionFlag, MagickFalse },
1405 { "EdgeIn", EdgeInMorphology, UndefinedOptionFlag, MagickFalse },
1406 { "Edge", EdgeMorphology, UndefinedOptionFlag, MagickFalse },
1407 { "TopHat", TopHatMorphology, UndefinedOptionFlag, MagickFalse },
1408 { "BottomHat", BottomHatMorphology, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001409 { "Hmt", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1410 { "HitNMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1411 { "HitAndMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1412 { "Thinning", ThinningMorphology, UndefinedOptionFlag, MagickFalse },
1413 { "Thicken", ThickenMorphology, UndefinedOptionFlag, MagickFalse },
anthonyf34d9b22012-02-22 06:11:08 +00001414 { "Distance", DistanceMorphology, UndefinedOptionFlag, MagickFalse },
1415 { "IterativeDistance", IterativeDistanceMorphology, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001416 { "Voronoi", VoronoiMorphology, UndefinedOptionFlag, MagickTrue },
1417 { (char *) NULL, UndefinedMorphology, UndefinedOptionFlag, MagickFalse }
anthony602ab9b2010-01-05 08:06:50 +00001418 },
cristy3ed852e2009-09-05 21:47:34 +00001419 NoiseOptions[] =
1420 {
cristy042ee782011-04-22 18:48:30 +00001421 { "Undefined", UndefinedNoise, UndefinedOptionFlag, MagickTrue },
1422 { "Gaussian", GaussianNoise, UndefinedOptionFlag, MagickFalse },
1423 { "Impulse", ImpulseNoise, UndefinedOptionFlag, MagickFalse },
1424 { "Laplacian", LaplacianNoise, UndefinedOptionFlag, MagickFalse },
1425 { "Multiplicative", MultiplicativeGaussianNoise, UndefinedOptionFlag, MagickFalse },
1426 { "Poisson", PoissonNoise, UndefinedOptionFlag, MagickFalse },
1427 { "Random", RandomNoise, UndefinedOptionFlag, MagickFalse },
1428 { "Uniform", UniformNoise, UndefinedOptionFlag, MagickFalse },
1429 { (char *) NULL, UndefinedNoise, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001430 },
1431 OrientationOptions[] =
1432 {
cristy042ee782011-04-22 18:48:30 +00001433 { "Undefined", UndefinedOrientation, UndefinedOptionFlag, MagickTrue },
1434 { "TopLeft", TopLeftOrientation, UndefinedOptionFlag, MagickFalse },
1435 { "TopRight", TopRightOrientation, UndefinedOptionFlag, MagickFalse },
1436 { "BottomRight", BottomRightOrientation, UndefinedOptionFlag, MagickFalse },
1437 { "BottomLeft", BottomLeftOrientation, UndefinedOptionFlag, MagickFalse },
1438 { "LeftTop", LeftTopOrientation, UndefinedOptionFlag, MagickFalse },
1439 { "RightTop", RightTopOrientation, UndefinedOptionFlag, MagickFalse },
1440 { "RightBottom", RightBottomOrientation, UndefinedOptionFlag, MagickFalse },
1441 { "LeftBottom", LeftBottomOrientation, UndefinedOptionFlag, MagickFalse },
1442 { (char *) NULL, UndefinedOrientation, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001443 },
cristy6dcb9b82011-10-23 23:21:25 +00001444 PixelChannelOptions[] =
1445 {
1446 { "Undefined", UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001447 { "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001448 { "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001449 { "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +00001450 { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001451 { "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1452 { "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1453 { "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
1454 { "Composite", CompositePixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001455 { "C", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001456 { "Cr", CrPixelChannel, UndefinedOptionFlag, MagickFalse },
1457 { "Cyan", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1458 { "Gray", GrayPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001459 { "G", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001460 { "Green", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1461 { "Index", IndexPixelChannel, UndefinedOptionFlag, MagickFalse },
1462 { "Intensity", IntensityPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001463 { "K", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1464 { "M", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001465 { "Magenta", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001466 { "R", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy883fde12013-04-08 00:50:13 +00001467 { "ReadMask", ReadMaskPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001468 { "Red", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1469 { "Sync", SyncPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy883fde12013-04-08 00:50:13 +00001470 { "WriteMask", WriteMaskPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001471 { "Y", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001472 { "Yellow", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1473 { (char *) NULL, UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse }
1474 },
cristyac73d1f2013-03-12 00:51:09 +00001475 PixelIntensityOptions[] =
1476 {
1477 { "Undefined", UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickTrue },
cristy13609b42013-10-30 21:36:37 +00001478 { "Average", AveragePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1479 { "Brightness", BrightnessPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1480 { "Lightness", LightnessPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1481 { "MS", MSPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1482 { "Rec601Luma", Rec601LumaPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1483 { "Rec601Luminance", Rec601LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1484 { "Rec709Luma", Rec709LumaPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1485 { "Rec709Luminance", Rec709LuminancePixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
1486 { "RMS", RMSPixelIntensityMethod, UndefinedOptionFlag, MagickFalse },
cristyac73d1f2013-03-12 00:51:09 +00001487 { (char *) NULL, UndefinedPixelIntensityMethod, UndefinedOptionFlag, MagickFalse }
1488 },
cristy18fd4432013-03-22 01:26:09 +00001489 PixelMaskOptions[] =
1490 {
1491 { "Undefined", UndefinedPixelMask, UndefinedOptionFlag, MagickTrue },
1492 { "R", ReadPixelMask, UndefinedOptionFlag, MagickFalse },
1493 { "Read", ReadPixelMask, UndefinedOptionFlag, MagickFalse },
1494 { "W", WritePixelMask, UndefinedOptionFlag, MagickFalse },
1495 { "Write", WritePixelMask, UndefinedOptionFlag, MagickFalse },
1496 { (char *) NULL, UndefinedPixelMask, UndefinedOptionFlag, MagickFalse }
1497 },
cristy6dcb9b82011-10-23 23:21:25 +00001498 PixelTraitOptions[] =
1499 {
1500 { "Undefined", UndefinedPixelTrait, UndefinedOptionFlag, MagickTrue },
1501 { "Blend", BlendPixelTrait, UndefinedOptionFlag, MagickFalse },
1502 { "Copy", CopyPixelTrait, UndefinedOptionFlag, MagickFalse },
1503 { "Update", UpdatePixelTrait, UndefinedOptionFlag, MagickFalse },
1504 { (char *) NULL, UndefinedPixelTrait, UndefinedOptionFlag, MagickFalse }
1505 },
cristy3ed852e2009-09-05 21:47:34 +00001506 PolicyDomainOptions[] =
1507 {
cristy042ee782011-04-22 18:48:30 +00001508 { "Undefined", UndefinedPolicyDomain, UndefinedOptionFlag, MagickTrue },
1509 { "Coder", CoderPolicyDomain, UndefinedOptionFlag, MagickFalse },
1510 { "Delegate", DelegatePolicyDomain, UndefinedOptionFlag, MagickFalse },
1511 { "Filter", FilterPolicyDomain, UndefinedOptionFlag, MagickFalse },
1512 { "Path", PathPolicyDomain, UndefinedOptionFlag, MagickFalse },
1513 { "Resource", ResourcePolicyDomain, UndefinedOptionFlag, MagickFalse },
1514 { "System", SystemPolicyDomain, UndefinedOptionFlag, MagickFalse },
1515 { (char *) NULL, UndefinedPolicyDomain, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001516 },
1517 PolicyRightsOptions[] =
1518 {
cristy042ee782011-04-22 18:48:30 +00001519 { "Undefined", UndefinedPolicyRights, UndefinedOptionFlag, MagickTrue },
1520 { "None", NoPolicyRights, UndefinedOptionFlag, MagickFalse },
1521 { "Read", ReadPolicyRights, UndefinedOptionFlag, MagickFalse },
1522 { "Write", WritePolicyRights, UndefinedOptionFlag, MagickFalse },
1523 { "Execute", ExecutePolicyRights, UndefinedOptionFlag, MagickFalse },
1524 { (char *) NULL, UndefinedPolicyRights, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001525 },
1526 PreviewOptions[] =
1527 {
cristy042ee782011-04-22 18:48:30 +00001528 { "Undefined", UndefinedPreview, UndefinedOptionFlag, MagickTrue },
1529 { "AddNoise", AddNoisePreview, UndefinedOptionFlag, MagickFalse },
1530 { "Blur", BlurPreview, UndefinedOptionFlag, MagickFalse },
1531 { "Brightness", BrightnessPreview, UndefinedOptionFlag, MagickFalse },
1532 { "Charcoal", CharcoalDrawingPreview, UndefinedOptionFlag, MagickFalse },
1533 { "Despeckle", DespecklePreview, UndefinedOptionFlag, MagickFalse },
1534 { "Dull", DullPreview, UndefinedOptionFlag, MagickFalse },
1535 { "EdgeDetect", EdgeDetectPreview, UndefinedOptionFlag, MagickFalse },
1536 { "Gamma", GammaPreview, UndefinedOptionFlag, MagickFalse },
1537 { "Grayscale", GrayscalePreview, UndefinedOptionFlag, MagickFalse },
1538 { "Hue", HuePreview, UndefinedOptionFlag, MagickFalse },
1539 { "Implode", ImplodePreview, UndefinedOptionFlag, MagickFalse },
1540 { "JPEG", JPEGPreview, UndefinedOptionFlag, MagickFalse },
1541 { "OilPaint", OilPaintPreview, UndefinedOptionFlag, MagickFalse },
1542 { "Quantize", QuantizePreview, UndefinedOptionFlag, MagickFalse },
1543 { "Raise", RaisePreview, UndefinedOptionFlag, MagickFalse },
1544 { "ReduceNoise", ReduceNoisePreview, UndefinedOptionFlag, MagickFalse },
1545 { "Roll", RollPreview, UndefinedOptionFlag, MagickFalse },
1546 { "Rotate", RotatePreview, UndefinedOptionFlag, MagickFalse },
1547 { "Saturation", SaturationPreview, UndefinedOptionFlag, MagickFalse },
1548 { "Segment", SegmentPreview, UndefinedOptionFlag, MagickFalse },
1549 { "Shade", ShadePreview, UndefinedOptionFlag, MagickFalse },
1550 { "Sharpen", SharpenPreview, UndefinedOptionFlag, MagickFalse },
1551 { "Shear", ShearPreview, UndefinedOptionFlag, MagickFalse },
1552 { "Solarize", SolarizePreview, UndefinedOptionFlag, MagickFalse },
1553 { "Spiff", SpiffPreview, UndefinedOptionFlag, MagickFalse },
1554 { "Spread", SpreadPreview, UndefinedOptionFlag, MagickFalse },
1555 { "Swirl", SwirlPreview, UndefinedOptionFlag, MagickFalse },
1556 { "Threshold", ThresholdPreview, UndefinedOptionFlag, MagickFalse },
1557 { "Wave", WavePreview, UndefinedOptionFlag, MagickFalse },
1558 { (char *) NULL, UndefinedPreview, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001559 },
1560 PrimitiveOptions[] =
1561 {
cristy042ee782011-04-22 18:48:30 +00001562 { "Undefined", UndefinedPrimitive, UndefinedOptionFlag, MagickTrue },
1563 { "Arc", ArcPrimitive, UndefinedOptionFlag, MagickFalse },
1564 { "Bezier", BezierPrimitive, UndefinedOptionFlag, MagickFalse },
1565 { "Circle", CirclePrimitive, UndefinedOptionFlag, MagickFalse },
1566 { "Color", ColorPrimitive, UndefinedOptionFlag, MagickFalse },
1567 { "Ellipse", EllipsePrimitive, UndefinedOptionFlag, MagickFalse },
1568 { "Image", ImagePrimitive, UndefinedOptionFlag, MagickFalse },
1569 { "Line", LinePrimitive, UndefinedOptionFlag, MagickFalse },
1570 { "Matte", MattePrimitive, UndefinedOptionFlag, MagickFalse },
1571 { "Path", PathPrimitive, UndefinedOptionFlag, MagickFalse },
1572 { "Point", PointPrimitive, UndefinedOptionFlag, MagickFalse },
1573 { "Polygon", PolygonPrimitive, UndefinedOptionFlag, MagickFalse },
1574 { "Polyline", PolylinePrimitive, UndefinedOptionFlag, MagickFalse },
1575 { "Rectangle", RectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1576 { "RoundRectangle", RoundRectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1577 { "Text", TextPrimitive, UndefinedOptionFlag, MagickFalse },
1578 { (char *) NULL, UndefinedPrimitive, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001579 },
1580 QuantumFormatOptions[] =
1581 {
cristy042ee782011-04-22 18:48:30 +00001582 { "Undefined", UndefinedQuantumFormat, UndefinedOptionFlag, MagickTrue },
1583 { "FloatingPoint", FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse },
1584 { "Signed", SignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1585 { "Unsigned", UnsignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1586 { (char *) NULL, FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001587 },
1588 ResolutionOptions[] =
1589 {
cristy042ee782011-04-22 18:48:30 +00001590 { "Undefined", UndefinedResolution, UndefinedOptionFlag, MagickTrue },
1591 { "PixelsPerInch", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
1592 { "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
1593 { (char *) NULL, UndefinedResolution, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001594 },
1595 ResourceOptions[] =
1596 {
cristy042ee782011-04-22 18:48:30 +00001597 { "Undefined", UndefinedResource, UndefinedOptionFlag, MagickTrue },
1598 { "Area", AreaResource, UndefinedOptionFlag, MagickFalse },
1599 { "Disk", DiskResource, UndefinedOptionFlag, MagickFalse },
1600 { "File", FileResource, UndefinedOptionFlag, MagickFalse },
1601 { "Map", MapResource, UndefinedOptionFlag, MagickFalse },
1602 { "Memory", MemoryResource, UndefinedOptionFlag, MagickFalse },
1603 { "Thread", ThreadResource, UndefinedOptionFlag, MagickFalse },
1604 { "Time", TimeResource, UndefinedOptionFlag, MagickFalse },
1605 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001606 },
1607 SparseColorOptions[] =
1608 {
cristy042ee782011-04-22 18:48:30 +00001609 { "Undefined", UndefinedDistortion, UndefinedOptionFlag, MagickTrue },
1610 { "Barycentric", BarycentricColorInterpolate, UndefinedOptionFlag, MagickFalse },
1611 { "Bilinear", BilinearColorInterpolate, UndefinedOptionFlag, MagickFalse },
anthony09d867c2011-04-26 08:28:41 +00001612 { "Inverse", InverseColorInterpolate, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001613 { "Shepards", ShepardsColorInterpolate, UndefinedOptionFlag, MagickFalse },
1614 { "Voronoi", VoronoiColorInterpolate, UndefinedOptionFlag, MagickFalse },
1615 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001616 },
cristy0834d642011-03-18 18:26:08 +00001617 StatisticOptions[] =
1618 {
cristy042ee782011-04-22 18:48:30 +00001619 { "Undefined", UndefinedStatistic, UndefinedOptionFlag, MagickTrue },
1620 { "Gradient", GradientStatistic, UndefinedOptionFlag, MagickFalse },
1621 { "Maximum", MaximumStatistic, UndefinedOptionFlag, MagickFalse },
1622 { "Mean", MeanStatistic, UndefinedOptionFlag, MagickFalse },
1623 { "Median", MedianStatistic, UndefinedOptionFlag, MagickFalse },
1624 { "Minimum", MinimumStatistic, UndefinedOptionFlag, MagickFalse },
1625 { "Mode", ModeStatistic, UndefinedOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +00001626 { "NonPeak", NonpeakStatistic, UndefinedOptionFlag, MagickFalse },
cristy180908c2014-06-15 13:01:43 +00001627 { "RootMeanSquare", RootMeanSquareStatistic, UndefinedOptionFlag, MagickFalse },
1628 { "RMS", RootMeanSquareStatistic, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001629 { "StandardDeviation", StandardDeviationStatistic, UndefinedOptionFlag, MagickFalse },
1630 { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
cristy0834d642011-03-18 18:26:08 +00001631 },
cristy3ed852e2009-09-05 21:47:34 +00001632 StorageOptions[] =
1633 {
cristy042ee782011-04-22 18:48:30 +00001634 { "Undefined", UndefinedPixel, UndefinedOptionFlag, MagickTrue },
1635 { "Char", CharPixel, UndefinedOptionFlag, MagickFalse },
1636 { "Double", DoublePixel, UndefinedOptionFlag, MagickFalse },
1637 { "Float", FloatPixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001638 { "Long", LongPixel, UndefinedOptionFlag, MagickFalse },
cristy6c9e1682012-01-07 21:37:44 +00001639 { "LongLong", LongLongPixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001640 { "Quantum", QuantumPixel, UndefinedOptionFlag, MagickFalse },
1641 { "Short", ShortPixel, UndefinedOptionFlag, MagickFalse },
1642 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001643 },
1644 StretchOptions[] =
1645 {
cristy042ee782011-04-22 18:48:30 +00001646 { "Undefined", UndefinedStretch, UndefinedOptionFlag, MagickTrue },
1647 { "Any", AnyStretch, UndefinedOptionFlag, MagickFalse },
1648 { "Condensed", CondensedStretch, UndefinedOptionFlag, MagickFalse },
1649 { "Expanded", ExpandedStretch, UndefinedOptionFlag, MagickFalse },
1650 { "ExtraCondensed", ExtraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1651 { "ExtraExpanded", ExtraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1652 { "Normal", NormalStretch, UndefinedOptionFlag, MagickFalse },
1653 { "SemiCondensed", SemiCondensedStretch, UndefinedOptionFlag, MagickFalse },
1654 { "SemiExpanded", SemiExpandedStretch, UndefinedOptionFlag, MagickFalse },
1655 { "UltraCondensed", UltraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1656 { "UltraExpanded", UltraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1657 { (char *) NULL, UndefinedStretch, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001658 },
1659 StyleOptions[] =
1660 {
cristy042ee782011-04-22 18:48:30 +00001661 { "Undefined", UndefinedStyle, UndefinedOptionFlag, MagickTrue },
1662 { "Any", AnyStyle, UndefinedOptionFlag, MagickFalse },
1663 { "Italic", ItalicStyle, UndefinedOptionFlag, MagickFalse },
1664 { "Normal", NormalStyle, UndefinedOptionFlag, MagickFalse },
1665 { "Oblique", ObliqueStyle, UndefinedOptionFlag, MagickFalse },
1666 { (char *) NULL, UndefinedStyle, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001667 },
1668 TypeOptions[] =
1669 {
cristy042ee782011-04-22 18:48:30 +00001670 { "Undefined", UndefinedType, UndefinedOptionFlag, MagickTrue },
1671 { "Bilevel", BilevelType, UndefinedOptionFlag, MagickFalse },
1672 { "ColorSeparation", ColorSeparationType, UndefinedOptionFlag, MagickFalse },
anthonyc69008c2012-05-07 11:45:32 +00001673 { "ColorSeparationAlpha", ColorSeparationMatteType, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001674 { "ColorSeparationMatte", ColorSeparationMatteType, UndefinedOptionFlag, MagickFalse },
1675 { "Grayscale", GrayscaleType, UndefinedOptionFlag, MagickFalse },
anthonyc69008c2012-05-07 11:45:32 +00001676 { "GrayscaleAlpha", GrayscaleMatteType, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001677 { "GrayscaleMatte", GrayscaleMatteType, UndefinedOptionFlag, MagickFalse },
1678 { "Optimize", OptimizeType, UndefinedOptionFlag, MagickFalse },
1679 { "Palette", PaletteType, UndefinedOptionFlag, MagickFalse },
anthonyc69008c2012-05-07 11:45:32 +00001680 { "PaletteBilevelAlpha", PaletteBilevelMatteType, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001681 { "PaletteBilevelMatte", PaletteBilevelMatteType, UndefinedOptionFlag, MagickFalse },
anthonyc69008c2012-05-07 11:45:32 +00001682 { "PaletteAlpha", PaletteMatteType, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001683 { "PaletteMatte", PaletteMatteType, UndefinedOptionFlag, MagickFalse },
anthonyc69008c2012-05-07 11:45:32 +00001684 { "TrueColorAlpha", TrueColorMatteType, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001685 { "TrueColorMatte", TrueColorMatteType, UndefinedOptionFlag, MagickFalse },
1686 { "TrueColor", TrueColorType, UndefinedOptionFlag, MagickFalse },
1687 { (char *) NULL, UndefinedType, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001688 },
1689 ValidateOptions[] =
1690 {
cristy042ee782011-04-22 18:48:30 +00001691 { "Undefined", UndefinedValidate, UndefinedOptionFlag, MagickTrue },
1692 { "All", AllValidate, UndefinedOptionFlag, MagickFalse },
cristy80e870e2013-05-07 12:23:02 +00001693 { "Colorspace", ColorspaceValidate, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001694 { "Compare", CompareValidate, UndefinedOptionFlag, MagickFalse },
1695 { "Composite", CompositeValidate, UndefinedOptionFlag, MagickFalse },
1696 { "Convert", ConvertValidate, UndefinedOptionFlag, MagickFalse },
cristy247eebde2013-06-13 01:01:43 +00001697 { "FormatsDisk", FormatsDiskValidate, UndefinedOptionFlag, MagickFalse },
1698 { "FormatsMap", FormatsMapValidate, UndefinedOptionFlag, MagickFalse },
1699 { "FormatsMemory", FormatsMemoryValidate, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001700 { "Identify", IdentifyValidate, UndefinedOptionFlag, MagickFalse },
1701 { "ImportExport", ImportExportValidate, UndefinedOptionFlag, MagickFalse },
1702 { "Montage", MontageValidate, UndefinedOptionFlag, MagickFalse },
1703 { "Stream", StreamValidate, UndefinedOptionFlag, MagickFalse },
1704 { "None", NoValidate, UndefinedOptionFlag, MagickFalse },
1705 { (char *) NULL, UndefinedValidate, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001706 },
1707 VirtualPixelOptions[] =
1708 {
cristy042ee782011-04-22 18:48:30 +00001709 { "Undefined", UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickTrue },
1710 { "Background", BackgroundVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1711 { "Black", BlackVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +00001712 { "Constant", BackgroundVirtualPixelMethod, DeprecateOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001713 { "CheckerTile", CheckerTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1714 { "Dither", DitherVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1715 { "Edge", EdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1716 { "Gray", GrayVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1717 { "HorizontalTile", HorizontalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1718 { "HorizontalTileEdge", HorizontalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1719 { "Mirror", MirrorVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
anthony7a4d6102012-07-01 09:48:25 +00001720 { "None", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001721 { "Random", RandomVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1722 { "Tile", TileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1723 { "Transparent", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1724 { "VerticalTile", VerticalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1725 { "VerticalTileEdge", VerticalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1726 { "White", WhiteVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1727 { (char *) NULL, UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001728 };
1729
anthony686b1a32012-02-15 14:50:53 +00001730static const OptionInfo *GetOptionInfo(const CommandOption option)
1731{
1732 switch (option)
1733 {
1734 case MagickAlignOptions: return(AlignOptions);
cristy288a3532012-08-28 00:19:44 +00001735 case MagickAlphaChannelOptions: return(AlphaChannelOptions);
anthony686b1a32012-02-15 14:50:53 +00001736 case MagickBooleanOptions: return(BooleanOptions);
cristy947cef22013-01-17 14:16:40 +00001737 case MagickCacheOptions: return(CacheOptions);
anthony686b1a32012-02-15 14:50:53 +00001738 case MagickChannelOptions: return(ChannelOptions);
1739 case MagickClassOptions: return(ClassOptions);
1740 case MagickClipPathOptions: return(ClipPathOptions);
1741 case MagickColorspaceOptions: return(ColorspaceOptions);
1742 case MagickCommandOptions: return(CommandOptions);
cristy790190d2013-10-04 00:51:51 +00001743 case MagickComplexOptions: return(ComplexOptions);
anthony686b1a32012-02-15 14:50:53 +00001744 case MagickComposeOptions: return(ComposeOptions);
1745 case MagickCompressOptions: return(CompressOptions);
1746 case MagickDataTypeOptions: return(DataTypeOptions);
1747 case MagickDebugOptions: return(LogEventOptions);
1748 case MagickDecorateOptions: return(DecorateOptions);
1749 case MagickDirectionOptions: return(DirectionOptions);
1750 case MagickDisposeOptions: return(DisposeOptions);
1751 case MagickDistortOptions: return(DistortOptions);
1752 case MagickDitherOptions: return(DitherOptions);
1753 case MagickEndianOptions: return(EndianOptions);
1754 case MagickEvaluateOptions: return(EvaluateOptions);
1755 case MagickFillRuleOptions: return(FillRuleOptions);
1756 case MagickFilterOptions: return(FilterOptions);
1757 case MagickFunctionOptions: return(FunctionOptions);
1758 case MagickGravityOptions: return(GravityOptions);
1759/* case MagickImageListOptions: return(ImageListOptions); */
1760 case MagickIntentOptions: return(IntentOptions);
1761 case MagickInterlaceOptions: return(InterlaceOptions);
1762 case MagickInterpolateOptions: return(InterpolateOptions);
1763 case MagickKernelOptions: return(KernelOptions);
1764 case MagickLayerOptions: return(LayerOptions);
1765 case MagickLineCapOptions: return(LineCapOptions);
1766 case MagickLineJoinOptions: return(LineJoinOptions);
1767 case MagickListOptions: return(ListOptions);
1768 case MagickLogEventOptions: return(LogEventOptions);
1769 case MagickMetricOptions: return(MetricOptions);
1770 case MagickMethodOptions: return(MethodOptions);
1771 case MagickModeOptions: return(ModeOptions);
1772 case MagickMorphologyOptions: return(MorphologyOptions);
1773 case MagickNoiseOptions: return(NoiseOptions);
1774 case MagickOrientationOptions: return(OrientationOptions);
1775 case MagickPixelChannelOptions: return(PixelChannelOptions);
cristyac73d1f2013-03-12 00:51:09 +00001776 case MagickPixelIntensityOptions: return(PixelIntensityOptions);
cristy18fd4432013-03-22 01:26:09 +00001777 case MagickPixelMaskOptions: return(PixelMaskOptions);
anthony686b1a32012-02-15 14:50:53 +00001778 case MagickPixelTraitOptions: return(PixelTraitOptions);
1779 case MagickPolicyDomainOptions: return(PolicyDomainOptions);
1780 case MagickPolicyRightsOptions: return(PolicyRightsOptions);
1781 case MagickPreviewOptions: return(PreviewOptions);
1782 case MagickPrimitiveOptions: return(PrimitiveOptions);
1783 case MagickQuantumFormatOptions: return(QuantumFormatOptions);
1784 case MagickResolutionOptions: return(ResolutionOptions);
1785 case MagickResourceOptions: return(ResourceOptions);
1786 case MagickSparseColorOptions: return(SparseColorOptions);
1787 case MagickStatisticOptions: return(StatisticOptions);
1788 case MagickStorageOptions: return(StorageOptions);
1789 case MagickStretchOptions: return(StretchOptions);
1790 case MagickStyleOptions: return(StyleOptions);
1791 case MagickTypeOptions: return(TypeOptions);
1792 case MagickValidateOptions: return(ValidateOptions);
1793 case MagickVirtualPixelOptions: return(VirtualPixelOptions);
1794 default: break;
1795 }
1796 return((const OptionInfo *) NULL);
1797}
1798
cristy3ed852e2009-09-05 21:47:34 +00001799/*
1800%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1801% %
1802% %
1803% %
1804% C l o n e I m a g e O p t i o n s %
1805% %
1806% %
1807% %
1808%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1809%
anthony40ca0b92012-08-02 13:23:28 +00001810% CloneImageOptions() clones all global image options, to another image_info
cristy3ed852e2009-09-05 21:47:34 +00001811%
1812% The format of the CloneImageOptions method is:
1813%
1814% MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1815% const ImageInfo *clone_info)
1816%
1817% A description of each parameter follows:
1818%
anthony40ca0b92012-08-02 13:23:28 +00001819% o image_info: the image info to recieve the cloned options.
cristy3ed852e2009-09-05 21:47:34 +00001820%
anthony40ca0b92012-08-02 13:23:28 +00001821% o clone_info: the source image info for options to clone.
cristy3ed852e2009-09-05 21:47:34 +00001822%
1823*/
1824MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1825 const ImageInfo *clone_info)
1826{
1827 assert(image_info != (ImageInfo *) NULL);
1828 assert(image_info->signature == MagickSignature);
1829 if (image_info->debug != MagickFalse)
1830 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1831 image_info->filename);
1832 assert(clone_info != (const ImageInfo *) NULL);
1833 assert(clone_info->signature == MagickSignature);
1834 if (clone_info->options != (void *) NULL)
cristy07742872013-07-19 13:43:08 +00001835 {
1836 if (image_info->options != (void *) NULL)
1837 DestroyImageOptions(image_info);
1838 image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
1839 (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
1840 }
cristy3ed852e2009-09-05 21:47:34 +00001841 return(MagickTrue);
1842}
1843
1844/*
1845%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1846% %
1847% %
1848% %
1849% D e f i n e I m a g e O p t i o n %
1850% %
1851% %
1852% %
1853%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1854%
anthony8ea79832011-10-05 10:08:39 +00001855% DefineImageOption() associates an assignment string of the form
anthony40ca0b92012-08-02 13:23:28 +00001856% "key=value" with a global image option. It is equivelent to
1857% SetImageOption().
cristy3ed852e2009-09-05 21:47:34 +00001858%
1859% The format of the DefineImageOption method is:
1860%
1861% MagickBooleanType DefineImageOption(ImageInfo *image_info,
1862% const char *option)
1863%
1864% A description of each parameter follows:
1865%
1866% o image_info: the image info.
1867%
anthony8ea79832011-10-05 10:08:39 +00001868% o option: the image option assignment string.
cristy3ed852e2009-09-05 21:47:34 +00001869%
1870*/
1871MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
1872 const char *option)
1873{
1874 char
1875 key[MaxTextExtent],
1876 value[MaxTextExtent];
1877
1878 register char
1879 *p;
1880
1881 assert(image_info != (ImageInfo *) NULL);
1882 assert(option != (const char *) NULL);
1883 (void) CopyMagickString(key,option,MaxTextExtent);
1884 for (p=key; *p != '\0'; p++)
1885 if (*p == '=')
1886 break;
1887 *value='\0';
1888 if (*p == '=')
1889 (void) CopyMagickString(value,p+1,MaxTextExtent);
1890 *p='\0';
1891 return(SetImageOption(image_info,key,value));
1892}
1893
1894/*
1895%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1896% %
1897% %
1898% %
1899% D e l e t e I m a g e O p t i o n %
1900% %
1901% %
1902% %
1903%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1904%
anthony40ca0b92012-08-02 13:23:28 +00001905% DeleteImageOption() deletes an key from the global image options.
cristy3ed852e2009-09-05 21:47:34 +00001906%
anthonyebb73a22012-03-22 14:25:52 +00001907% Returns MagickTrue is the option is found and deleted from the Options.
1908%
cristy3ed852e2009-09-05 21:47:34 +00001909% The format of the DeleteImageOption method is:
1910%
1911% MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1912% const char *key)
1913%
1914% A description of each parameter follows:
1915%
1916% o image_info: the image info.
1917%
1918% o option: the image option.
1919%
1920*/
1921MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1922 const char *option)
1923{
1924 assert(image_info != (ImageInfo *) NULL);
1925 assert(image_info->signature == MagickSignature);
1926 if (image_info->debug != MagickFalse)
1927 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1928 image_info->filename);
1929 if (image_info->options == (void *) NULL)
1930 return(MagickFalse);
1931 return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
1932}
1933
1934/*
1935%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1936% %
1937% %
1938% %
1939% D e s t r o y I m a g e O p t i o n s %
1940% %
1941% %
1942% %
1943%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1944%
anthony40ca0b92012-08-02 13:23:28 +00001945% DestroyImageOptions() destroys all global options and associated memory
1946% attached to the given image_info image list.
cristy3ed852e2009-09-05 21:47:34 +00001947%
1948% The format of the DestroyDefines method is:
1949%
1950% void DestroyImageOptions(ImageInfo *image_info)
1951%
1952% A description of each parameter follows:
1953%
1954% o image_info: the image info.
1955%
1956*/
1957MagickExport void DestroyImageOptions(ImageInfo *image_info)
1958{
1959 assert(image_info != (ImageInfo *) NULL);
1960 assert(image_info->signature == MagickSignature);
1961 if (image_info->debug != MagickFalse)
1962 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1963 image_info->filename);
1964 if (image_info->options != (void *) NULL)
1965 image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
1966}
1967
1968/*
1969%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1970% %
1971% %
1972% %
1973% G e t I m a g e O p t i o n %
1974% %
1975% %
1976% %
1977%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1978%
anthony40ca0b92012-08-02 13:23:28 +00001979% GetImageOption() gets a value associated with the global image options.
1980%
1981% The returned string is a constant string in the tree and should NOT be
1982% freed by the caller.
cristy3ed852e2009-09-05 21:47:34 +00001983%
1984% The format of the GetImageOption method is:
1985%
1986% const char *GetImageOption(const ImageInfo *image_info,
cristye3f77792011-10-07 00:09:09 +00001987% const char *option)
cristy3ed852e2009-09-05 21:47:34 +00001988%
1989% A description of each parameter follows:
1990%
1991% o image_info: the image info.
1992%
cristye3f77792011-10-07 00:09:09 +00001993% o option: the option.
cristy3ed852e2009-09-05 21:47:34 +00001994%
1995*/
1996MagickExport const char *GetImageOption(const ImageInfo *image_info,
anthony7df2b832011-10-06 11:55:25 +00001997 const char *option)
cristy3ed852e2009-09-05 21:47:34 +00001998{
cristy3ed852e2009-09-05 21:47:34 +00001999 assert(image_info != (ImageInfo *) NULL);
2000 assert(image_info->signature == MagickSignature);
2001 if (image_info->debug != MagickFalse)
2002 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2003 image_info->filename);
2004 if (image_info->options == (void *) NULL)
2005 return((const char *) NULL);
cristye3f77792011-10-07 00:09:09 +00002006 return((const char *) GetValueFromSplayTree((SplayTreeInfo *)
2007 image_info->options,option));
cristy3ed852e2009-09-05 21:47:34 +00002008}
2009
2010/*
2011%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2012% %
2013% %
2014% %
cristy042ee782011-04-22 18:48:30 +00002015% G e t C o m m a n d O p t i o n F l a g s %
cristy3ed852e2009-09-05 21:47:34 +00002016% %
2017% %
2018% %
2019%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2020%
cristy042ee782011-04-22 18:48:30 +00002021% GetCommandOptionFlags() parses a string and returns an enumerated option
2022% flags(s). Return a value of -1 if no such option is found.
cristy3ed852e2009-09-05 21:47:34 +00002023%
cristy042ee782011-04-22 18:48:30 +00002024% The format of the GetCommandOptionFlags method is:
cristy3ed852e2009-09-05 21:47:34 +00002025%
cristy042ee782011-04-22 18:48:30 +00002026% ssize_t GetCommandOptionFlags(const CommandOption option,
2027% const MagickBooleanType list,const char *options)
cristy3ed852e2009-09-05 21:47:34 +00002028%
2029% A description of each parameter follows:
2030%
cristy042ee782011-04-22 18:48:30 +00002031% o option: Index to the option table to lookup
2032%
2033% o list: A option other than zero permits more than one option separated by
2034% a comma or pipe.
2035%
2036% o options: One or more options separated by commas.
cristy3ed852e2009-09-05 21:47:34 +00002037%
2038*/
2039
cristy042ee782011-04-22 18:48:30 +00002040MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
2041 const MagickBooleanType list,const char *options)
2042{
2043 char
2044 token[MaxTextExtent];
2045
2046 const OptionInfo
2047 *option_info;
2048
2049 int
2050 sentinel;
2051
2052 MagickBooleanType
2053 negate;
2054
2055 register char
2056 *q;
2057
2058 register const char
2059 *p;
2060
2061 register ssize_t
2062 i;
2063
2064 ssize_t
2065 option_types;
2066
2067 option_info=GetOptionInfo(option);
2068 if (option_info == (const OptionInfo *) NULL)
anthonye8f56492012-02-12 12:39:02 +00002069 return(UndefinedOptionFlag);
cristy042ee782011-04-22 18:48:30 +00002070 option_types=0;
2071 sentinel=',';
2072 if (strchr(options,'|') != (char *) NULL)
2073 sentinel='|';
2074 for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2075 {
2076 while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2077 (*p != '\0'))
2078 p++;
2079 negate=(*p == '!') ? MagickTrue : MagickFalse;
2080 if (negate != MagickFalse)
2081 p++;
2082 q=token;
2083 while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2084 (*p != '\0'))
2085 {
cristya0019202011-06-07 13:23:55 +00002086 if ((q-token) >= (MaxTextExtent-1))
cristy042ee782011-04-22 18:48:30 +00002087 break;
2088 *q++=(*p++);
2089 }
2090 *q='\0';
2091 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2092 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2093 {
2094 if (*token == '!')
2095 option_types=option_types &~ option_info[i].flags;
2096 else
2097 option_types=option_types | option_info[i].flags;
2098 break;
2099 }
2100 if ((option_info[i].mnemonic == (char *) NULL) &&
2101 ((strchr(token+1,'-') != (char *) NULL) ||
2102 (strchr(token+1,'_') != (char *) NULL)))
2103 {
2104 while ((q=strchr(token+1,'-')) != (char *) NULL)
2105 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2106 while ((q=strchr(token+1,'_')) != (char *) NULL)
2107 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2108 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2109 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2110 {
2111 if (*token == '!')
2112 option_types=option_types &~ option_info[i].flags;
2113 else
2114 option_types=option_types | option_info[i].flags;
2115 break;
2116 }
2117 }
2118 if (option_info[i].mnemonic == (char *) NULL)
2119 return(-1);
2120 if (list == MagickFalse)
2121 break;
2122 }
2123 return(option_types);
2124}
2125
2126/*
2127%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2128% %
2129% %
2130% %
anthony686b1a32012-02-15 14:50:53 +00002131% G e t C o m m a n d O p t i o n I n f o %
2132% %
2133% %
2134% %
2135%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2136%
2137% GetCommandOptionInfo() returns pointer to the matching OptionInfo entry
2138% for the "CommandOptions" table only. A specialised binary search is used,
2139% to speed up the lookup for that very large table, and returns both the
2140% type (arg count) and flags (arg type).
2141%
anthony643c6132012-11-07 14:50:28 +00002142% This search reduces linear search of over 500 options (250 tests on
anthony686b1a32012-02-15 14:50:53 +00002143% average) to about 10 lookups!
2144%
2145% The format of the GetCommandOptionInfo method is:
2146%
2147% const char **GetCommandOptions(const CommandOption value)
2148%
2149% A description of each parameter follows:
2150%
2151% o value: the value.
2152%
2153*/
2154MagickExport const OptionInfo *GetCommandOptionInfo(const char *value)
2155{
2156 const OptionInfo
2157 *option_info=CommandOptions;
2158
2159 static ssize_t
2160 table_size = 0;
2161
anthony24aa8822012-03-11 00:56:06 +00002162 register int
anthony686b1a32012-02-15 14:50:53 +00002163 i,l,h;
2164
2165 assert(value != (char *) NULL);
2166 assert(*value != '\0');
2167
2168 /* count up table items - first time only */
cristyf4bfcc52014-05-26 20:55:58 +00002169 /* if ( table_size == 0 ) */ /* binary search not working now */
anthony686b1a32012-02-15 14:50:53 +00002170 {
2171 l=-1;
2172 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2173 if ( LocaleCompare(value,option_info[i].mnemonic) == 0 )
2174 l=i;
2175 table_size = i;
anthony24aa8822012-03-11 00:56:06 +00002176 return( &option_info[(l>=0)?l:i] );
anthony686b1a32012-02-15 14:50:53 +00002177 }
2178
2179 /* faster binary search of command table, now that its length is known */
2180 l=0;
anthony668f43a2012-02-20 14:55:32 +00002181 h=table_size;
anthony686b1a32012-02-15 14:50:53 +00002182 while ( l < h )
2183 {
2184 int cmp;
2185 i = (l+h)/2; /* half the bounds */
2186 /* compare string part, then switch character! */
2187 cmp=LocaleCompare(value+1,option_info[i].mnemonic+1);
2188 if ( cmp == 0 )
2189 cmp = *value - *(option_info[i].mnemonic);
anthony668f43a2012-02-20 14:55:32 +00002190#if 0
2191 (void) FormatLocaleFile(stderr,
2192 "%d --- %u < %u < %u --- \"%s\" < \"%s\" < \"%s\"\n",
cristy73380532012-02-18 20:26:28 +00002193 cmp,l,i,h,option_info[l].mnemonic,option_info[i].mnemonic,
2194 option_info[h].mnemonic);
anthony668f43a2012-02-20 14:55:32 +00002195#endif
anthony686b1a32012-02-15 14:50:53 +00002196 if (cmp == 0)
2197 return(&option_info[i]);
2198 if (cmp > 0) l=i+1; else h=i; /* reassign search bounds */
2199 }
2200 /* option was not found in table - return last 'null' entry. */
2201 return(&option_info[table_size]);
2202}
2203
2204/*
2205%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2206% %
2207% %
2208% %
cristy042ee782011-04-22 18:48:30 +00002209% G e t C o m m a n d O p t i o n s %
2210% %
2211% %
2212% %
2213%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2214%
2215% GetCommandOptions() returns a list of values.
2216%
2217% The format of the GetCommandOptions method is:
2218%
2219% const char **GetCommandOptions(const CommandOption value)
2220%
2221% A description of each parameter follows:
2222%
2223% o value: the value.
2224%
2225*/
2226MagickExport char **GetCommandOptions(const CommandOption value)
cristy3ed852e2009-09-05 21:47:34 +00002227{
2228 char
2229 **values;
2230
2231 const OptionInfo
2232 *option_info;
2233
cristybb503372010-05-27 20:51:26 +00002234 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002235 i;
2236
2237 option_info=GetOptionInfo(value);
2238 if (option_info == (const OptionInfo *) NULL)
2239 return((char **) NULL);
2240 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
2241 values=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*values));
2242 if (values == (char **) NULL)
2243 ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
2244 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2245 values[i]=AcquireString(option_info[i].mnemonic);
2246 values[i]=(char *) NULL;
2247 return(values);
2248}
2249
2250/*
2251%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2252% %
2253% %
2254% %
2255% G e t N e x t I m a g e O p t i o n %
2256% %
2257% %
2258% %
2259%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2260%
anthony40ca0b92012-08-02 13:23:28 +00002261% GetNextImageOption() gets the next global option value.
cristy3ed852e2009-09-05 21:47:34 +00002262%
2263% The format of the GetNextImageOption method is:
2264%
2265% char *GetNextImageOption(const ImageInfo *image_info)
2266%
2267% A description of each parameter follows:
2268%
2269% o image_info: the image info.
2270%
2271*/
2272MagickExport char *GetNextImageOption(const ImageInfo *image_info)
2273{
2274 assert(image_info != (ImageInfo *) NULL);
2275 assert(image_info->signature == MagickSignature);
2276 if (image_info->debug != MagickFalse)
2277 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2278 image_info->filename);
2279 if (image_info->options == (void *) NULL)
2280 return((char *) NULL);
2281 return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
2282}
2283
2284/*
2285%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2286% %
2287% %
2288% %
cristy042ee782011-04-22 18:48:30 +00002289% I s C o m m a n d O p t i o n %
cristy3ed852e2009-09-05 21:47:34 +00002290% %
2291% %
2292% %
2293%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2294%
cristy042ee782011-04-22 18:48:30 +00002295% IsCommandOption() returns MagickTrue if the option begins with a - or + and
cristy3ed852e2009-09-05 21:47:34 +00002296% the first character that follows is alphanumeric.
2297%
cristy042ee782011-04-22 18:48:30 +00002298% The format of the IsCommandOption method is:
cristy3ed852e2009-09-05 21:47:34 +00002299%
cristy042ee782011-04-22 18:48:30 +00002300% MagickBooleanType IsCommandOption(const char *option)
cristy3ed852e2009-09-05 21:47:34 +00002301%
2302% A description of each parameter follows:
2303%
2304% o option: the option.
2305%
2306*/
cristy042ee782011-04-22 18:48:30 +00002307MagickExport MagickBooleanType IsCommandOption(const char *option)
cristy3ed852e2009-09-05 21:47:34 +00002308{
2309 assert(option != (const char *) NULL);
2310 if ((*option != '-') && (*option != '+'))
2311 return(MagickFalse);
2312 if (strlen(option) == 1)
anthonye5b39652012-04-21 05:37:29 +00002313 return(IsMagickTrue( (*option == '{') || (*option == '}')
2314 || (*option == '[') || (*option == ']') ));
cristy3ed852e2009-09-05 21:47:34 +00002315 option++;
anthonye5b39652012-04-21 05:37:29 +00002316 if (*option == '-')
2317 return(MagickTrue);
cristy3ed852e2009-09-05 21:47:34 +00002318 if (isalpha((int) ((unsigned char) *option)) == 0)
2319 return(MagickFalse);
2320 return(MagickTrue);
2321}
2322
2323/*
2324%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2325% %
2326% %
2327% %
cristy042ee782011-04-22 18:48:30 +00002328% C o m m a n d O p t i o n T o M n e m o n i c %
cristy3ed852e2009-09-05 21:47:34 +00002329% %
2330% %
2331% %
2332%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2333%
cristy042ee782011-04-22 18:48:30 +00002334% CommandOptionToMnemonic() returns an enumerated value as a mnemonic.
cristy3ed852e2009-09-05 21:47:34 +00002335%
cristy042ee782011-04-22 18:48:30 +00002336% The format of the CommandOptionToMnemonic method is:
cristy3ed852e2009-09-05 21:47:34 +00002337%
cristy042ee782011-04-22 18:48:30 +00002338% const char *CommandOptionToMnemonic(const CommandOption option,
cristybb503372010-05-27 20:51:26 +00002339% const ssize_t type)
cristy3ed852e2009-09-05 21:47:34 +00002340%
2341% A description of each parameter follows:
2342%
2343% o option: the option.
2344%
2345% o type: one or more values separated by commas.
2346%
2347*/
cristy042ee782011-04-22 18:48:30 +00002348MagickExport const char *CommandOptionToMnemonic(const CommandOption option,
cristybb503372010-05-27 20:51:26 +00002349 const ssize_t type)
cristy3ed852e2009-09-05 21:47:34 +00002350{
2351 const OptionInfo
2352 *option_info;
2353
cristybb503372010-05-27 20:51:26 +00002354 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002355 i;
2356
2357 option_info=GetOptionInfo(option);
2358 if (option_info == (const OptionInfo *) NULL)
2359 return((const char *) NULL);
2360 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2361 if (type == option_info[i].type)
2362 break;
2363 if (option_info[i].mnemonic == (const char *) NULL)
2364 return("undefined");
2365 return(option_info[i].mnemonic);
2366}
2367
2368/*
2369%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2370% %
2371% %
2372% %
cristy71ffec42014-06-25 12:52:49 +00002373% I s O p t i o n M e m b e r %
2374% %
2375% %
2376% %
2377%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2378%
2379% IsOptionMember() returns MagickTrue if the option is a member of the options
2380% list (e.g. ICC is a member of xmp,icc,iptc).
2381%
2382% The format of the IsOptionMember function is:
2383%
2384% MagickBooleanType IsOptionMember(const char *option,
2385% const char *options)
2386%
2387% A description of each parameter follows:
2388%
2389% o option: an option or option expression (e.g. ICC or *).
2390%
2391% o options: one or more options separated by commas.
2392%
2393%
2394*/
2395MagickPrivate MagickBooleanType IsOptionMember(const char *option,
2396 const char *options)
2397{
2398 char
2399 **option_list,
2400 *string;
2401
2402 int
2403 number_options;
2404
2405 register ssize_t
2406 i;
2407
2408 /*
2409 Is option a member of the options list?
2410 */
2411 string=ConstantString(options);
2412 (void) SubstituteString(&string,","," ");
2413 option_list=StringToArgv(string,&number_options);
2414 string=DestroyString(string);
2415 if (option_list == (char **) NULL)
2416 return(MagickFalse);
2417 for (i=1; i < (ssize_t) number_options; i++)
2418 {
2419 if ((*option_list[i] == '!') &&
2420 (LocaleCompare(option,option_list[i]+1) == 0))
2421 return(MagickFalse);
2422 if (GlobExpression(option,option_list[i],MagickTrue) != MagickFalse)
2423 return(MagickTrue);
2424 }
2425 return(MagickFalse);
2426}
2427
2428/*
2429%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2430% %
2431% %
2432% %
cristy042ee782011-04-22 18:48:30 +00002433% L i s t C o m m a n d O p t i o n s %
cristy3ed852e2009-09-05 21:47:34 +00002434% %
2435% %
2436% %
2437%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2438%
cristy042ee782011-04-22 18:48:30 +00002439% ListCommandOptions() lists the contents of enumerated option type(s).
cristy3ed852e2009-09-05 21:47:34 +00002440%
cristy042ee782011-04-22 18:48:30 +00002441% The format of the ListCommandOptions method is:
cristy3ed852e2009-09-05 21:47:34 +00002442%
cristy2b9582a2011-07-04 17:38:56 +00002443% MagickBooleanType ListCommandOptions(FILE *file,
2444% const CommandOption option,ExceptionInfo *exception)
cristy3ed852e2009-09-05 21:47:34 +00002445%
2446% A description of each parameter follows:
2447%
2448% o file: list options to this file handle.
2449%
2450% o option: list these options.
2451%
2452% o exception: return any errors or warnings in this structure.
2453%
2454*/
cristy042ee782011-04-22 18:48:30 +00002455MagickExport MagickBooleanType ListCommandOptions(FILE *file,
2456 const CommandOption option,ExceptionInfo *magick_unused(exception))
cristy3ed852e2009-09-05 21:47:34 +00002457{
2458 const OptionInfo
2459 *option_info;
2460
cristybb503372010-05-27 20:51:26 +00002461 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002462 i;
2463
2464 if (file == (FILE *) NULL)
2465 file=stdout;
2466 option_info=GetOptionInfo(option);
2467 if (option_info == (const OptionInfo *) NULL)
2468 return(MagickFalse);
2469 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2470 {
2471 if (option_info[i].stealth != MagickFalse)
2472 continue;
cristyb51dff52011-05-19 16:55:47 +00002473 (void) FormatLocaleFile(file,"%s\n",option_info[i].mnemonic);
cristy3ed852e2009-09-05 21:47:34 +00002474 }
2475 return(MagickTrue);
2476}
2477
2478/*
2479%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2480% %
2481% %
2482% %
2483% P a r s e C h a n n e l O p t i o n %
2484% %
2485% %
2486% %
2487%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2488%
2489% ParseChannelOption() parses a string and returns an enumerated channel
2490% type(s).
2491%
2492% The format of the ParseChannelOption method is:
2493%
cristybb503372010-05-27 20:51:26 +00002494% ssize_t ParseChannelOption(const char *channels)
cristy3ed852e2009-09-05 21:47:34 +00002495%
2496% A description of each parameter follows:
2497%
2498% o options: One or more values separated by commas.
2499%
2500*/
cristybb503372010-05-27 20:51:26 +00002501MagickExport ssize_t ParseChannelOption(const char *channels)
cristy3ed852e2009-09-05 21:47:34 +00002502{
cristybb503372010-05-27 20:51:26 +00002503 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002504 i;
2505
cristyb9902b72010-10-05 18:21:50 +00002506 ssize_t
2507 channel;
2508
cristy042ee782011-04-22 18:48:30 +00002509 channel=ParseCommandOption(MagickChannelOptions,MagickTrue,channels);
cristy3ed852e2009-09-05 21:47:34 +00002510 if (channel >= 0)
2511 return(channel);
2512 channel=0;
cristybb503372010-05-27 20:51:26 +00002513 for (i=0; i < (ssize_t) strlen(channels); i++)
cristy3ed852e2009-09-05 21:47:34 +00002514 {
2515 switch (channels[i])
2516 {
2517 case 'A':
2518 case 'a':
2519 {
cristy953c4bd2012-02-24 01:04:04 +00002520 channel|=AlphaChannel;
cristy3ed852e2009-09-05 21:47:34 +00002521 break;
2522 }
2523 case 'B':
2524 case 'b':
2525 {
2526 channel|=BlueChannel;
2527 break;
2528 }
2529 case 'C':
2530 case 'c':
2531 {
2532 channel|=CyanChannel;
2533 break;
2534 }
2535 case 'g':
2536 case 'G':
2537 {
2538 channel|=GreenChannel;
2539 break;
2540 }
cristy3ed852e2009-09-05 21:47:34 +00002541 case 'K':
2542 case 'k':
2543 {
2544 channel|=BlackChannel;
2545 break;
2546 }
2547 case 'M':
2548 case 'm':
2549 {
2550 channel|=MagentaChannel;
2551 break;
2552 }
2553 case 'o':
2554 case 'O':
2555 {
anthony30b912a2012-03-22 01:20:28 +00002556 channel|=AlphaChannel; /* depreciate */
cristy3ed852e2009-09-05 21:47:34 +00002557 break;
2558 }
2559 case 'R':
2560 case 'r':
2561 {
2562 channel|=RedChannel;
2563 break;
2564 }
2565 case 'Y':
2566 case 'y':
2567 {
2568 channel|=YellowChannel;
2569 break;
2570 }
2571 case ',':
2572 {
cristybb503372010-05-27 20:51:26 +00002573 ssize_t
cristy3e4015d2010-10-05 18:18:56 +00002574 type;
2575
2576 /*
2577 Gather the additional channel flags and merge with shorthand.
2578 */
cristy042ee782011-04-22 18:48:30 +00002579 type=ParseCommandOption(MagickChannelOptions,MagickTrue,channels+i+1);
cristy3e4015d2010-10-05 18:18:56 +00002580 if (type < 0)
2581 return(type);
2582 channel|=type;
cristy3ed852e2009-09-05 21:47:34 +00002583 return(channel);
2584 }
2585 default:
2586 return(-1);
2587 }
2588 }
2589 return(channel);
2590}
2591
2592/*
2593%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2594% %
2595% %
2596% %
cristy042ee782011-04-22 18:48:30 +00002597% P a r s e C o m m a n d O p t i o n %
cristy3ed852e2009-09-05 21:47:34 +00002598% %
2599% %
2600% %
2601%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2602%
cristy042ee782011-04-22 18:48:30 +00002603% ParseCommandOption() parses a string and returns an enumerated option
anthonyce2716b2011-04-22 09:51:34 +00002604% type(s). Return a value of -1 if no such option is found.
cristy3ed852e2009-09-05 21:47:34 +00002605%
cristy042ee782011-04-22 18:48:30 +00002606% The format of the ParseCommandOption method is:
cristy3ed852e2009-09-05 21:47:34 +00002607%
anthony31f1bf72012-01-30 12:37:22 +00002608% ssize_t ParseCommandOption(const CommandOption option_table,
cristy3ed852e2009-09-05 21:47:34 +00002609% const MagickBooleanType list,const char *options)
2610%
2611% A description of each parameter follows:
2612%
anthony31f1bf72012-01-30 12:37:22 +00002613% o option_table: Index to the option table to lookup
cristy3ed852e2009-09-05 21:47:34 +00002614%
2615% o list: A option other than zero permits more than one option separated by
2616% a comma or pipe.
2617%
2618% o options: One or more options separated by commas.
2619%
2620*/
anthony31f1bf72012-01-30 12:37:22 +00002621MagickExport ssize_t ParseCommandOption(const CommandOption option_table,
cristy3ed852e2009-09-05 21:47:34 +00002622 const MagickBooleanType list,const char *options)
2623{
2624 char
2625 token[MaxTextExtent];
2626
2627 const OptionInfo
2628 *option_info;
2629
2630 int
2631 sentinel;
2632
cristy3ed852e2009-09-05 21:47:34 +00002633 MagickBooleanType
2634 negate;
2635
2636 register char
2637 *q;
2638
2639 register const char
2640 *p;
2641
cristybb503372010-05-27 20:51:26 +00002642 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002643 i;
2644
cristyb9902b72010-10-05 18:21:50 +00002645 ssize_t
2646 option_types;
2647
anthony31f1bf72012-01-30 12:37:22 +00002648 option_info=GetOptionInfo(option_table);
cristy3ed852e2009-09-05 21:47:34 +00002649 if (option_info == (const OptionInfo *) NULL)
2650 return(-1);
2651 option_types=0;
2652 sentinel=',';
2653 if (strchr(options,'|') != (char *) NULL)
2654 sentinel='|';
2655 for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2656 {
2657 while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2658 (*p != '\0'))
2659 p++;
2660 negate=(*p == '!') ? MagickTrue : MagickFalse;
2661 if (negate != MagickFalse)
2662 p++;
2663 q=token;
2664 while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2665 (*p != '\0'))
2666 {
cristya0019202011-06-07 13:23:55 +00002667 if ((q-token) >= (MaxTextExtent-1))
cristy3ed852e2009-09-05 21:47:34 +00002668 break;
2669 *q++=(*p++);
2670 }
2671 *q='\0';
2672 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2673 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2674 {
2675 if (*token == '!')
2676 option_types=option_types &~ option_info[i].type;
2677 else
2678 option_types=option_types | option_info[i].type;
2679 break;
2680 }
2681 if ((option_info[i].mnemonic == (char *) NULL) &&
2682 ((strchr(token+1,'-') != (char *) NULL) ||
2683 (strchr(token+1,'_') != (char *) NULL)))
2684 {
2685 while ((q=strchr(token+1,'-')) != (char *) NULL)
2686 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2687 while ((q=strchr(token+1,'_')) != (char *) NULL)
2688 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2689 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2690 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2691 {
2692 if (*token == '!')
2693 option_types=option_types &~ option_info[i].type;
2694 else
2695 option_types=option_types | option_info[i].type;
2696 break;
2697 }
2698 }
2699 if (option_info[i].mnemonic == (char *) NULL)
2700 return(-1);
2701 if (list == MagickFalse)
2702 break;
2703 }
2704 return(option_types);
2705}
2706
2707/*
2708%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2709% %
2710% %
2711% %
cristy953c4bd2012-02-24 01:04:04 +00002712% P a r s e P i x e l C h a n n e l O p t i o n %
2713% %
2714% %
2715% %
2716%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2717%
2718% ParsePixelChannelOption() parses a string and returns an enumerated pixel
2719% channel type(s).
2720%
2721% The format of the ParsePixelChannelOption method is:
2722%
2723% ssize_t ParsePixelChannelOption(const char *channels)
2724%
2725% A description of each parameter follows:
2726%
cristyd04e7bf2012-03-03 19:19:12 +00002727% o channels: One or more channels separated by commas.
cristy953c4bd2012-02-24 01:04:04 +00002728%
2729*/
2730MagickExport ssize_t ParsePixelChannelOption(const char *channels)
2731{
cristyd04e7bf2012-03-03 19:19:12 +00002732 char
cristya15140f2012-03-04 01:21:15 +00002733 *q,
2734 token[MaxTextExtent];
cristy953c4bd2012-02-24 01:04:04 +00002735
2736 ssize_t
2737 channel;
2738
cristya15140f2012-03-04 01:21:15 +00002739 GetMagickToken(channels,NULL,token);
cristyd4311d42012-03-18 23:03:10 +00002740 if ((*token == ';') || (*token == '|'))
2741 return(RedPixelChannel);
cristya15140f2012-03-04 01:21:15 +00002742 channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
cristy953c4bd2012-02-24 01:04:04 +00002743 if (channel >= 0)
2744 return(channel);
cristya15140f2012-03-04 01:21:15 +00002745 q=(char *) token;
2746 channel=InterpretLocaleValue(token,&q);
cristyabb241b2012-03-06 01:12:58 +00002747 if ((q == token) || (channel < 0) || (channel >= MaxPixelChannels))
cristyd04e7bf2012-03-03 19:19:12 +00002748 return(-1);
cristy953c4bd2012-02-24 01:04:04 +00002749 return(channel);
2750}
2751
2752/*
2753%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2754% %
2755% %
2756% %
cristy3ed852e2009-09-05 21:47:34 +00002757% R e m o v e I m a g e O p t i o n %
2758% %
2759% %
2760% %
2761%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2762%
2763% RemoveImageOption() removes an option from the image and returns its value.
2764%
anthony40ca0b92012-08-02 13:23:28 +00002765% In this case the ConstantString() value returned should be freed by the
2766% caller when finished.
2767%
cristy3ed852e2009-09-05 21:47:34 +00002768% The format of the RemoveImageOption method is:
2769%
2770% char *RemoveImageOption(ImageInfo *image_info,const char *option)
2771%
2772% A description of each parameter follows:
2773%
2774% o image_info: the image info.
2775%
2776% o option: the image option.
2777%
2778*/
2779MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
2780{
2781 char
2782 *value;
2783
2784 assert(image_info != (ImageInfo *) NULL);
2785 assert(image_info->signature == MagickSignature);
2786 if (image_info->debug != MagickFalse)
2787 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2788 image_info->filename);
2789 if (image_info->options == (void *) NULL)
2790 return((char *) NULL);
2791 value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
2792 image_info->options,option);
2793 return(value);
2794}
2795
2796/*
2797%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2798% %
2799% %
2800% %
2801% R e s e t I m a g e O p t i o n %
2802% %
2803% %
2804% %
2805%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2806%
2807% ResetImageOptions() resets the image_info option. That is, it deletes
anthony40ca0b92012-08-02 13:23:28 +00002808% all global options associated with the image_info structure.
cristy3ed852e2009-09-05 21:47:34 +00002809%
2810% The format of the ResetImageOptions method is:
2811%
2812% ResetImageOptions(ImageInfo *image_info)
2813%
2814% A description of each parameter follows:
2815%
2816% o image_info: the image info.
2817%
2818*/
2819MagickExport void ResetImageOptions(const ImageInfo *image_info)
2820{
2821 assert(image_info != (ImageInfo *) NULL);
2822 assert(image_info->signature == MagickSignature);
2823 if (image_info->debug != MagickFalse)
2824 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2825 image_info->filename);
2826 if (image_info->options == (void *) NULL)
2827 return;
2828 ResetSplayTree((SplayTreeInfo *) image_info->options);
2829}
2830
2831/*
2832%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2833% %
2834% %
2835% %
2836% R e s e t I m a g e O p t i o n I t e r a t o r %
2837% %
2838% %
2839% %
2840%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2841%
2842% ResetImageOptionIterator() resets the image_info values iterator. Use it
2843% in conjunction with GetNextImageOption() to iterate over all the values
2844% associated with an image option.
2845%
2846% The format of the ResetImageOptionIterator method is:
2847%
2848% ResetImageOptionIterator(ImageInfo *image_info)
2849%
2850% A description of each parameter follows:
2851%
2852% o image_info: the image info.
2853%
2854*/
2855MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
2856{
2857 assert(image_info != (ImageInfo *) NULL);
2858 assert(image_info->signature == MagickSignature);
2859 if (image_info->debug != MagickFalse)
2860 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2861 image_info->filename);
2862 if (image_info->options == (void *) NULL)
2863 return;
2864 ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
2865}
2866
2867/*
2868%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2869% %
2870% %
2871% %
2872% S e t I m a g e O p t i o n %
2873% %
2874% %
2875% %
2876%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2877%
2878% SetImageOption() associates an value with an image option.
2879%
2880% The format of the SetImageOption method is:
2881%
2882% MagickBooleanType SetImageOption(ImageInfo *image_info,
2883% const char *option,const char *value)
2884%
2885% A description of each parameter follows:
2886%
2887% o image_info: the image info.
2888%
2889% o option: the image option.
2890%
2891% o values: the image option values.
2892%
2893*/
2894MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
2895 const char *option,const char *value)
2896{
cristy3ed852e2009-09-05 21:47:34 +00002897 assert(image_info != (ImageInfo *) NULL);
2898 assert(image_info->signature == MagickSignature);
2899 if (image_info->debug != MagickFalse)
2900 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2901 image_info->filename);
cristyc96a1ba2013-03-28 13:05:04 +00002902 /*
2903 Specific global option settings.
2904 */
anthonya322a832013-04-27 06:28:03 +00002905 if (LocaleCompare(option,"size") == 0) {
cristy3ed852e2009-09-05 21:47:34 +00002906 (void) CloneString(&image_info->size,value);
anthonya322a832013-04-27 06:28:03 +00002907 return(MagickTrue);
2908 }
cristyc96a1ba2013-03-28 13:05:04 +00002909 /*
2910 Create tree if needed - specify how key,values are to be freed.
2911 */
cristy3ed852e2009-09-05 21:47:34 +00002912 if (image_info->options == (void *) NULL)
2913 image_info->options=NewSplayTree(CompareSplayTreeString,
2914 RelinquishMagickMemory,RelinquishMagickMemory);
cristyc96a1ba2013-03-28 13:05:04 +00002915 /*
2916 Delete Option if NULL -- empty string values are valid!
2917 */
anthonyd181ea02011-10-12 07:44:13 +00002918 if (value == (const char *) NULL)
2919 return(DeleteImageOption(image_info,option));
cristyc96a1ba2013-03-28 13:05:04 +00002920 /*
2921 Add option to splay-tree.
2922 */
cristye3f77792011-10-07 00:09:09 +00002923 return(AddValueToSplayTree((SplayTreeInfo *) image_info->options,
2924 ConstantString(option),ConstantString(value)));
cristy3ed852e2009-09-05 21:47:34 +00002925}