blob: d6c162b01136680bdb3176e2d0ed227ad4946279 [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 %
16% John Cristy %
17% March 2000 %
18% %
19% %
cristy1454be72011-12-19 01:52:48 +000020% Copyright 1999-2012 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"
54#include "MagickCore/fx.h"
55#include "MagickCore/gem.h"
56#include "MagickCore/geometry.h"
57#include "MagickCore/image.h"
58#include "MagickCore/image-private.h"
59#include "MagickCore/layer.h"
60#include "MagickCore/mime-private.h"
61#include "MagickCore/memory_.h"
62#include "MagickCore/monitor.h"
63#include "MagickCore/montage.h"
64#include "MagickCore/morphology.h"
65#include "MagickCore/option.h"
66#include "MagickCore/policy.h"
67#include "MagickCore/property.h"
68#include "MagickCore/quantize.h"
69#include "MagickCore/quantum.h"
70#include "MagickCore/resample.h"
71#include "MagickCore/resource_.h"
72#include "MagickCore/splay-tree.h"
73#include "MagickCore/statistic.h"
74#include "MagickCore/string_.h"
75#include "MagickCore/token.h"
76#include "MagickCore/utility.h"
cristy3ed852e2009-09-05 21:47:34 +000077
78/*
79 ImageMagick options.
80*/
81static const OptionInfo
82 AlignOptions[] =
83 {
cristy042ee782011-04-22 18:48:30 +000084 { "Undefined", UndefinedAlign, UndefinedOptionFlag, MagickTrue },
85 { "Center", CenterAlign, UndefinedOptionFlag, MagickFalse },
86 { "End", RightAlign, UndefinedOptionFlag, MagickFalse },
87 { "Left", LeftAlign, UndefinedOptionFlag, MagickFalse },
88 { "Middle", CenterAlign, UndefinedOptionFlag, MagickFalse },
89 { "Right", RightAlign, UndefinedOptionFlag, MagickFalse },
90 { "Start", LeftAlign, UndefinedOptionFlag, MagickFalse },
91 { (char *) NULL, UndefinedAlign, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +000092 },
93 AlphaOptions[] =
94 {
cristy042ee782011-04-22 18:48:30 +000095 { "Undefined", UndefinedAlphaChannel, UndefinedOptionFlag, MagickTrue },
96 { "Activate", ActivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
97 { "Background", BackgroundAlphaChannel, UndefinedOptionFlag, MagickFalse },
98 { "Copy", CopyAlphaChannel, UndefinedOptionFlag, MagickFalse },
99 { "Deactivate", DeactivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
100 { "Extract", ExtractAlphaChannel, UndefinedOptionFlag, MagickFalse },
101 { "Off", DeactivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
102 { "On", ActivateAlphaChannel, UndefinedOptionFlag, MagickFalse },
103 { "Opaque", OpaqueAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy61808382012-01-30 01:24:49 +0000104 { "Remove", RemoveAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000105 { "Set", SetAlphaChannel, UndefinedOptionFlag, MagickFalse },
106 { "Shape", ShapeAlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000107 { "Reset", SetAlphaChannel, DeprecateOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000108 { "Transparent", TransparentAlphaChannel, UndefinedOptionFlag, MagickFalse },
109 { (char *) NULL, UndefinedAlphaChannel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000110 },
111 BooleanOptions[] =
112 {
anthony72feaa62012-01-17 06:46:23 +0000113 { "False", MagickFalse, UndefinedOptionFlag, MagickFalse },
114 { "True", MagickTrue, UndefinedOptionFlag, MagickFalse },
115 { "0", MagickFalse, UndefinedOptionFlag, MagickFalse },
116 { "1", MagickTrue, UndefinedOptionFlag, MagickFalse },
117 { (char *) NULL, MagickFalse, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000118 },
119 ChannelOptions[] =
120 {
cristy042ee782011-04-22 18:48:30 +0000121 { "Undefined", UndefinedChannel, UndefinedOptionFlag, MagickTrue },
anthony30b912a2012-03-22 01:20:28 +0000122 /* special */
cristy9a9230e2011-04-26 14:56:14 +0000123 { "All", CompositeChannels, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000124 { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
125 { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
126 /* individual channel */
127 { "A", AlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy953c4bd2012-02-24 01:04:04 +0000128 { "Alpha", AlphaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000129 { "Black", BlackChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000130 { "B", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000131 { "Blue", BlueChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000132 { "C", CyanChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000133 { "Cyan", CyanChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000134 { "Gray", GrayChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000135 { "G", GreenChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000136 { "Green", GreenChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000137 { "H", RedChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000138 { "Hue", RedChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000139 { "K", BlackChannel, UndefinedOptionFlag, MagickFalse },
140 { "L", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000141 { "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
142 { "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000143 { "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
anthony30b912a2012-03-22 01:20:28 +0000144 { "M", MagentaChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000145 { "Magenta", MagentaChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000146 { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
147 { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
148 { "R", RedChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000149 { "Red", RedChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000150 { "S", GreenChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000151 { "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +0000152 { "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000153 { "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000154 { (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000155 },
156 ClassOptions[] =
157 {
cristy042ee782011-04-22 18:48:30 +0000158 { "Undefined", UndefinedClass, UndefinedOptionFlag, MagickTrue },
159 { "DirectClass", DirectClass, UndefinedOptionFlag, MagickFalse },
160 { "PseudoClass", PseudoClass, UndefinedOptionFlag, MagickFalse },
161 { (char *) NULL, UndefinedClass, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000162 },
163 ClipPathOptions[] =
164 {
cristy042ee782011-04-22 18:48:30 +0000165 { "Undefined", UndefinedPathUnits, UndefinedOptionFlag, MagickTrue },
166 { "ObjectBoundingBox", ObjectBoundingBox, UndefinedOptionFlag, MagickFalse },
167 { "UserSpace", UserSpace, UndefinedOptionFlag, MagickFalse },
168 { "UserSpaceOnUse", UserSpaceOnUse, UndefinedOptionFlag, MagickFalse },
169 { (char *) NULL, UndefinedPathUnits, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000170 },
171 CommandOptions[] =
172 {
anthony686b1a32012-02-15 14:50:53 +0000173 /* WARNING: this must be sorted by name, then by switch character
cristy87c02f42012-02-24 00:19:10 +0000174 So that it can be referenced using a binary search for speed.
175 See GetCommandOptionInfo() below for details.
anthony686b1a32012-02-15 14:50:53 +0000176
177 Check on sort...
178 magick -list command > t1
179 sort -k 1.2 t1 | diff t1 -
180 Should not show any differences...
181 */
anthony85337ae2012-02-10 00:13:51 +0000182 { "(", 0L, SpecialOptionFlag, MagickTrue },
183 { ")", 0L, SpecialOptionFlag, MagickTrue },
anthony0ccfd032012-02-26 23:20:29 +0000184 { "{", 0L, SpecialOptionFlag, MagickTrue },
185 { "}", 0L, SpecialOptionFlag, MagickTrue },
anthony94012752012-03-06 04:14:34 +0000186 { "--", 1L, SpecialOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000187 { "+adaptive-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000188 { "-adaptive-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000189 { "+adaptive-resize", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000190 { "-adaptive-resize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000191 { "+adaptive-sharpen", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000192 { "-adaptive-sharpen", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000193 { "+adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
194 { "-adjoin", 0L, ImageInfoOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000195 { "+affine", 0L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
196 { "-affine", 1L, ReplacedOptionFlag | DrawInfoOptionFlag, MagickTrue },
anthony31f1bf72012-01-30 12:37:22 +0000197 { "+affinity", 0L, DeprecateOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000198 { "-affinity", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
199 { "+alpha", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000200 { "-alpha", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000201 { "+annotate", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000202 { "-annotate", 2L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000203 { "+antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
204 { "-antialias", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
205 { "+append", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
206 { "-append", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000207 { "+attenuate", 0L, ImageInfoOptionFlag, MagickFalse },
anthony92c93bd2012-03-19 14:02:47 +0000208 { "-attenuate", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000209 { "+authenticate", 0L, ImageInfoOptionFlag, MagickFalse },
210 { "-authenticate", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000211 { "+auto-gamma", 0L, DeprecateOptionFlag, MagickTrue },
anthony9a6469e2011-05-04 11:07:31 +0000212 { "-auto-gamma", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000213 { "+auto-level", 0L, DeprecateOptionFlag, MagickTrue },
anthony9a6469e2011-05-04 11:07:31 +0000214 { "-auto-level", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000215 { "+auto-orient", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000216 { "-auto-orient", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000217 { "+average", 0L, DeprecateOptionFlag, MagickTrue },
218 { "-average", 0L, ReplacedOptionFlag | ListOperatorOptionFlag | FireOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000219 { "+backdrop", 0L, NonMagickOptionFlag, MagickFalse },
220 { "-backdrop", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000221 { "+background", 0L, ImageInfoOptionFlag, MagickFalse },
222 { "-background", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000223 { "+bench", 1L, DeprecateOptionFlag, MagickTrue },
anthony9a6469e2011-05-04 11:07:31 +0000224 { "-bench", 1L, GenesisOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000225 { "+bias", 0L, ImageInfoOptionFlag, MagickFalse },
226 { "-bias", 1L, ImageInfoOptionFlag, MagickFalse },
227 { "+black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
228 { "-black-point-compensation", 0L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000229 { "+black-threshold", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000230 { "-black-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000231 { "+blend", 0L, NonMagickOptionFlag, MagickFalse },
232 { "-blend", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000233 { "+blue-primary", 0L, ImageInfoOptionFlag, MagickFalse },
234 { "-blue-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000235 { "+blue-shift", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000236 { "-blue-shift", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000237 { "+blur", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000238 { "-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000239 { "+border", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000240 { "-border", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000241 { "+bordercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
242 { "-bordercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000243 { "+borderwidth", 0L, NonMagickOptionFlag, MagickFalse },
244 { "-borderwidth", 1L, NonMagickOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000245 { "+box", 0L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
246 { "-box", 1L, ReplacedOptionFlag | ImageInfoOptionFlag | DrawInfoOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000247 { "+brightness-contrast", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000248 { "-brightness-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000249 { "+cache", 0L, GlobalOptionFlag, MagickFalse },
250 { "-cache", 1L, GlobalOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000251 { "+caption", 0L, ImageInfoOptionFlag, MagickFalse },
252 { "-caption", 1L, ImageInfoOptionFlag, MagickFalse },
253 { "+cdl", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000254 { "-cdl", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonydf9471d2012-03-22 03:53:05 +0000255 { "+channel", 0L, ImageInfoOptionFlag, MagickFalse },
256 { "-channel", 1L, ImageInfoOptionFlag, MagickFalse },
anthony772c9f22012-03-13 05:11:10 +0000257 { "-channel-fx", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000258 { "+charcoal", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000259 { "-charcoal", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000260 { "+chop", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000261 { "-chop", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000262 { "+clamp", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000263 { "-clamp", 0L, SimpleOperatorOptionFlag, MagickFalse },
264 { "+clip", 0L, SimpleOperatorOptionFlag, MagickFalse },
265 { "-clip", 0L, SimpleOperatorOptionFlag, MagickFalse },
266 { "+clip-mask", 0L, SimpleOperatorOptionFlag, MagickFalse },
267 { "-clip-mask", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000268 { "+clip-path", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000269 { "-clip-path", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000270 { "+clone", 0L, SpecialOptionFlag, MagickFalse },
271 { "-clone", 1L, SpecialOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000272 { "+clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000273 { "-clut", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000274 { "+coalesce", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000275 { "-coalesce", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000276 { "+color-matrix", 1L, DeprecateOptionFlag, MagickTrue },
277 { "-color-matrix", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000278 { "+colorize", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000279 { "-colorize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000280 { "+colormap", 0L, NonMagickOptionFlag, MagickFalse },
281 { "-colormap", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000282 { "+colors", 1L, DeprecateOptionFlag, MagickTrue },
anthony50e3aef2012-04-13 02:44:36 +0000283 { "-colors", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000284 { "+colorspace", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
285 { "-colorspace", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000286 { "+combine", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000287 { "-combine", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000288 { "+comment", 0L, ImageInfoOptionFlag, MagickFalse },
289 { "-comment", 1L, ImageInfoOptionFlag, MagickFalse },
290 { "+compose", 0L, ImageInfoOptionFlag, MagickFalse },
291 { "-compose", 1L, ImageInfoOptionFlag, MagickFalse },
anthony94012752012-03-06 04:14:34 +0000292 { "+composite", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000293 { "-composite", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000294 { "+compress", 0L, ImageInfoOptionFlag, MagickFalse },
295 { "-compress", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000296 { "+concurrent", 0L, DeprecateOptionFlag, MagickTrue },
anthonyebb73a22012-03-22 14:25:52 +0000297 { "-concurrent", 0L, GenesisOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000298 { "+contrast", 0L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
299 { "-contrast", 0L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000300 { "+contrast-stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000301 { "-contrast-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000302 { "+convolve", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000303 { "-convolve", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000304 { "+crop", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000305 { "-crop", 1L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000306 { "+cycle", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000307 { "-cycle", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000308 { "+debug", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
309 { "-debug", 1L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000310 { "+decipher", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000311 { "-decipher", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000312 { "+deconstruct", 0L, DeprecateOptionFlag, MagickTrue },
anthony975a8d72012-04-12 13:54:36 +0000313 { "-deconstruct", 0L, ReplacedOptionFlag | ListOperatorOptionFlag | FireOptionFlag, MagickTrue },
anthonyde1a57f2011-05-02 09:45:30 +0000314 { "+define", 1L, ImageInfoOptionFlag, MagickFalse },
315 { "-define", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000316 { "+delay", 0L, ImageInfoOptionFlag, MagickFalse },
317 { "-delay", 1L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000318 { "+delete", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
319 { "-delete", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000320 { "+density", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000321 { "-density", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonydf323722012-04-16 01:17:38 +0000322 { "+depth", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
323 { "-depth", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000324 { "+descend", 0L, NonMagickOptionFlag, MagickFalse },
325 { "-descend", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000326 { "+deskew", 0L, SimpleOperatorOptionFlag, MagickFalse },
327 { "-deskew", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000328 { "+despeckle", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000329 { "-despeckle", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000330 { "+direction", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
331 { "-direction", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000332 { "+displace", 0L, NonMagickOptionFlag, MagickFalse },
333 { "-displace", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000334 { "+display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000335 { "-display", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000336 { "+dispose", 0L, ImageInfoOptionFlag, MagickFalse },
337 { "-dispose", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000338 { "+dissolve", 0L, NonMagickOptionFlag, MagickFalse },
339 { "-dissolve", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000340 { "+dissimilarity-threshold", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
341 { "-dissimilarity-threshold", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000342 { "+distort", 2L, SimpleOperatorOptionFlag, MagickFalse },
343 { "-distort", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000344 { "+dither", 0L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
345 { "-dither", 1L, ImageInfoOptionFlag | QuantizeInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000346 { "+draw", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000347 { "-draw", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000348 { "+duplicate", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
349 { "-duplicate", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony9a6469e2011-05-04 11:07:31 +0000350 { "+duration", 1L, GenesisOptionFlag, MagickFalse },
351 { "-duration", 1L, GenesisOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000352 { "+edge", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000353 { "-edge", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000354 { "+emboss", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000355 { "-emboss", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000356 { "+encipher", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000357 { "-encipher", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000358 { "+encoding", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000359 { "-encoding", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000360 { "+endian", 0L, ImageInfoOptionFlag, MagickFalse },
361 { "-endian", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000362 { "+enhance", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000363 { "-enhance", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000364 { "+equalize", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000365 { "-equalize", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000366 { "+evaluate", 2L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000367 { "-evaluate", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000368 { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000369 { "-evaluate-sequence", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000370 { "-exit", 0L, SpecialOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000371 { "+extent", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000372 { "-extent", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000373 { "+extract", 0L, ImageInfoOptionFlag, MagickFalse },
374 { "-extract", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000375 { "+family", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000376 { "-family", 1L, DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000377 { "+features", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse },
378 { "-features", 1L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse },
379 { "+fft", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
380 { "-fft", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
381 { "+fill", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
382 { "-fill", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000383 { "+filter", 0L, ImageInfoOptionFlag, MagickFalse },
384 { "-filter", 1L, ImageInfoOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000385 { "+flatten", 0L, DeprecateOptionFlag, MagickTrue },
386 { "-flatten", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000387 { "+flip", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000388 { "-flip", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000389 { "+floodfill", 2L, SimpleOperatorOptionFlag, MagickFalse },
390 { "-floodfill", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000391 { "+flop", 0L, DeprecateOptionFlag, MagickTrue },
392 { "-flop", 0L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000393 { "+font", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
394 { "-font", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000395 { "+foreground", 0L, NonMagickOptionFlag, MagickFalse },
396 { "-foreground", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000397 { "+format", 0L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000398 { "-format", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000399 { "+frame", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000400 { "-frame", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000401 { "+function", 2L, DeprecateOptionFlag, MagickTrue },
402 { "-function", 2L,SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000403 { "+fuzz", 0L, ImageInfoOptionFlag, MagickFalse },
404 { "-fuzz", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000405 { "+fx", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000406 { "-fx", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000407 { "+gamma", 0L, SimpleOperatorOptionFlag, MagickFalse },
408 { "-gamma", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000409 { "+gaussian", 1L, DeprecateOptionFlag, MagickTrue },
anthony975a8d72012-04-12 13:54:36 +0000410 { "-gaussian", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000411 { "+gaussian-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000412 { "-gaussian-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
413 { "+geometry", 0L, SimpleOperatorOptionFlag, MagickFalse },
414 { "-geometry", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000415 { "+gravity", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
416 { "-gravity", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000417 { "+green-primary", 0L, ImageInfoOptionFlag, MagickFalse },
418 { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000419 { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000420 { "-hald-clut", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000421 { "+highlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
422 { "-highlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000423 { "+iconGeometry", 0L, NonMagickOptionFlag, MagickFalse },
424 { "-iconGeometry", 1L, NonMagickOptionFlag, MagickFalse },
425 { "+iconic", 0L, NonMagickOptionFlag, MagickFalse },
426 { "-iconic", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000427 { "+identify", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000428 { "-identify", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse },
429 { "+ift", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
430 { "-ift", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000431 { "+immutable", 0L, NonMagickOptionFlag, MagickFalse },
432 { "-immutable", 0L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000433 { "+implode", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000434 { "-implode", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000435 { "+insert", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
436 { "-insert", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000437 { "+intent", 0L, ImageInfoOptionFlag, MagickFalse },
438 { "-intent", 1L, ImageInfoOptionFlag, MagickFalse },
439 { "+interlace", 0L, ImageInfoOptionFlag, MagickFalse },
440 { "-interlace", 1L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000441 { "+interline-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
442 { "-interline-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000443 { "+interpolate", 0L, ImageInfoOptionFlag, MagickFalse },
444 { "-interpolate", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyfd706f92012-01-19 04:22:02 +0000445 { "+interpolative-resize", 1L, DeprecateOptionFlag, MagickTrue },
446 { "-interpolative-resize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000447 { "+interword-spacing", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
448 { "-interword-spacing", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000449 { "+kerning", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
450 { "-kerning", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000451 { "+label", 0L, ImageInfoOptionFlag, MagickFalse },
452 { "-label", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000453 { "+lat", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000454 { "-lat", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000455 { "+layers", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000456 { "-layers", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000457 { "+level", 1L, SimpleOperatorOptionFlag, MagickFalse },
458 { "-level", 1L, SimpleOperatorOptionFlag, MagickFalse },
459 { "+level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse },
460 { "-level-colors", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000461 { "+limit", 0L, DeprecateOptionFlag, MagickTrue },
anthonyea068a52012-04-09 05:46:25 +0000462 { "-limit", 2L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000463 { "+linear-stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000464 { "-linear-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000465 { "+liquid-rescale", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000466 { "-liquid-rescale", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000467 { "+list", 0L, DeprecateOptionFlag, MagickTrue },
anthony24aa8822012-03-11 00:56:06 +0000468 { "-list", 1L, SpecialOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000469 { "+log", 0L, DeprecateOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000470 { "-log", 1L, GlobalOptionFlag, MagickFalse },
471 { "+loop", 0L, ImageInfoOptionFlag, MagickFalse },
472 { "-loop", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000473 { "+lowlight-color", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
474 { "-lowlight-color", 1L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000475 { "+magnify", 0L, NonMagickOptionFlag, MagickFalse },
476 { "-magnify", 1L, NonMagickOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000477 { "+map", 0L, ReplacedOptionFlag | ListOperatorOptionFlag | FireOptionFlag, MagickTrue },
478 { "-map", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000479 { "+mask", 0L, SimpleOperatorOptionFlag, MagickFalse },
480 { "-mask", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000481 { "+matte", 0L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
482 { "-matte", 0L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthonyde1a57f2011-05-02 09:45:30 +0000483 { "+mattecolor", 0L, ImageInfoOptionFlag, MagickFalse },
484 { "-mattecolor", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000485 { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
486 { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
487 { "+median", 1L, DeprecateOptionFlag, MagickTrue },
anthony975a8d72012-04-12 13:54:36 +0000488 { "-median", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag | FireOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000489 { "+metric", 0L, NonMagickOptionFlag, MagickFalse },
490 { "-metric", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000491 { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
492 { "-minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000493 { "+mode", 1L, NonMagickOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000494 { "-mode", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000495 { "+modulate", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000496 { "-modulate", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000497 { "+monitor", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
498 { "-monitor", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000499 { "+monochrome", 0L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000500 { "-monochrome", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000501 { "+morph", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000502 { "-morph", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000503 { "+morphology", 2L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000504 { "-morphology", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000505 { "+mosaic", 0L, DeprecateOptionFlag, MagickTrue },
506 { "-mosaic", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000507 { "+motion-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000508 { "-motion-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000509 { "+name", 0L, NonMagickOptionFlag, MagickFalse },
510 { "-name", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000511 { "+negate", 0L, SimpleOperatorOptionFlag, MagickFalse },
512 { "-negate", 0L, SimpleOperatorOptionFlag, MagickFalse },
513 { "+noise", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +0000514 { "-noise", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000515 { "-noop", 0L, SpecialOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000516 { "+normalize", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000517 { "-normalize", 0L, SimpleOperatorOptionFlag, MagickFalse },
518 { "+opaque", 1L, SimpleOperatorOptionFlag, MagickFalse },
519 { "-opaque", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000520 { "+ordered-dither", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000521 { "-ordered-dither", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000522 { "+orient", 0L, ImageInfoOptionFlag, MagickFalse },
523 { "-orient", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000524 { "+page", 0L, ImageInfoOptionFlag, MagickFalse },
525 { "-page", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000526 { "+paint", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000527 { "-paint", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000528 { "+path", 0L, NonMagickOptionFlag, MagickFalse },
529 { "-path", 1L, NonMagickOptionFlag, MagickFalse },
530 { "+pause", 0L, NonMagickOptionFlag, MagickFalse },
531 { "-pause", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000532 { "+ping", 0L, ImageInfoOptionFlag, MagickFalse },
533 { "-ping", 0L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000534 { "+pointsize", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
535 { "-pointsize", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000536 { "+polaroid", 0L, SimpleOperatorOptionFlag, MagickFalse },
537 { "-polaroid", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000538 { "+posterize", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000539 { "-posterize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonya3ef4ed2012-03-17 06:52:53 +0000540 { "+precision", 0L, ImageInfoOptionFlag, MagickFalse },
541 { "-precision", 1L, ImageInfoOptionFlag, MagickFalse },
542 { "+preview", 0L, DeprecateOptionFlag, MagickTrue },
543 { "-preview", 1L, GlobalOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000544 { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000545 { "-print", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000546 { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000547 { "-process", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000548 { "+profile", 1L, SimpleOperatorOptionFlag, MagickFalse },
549 { "-profile", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000550 { "+quality", 0L, ImageInfoOptionFlag, MagickFalse },
551 { "-quality", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000552 { "+quantize", 0L, QuantizeInfoOptionFlag, MagickFalse },
553 { "-quantize", 1L, QuantizeInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000554 { "+quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
555 { "-quiet", 0L, GlobalOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000556 { "+radial-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000557 { "-radial-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
558 { "+raise", 1L, SimpleOperatorOptionFlag, MagickFalse },
559 { "-raise", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000560 { "+random-threshold", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000561 { "-random-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000562 { "-read", 1L, SpecialOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000563 { "+recolor", 1L, DeprecateOptionFlag, MagickTrue },
anthony975a8d72012-04-12 13:54:36 +0000564 { "-recolor", 1L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthonyde1a57f2011-05-02 09:45:30 +0000565 { "+red-primary", 0L, ImageInfoOptionFlag, MagickFalse },
566 { "-red-primary", 1L, ImageInfoOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000567 { "+regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
568 { "-regard-warnings", 0L, ImageInfoOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000569 { "+region", 0L, SpecialOptionFlag, MagickFalse },
570 { "-region", 1L, SpecialOptionFlag, MagickFalse },
anthony686b1a32012-02-15 14:50:53 +0000571 { "+remap", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
572 { "-remap", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000573 { "+remote", 0L, NonMagickOptionFlag, MagickFalse },
574 { "-remote", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000575 { "+render", 0L, DrawInfoOptionFlag, MagickFalse },
576 { "-render", 0L, DrawInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000577 { "+repage", 0L, SimpleOperatorOptionFlag, MagickFalse },
578 { "-repage", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000579 { "+resample", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000580 { "-resample", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000581 { "+resize", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000582 { "-resize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyd111fda2012-04-13 03:07:40 +0000583 { "+respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
584 { "-respect-parenthesis", 0L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000585 { "+reverse", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000586 { "-reverse", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000587 { "+roll", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000588 { "-roll", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000589 { "+rotate", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000590 { "-rotate", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000591 { "+sample", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000592 { "-sample", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000593 { "+sampling-factor", 0L, ImageInfoOptionFlag, MagickFalse },
594 { "-sampling-factor", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000595 { "+sans", 1L, SpecialOptionFlag, MagickTrue },
anthony31f1bf72012-01-30 12:37:22 +0000596 { "-sans", 1L, SpecialOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000597 { "+sans0", 0L, SpecialOptionFlag, MagickTrue }, /* equivelent to 'noop' */
anthony31f1bf72012-01-30 12:37:22 +0000598 { "-sans0", 0L, SpecialOptionFlag, MagickTrue },
599 { "+sans2", 2L, SpecialOptionFlag, MagickTrue },
600 { "-sans2", 2L, SpecialOptionFlag, MagickTrue },
anthony72feaa62012-01-17 06:46:23 +0000601 { "+scale", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000602 { "-scale", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000603 { "+scene", 0L, ImageInfoOptionFlag, MagickFalse },
604 { "-scene", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000605 { "+scenes", 0L, NonMagickOptionFlag, MagickFalse },
606 { "-scenes", 1L, NonMagickOptionFlag, MagickFalse },
607 { "+screen", 0L, NonMagickOptionFlag, MagickFalse },
608 { "-screen", 1L, NonMagickOptionFlag, MagickFalse },
anthonyea068a52012-04-09 05:46:25 +0000609 { "-script", 1L, UndefinedOptionFlag, MagickFalse }, /* special handling */
anthonyde1a57f2011-05-02 09:45:30 +0000610 { "+seed", 0L, GlobalOptionFlag, MagickFalse },
611 { "-seed", 1L, GlobalOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000612 { "+segment", 1L, DeprecateOptionFlag, MagickTrue },
anthony247a86d2011-05-03 13:18:18 +0000613 { "-segment", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000614 { "+selective-blur", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000615 { "-selective-blur", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000616 { "+separate", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
cristya79a3482011-05-03 17:14:22 +0000617 { "-separate", 0L, SimpleOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000618 { "+sepia-tone", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000619 { "-sepia-tone", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000620 { "+set", 1L, SimpleOperatorOptionFlag, MagickFalse },
621 { "-set", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000622 { "+shade", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000623 { "-shade", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000624 { "+shadow", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000625 { "-shadow", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000626 { "+shared-memory", 0L, NonMagickOptionFlag, MagickFalse },
627 { "-shared-memory", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000628 { "+sharpen", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000629 { "-sharpen", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000630 { "+shave", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000631 { "-shave", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000632 { "+shear", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000633 { "-shear", 1L, SimpleOperatorOptionFlag, MagickFalse },
634 { "+sigmoidal-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse },
635 { "-sigmoidal-contrast", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000636 { "+silent", 0L, NonMagickOptionFlag, MagickFalse },
637 { "-silent", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000638 { "+size", 0L, ImageInfoOptionFlag, MagickFalse },
639 { "-size", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000640 { "+sketch", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000641 { "-sketch", 1L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000642 { "+smush", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
643 { "-smush", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000644 { "+snaps", 0L, NonMagickOptionFlag, MagickFalse },
645 { "-snaps", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000646 { "+solarize", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000647 { "-solarize", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000648 { "+sparse-color", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000649 { "-sparse-color", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000650 { "+splice", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000651 { "-splice", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000652 { "+spread", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000653 { "-spread", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000654 { "+statistic", 2L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000655 { "-statistic", 2L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000656 { "+stegano", 0L, NonMagickOptionFlag, MagickFalse },
657 { "-stegano", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000658 { "+stereo", 0L, DeprecateOptionFlag, MagickTrue },
anthony668f43a2012-02-20 14:55:32 +0000659 { "-stereo", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000660 { "+stretch", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000661 { "-stretch", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000662 { "+strip", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000663 { "-strip", 0L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000664 { "+stroke", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
665 { "-stroke", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000666 { "+strokewidth", 1L, ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000667 { "-strokewidth", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000668 { "+style", 0L, DrawInfoOptionFlag, MagickFalse },
669 { "-style", 1L, DrawInfoOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000670 { "+subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
671 { "-subimage-search", 0L, NonMagickOptionFlag | ImageInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000672 { "+swap", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
673 { "-swap", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000674 { "+swirl", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000675 { "-swirl", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000676 { "+synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
677 { "-synchronize", 0L, ImageInfoOptionFlag, MagickFalse },
678 { "+taint", 0L, ImageInfoOptionFlag, MagickFalse },
679 { "-taint", 0L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000680 { "+text-font", 0L, NonMagickOptionFlag, MagickFalse },
681 { "-text-font", 1L, NonMagickOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000682 { "+texture", 0L, ImageInfoOptionFlag, MagickFalse },
683 { "-texture", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000684 { "+threshold", 0L, SimpleOperatorOptionFlag, MagickFalse },
685 { "-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000686 { "+thumbnail", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000687 { "-thumbnail", 1L, SimpleOperatorOptionFlag, MagickFalse },
688 { "+tile", 0L, DrawInfoOptionFlag, MagickFalse },
689 { "-tile", 1L, DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000690 { "+tile-offset", 0L, ImageInfoOptionFlag, MagickFalse },
691 { "-tile-offset", 1L, ImageInfoOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000692 { "+tint", 1L, SimpleOperatorOptionFlag, MagickFalse },
693 { "-tint", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000694 { "+title", 0L, NonMagickOptionFlag, MagickFalse },
695 { "-title", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000696 { "+transform", 0L, DeprecateOptionFlag, MagickTrue },
anthony975a8d72012-04-12 13:54:36 +0000697 { "-transform", 0L, ReplacedOptionFlag | SimpleOperatorOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000698 { "+transparent", 1L, SimpleOperatorOptionFlag, MagickFalse },
699 { "-transparent", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyb1d483a2012-04-14 12:53:56 +0000700 { "+transparent-color", 0L, ImageInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000701 { "-transparent-color", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000702 { "+transpose", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000703 { "-transpose", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000704 { "+transverse", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000705 { "-transverse", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000706 { "+treedepth", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000707 { "-treedepth", 1L, QuantizeInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000708 { "+trim", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000709 { "-trim", 0L, SimpleOperatorOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000710 { "+type", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
711 { "-type", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000712 { "+undercolor", 0L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
cristya79a3482011-05-03 17:14:22 +0000713 { "-undercolor", 1L, ImageInfoOptionFlag | DrawInfoOptionFlag, MagickFalse },
anthony31f1bf72012-01-30 12:37:22 +0000714 { "+unique", 0L, SimpleOperatorOptionFlag, MagickFalse },
715 { "-unique", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000716 { "+unique-colors", 0L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000717 { "-unique-colors", 0L, SimpleOperatorOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000718 { "+units", 0L, ImageInfoOptionFlag, MagickFalse },
719 { "-units", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000720 { "+unsharp", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000721 { "-unsharp", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000722 { "+update", 0L, NonMagickOptionFlag, MagickFalse },
723 { "-update", 1L, NonMagickOptionFlag, MagickFalse },
724 { "+use-pixmap", 0L, NonMagickOptionFlag, MagickFalse },
725 { "-use-pixmap", 1L, NonMagickOptionFlag, MagickFalse },
anthonyb0d52702011-05-02 03:34:24 +0000726 { "+verbose", 0L, ImageInfoOptionFlag, MagickFalse },
727 { "-verbose", 0L, ImageInfoOptionFlag, MagickFalse },
cristyc404ff62012-02-05 15:17:09 +0000728 { "+version", 0L, DeprecateOptionFlag, MagickTrue },
anthonye8f56492012-02-12 12:39:02 +0000729 { "-version", 0L, SpecialOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000730 { "+view", 0L, ImageInfoOptionFlag, MagickFalse },
731 { "-view", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000732 { "+vignette", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000733 { "-vignette", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthonyebb73a22012-03-22 14:25:52 +0000734 { "+virtual-pixel", 0L, ImageInfoOptionFlag, MagickFalse },
735 { "-virtual-pixel", 1L, ImageInfoOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000736 { "+visual", 0L, NonMagickOptionFlag, MagickFalse },
737 { "-visual", 1L, NonMagickOptionFlag, MagickFalse },
738 { "+watermark", 0L, NonMagickOptionFlag, MagickFalse },
739 { "-watermark", 1L, NonMagickOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000740 { "+wave", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000741 { "-wave", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000742 { "+weight", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000743 { "-weight", 1L, DrawInfoOptionFlag, MagickFalse },
anthonyde1a57f2011-05-02 09:45:30 +0000744 { "+white-point", 0L, ImageInfoOptionFlag, MagickFalse },
745 { "-white-point", 1L, ImageInfoOptionFlag, MagickFalse },
anthony72feaa62012-01-17 06:46:23 +0000746 { "+white-threshold", 1L, DeprecateOptionFlag, MagickTrue },
anthonyb0d52702011-05-02 03:34:24 +0000747 { "-white-threshold", 1L, SimpleOperatorOptionFlag, MagickFalse },
anthony668f43a2012-02-20 14:55:32 +0000748 { "+window", 0L, NonMagickOptionFlag, MagickFalse },
749 { "-window", 1L, NonMagickOptionFlag, MagickFalse },
750 { "+window-group", 0L, NonMagickOptionFlag, MagickFalse },
751 { "-window-group", 1L, NonMagickOptionFlag, MagickFalse },
anthony8226e722012-04-05 14:25:46 +0000752 { "+write", 1L, SpecialOptionFlag | FireOptionFlag, MagickFalse },
753 { "-write", 1L, SpecialOptionFlag | FireOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000754 { (char *) NULL, 0L, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000755 },
756 ComposeOptions[] =
757 {
cristy042ee782011-04-22 18:48:30 +0000758 { "Undefined", UndefinedCompositeOp, UndefinedOptionFlag, MagickTrue },
759 { "Atop", AtopCompositeOp, UndefinedOptionFlag, MagickFalse },
760 { "Blend", BlendCompositeOp, UndefinedOptionFlag, MagickFalse },
761 { "Blur", BlurCompositeOp, UndefinedOptionFlag, MagickFalse },
762 { "Bumpmap", BumpmapCompositeOp, UndefinedOptionFlag, MagickFalse },
763 { "ChangeMask", ChangeMaskCompositeOp, UndefinedOptionFlag, MagickFalse },
764 { "Clear", ClearCompositeOp, UndefinedOptionFlag, MagickFalse },
765 { "ColorBurn", ColorBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
766 { "ColorDodge", ColorDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
767 { "Colorize", ColorizeCompositeOp, UndefinedOptionFlag, MagickFalse },
cristye4a40472011-12-22 02:56:19 +0000768 { "CopyAlpha", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000769 { "CopyBlack", CopyBlackCompositeOp, UndefinedOptionFlag, MagickFalse },
770 { "CopyBlue", CopyBlueCompositeOp, UndefinedOptionFlag, MagickFalse },
771 { "CopyCyan", CopyCyanCompositeOp, UndefinedOptionFlag, MagickFalse },
772 { "CopyGreen", CopyGreenCompositeOp, UndefinedOptionFlag, MagickFalse },
773 { "Copy", CopyCompositeOp, UndefinedOptionFlag, MagickFalse },
774 { "CopyMagenta", CopyMagentaCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000775 { "CopyRed", CopyRedCompositeOp, UndefinedOptionFlag, MagickFalse },
776 { "CopyYellow", CopyYellowCompositeOp, UndefinedOptionFlag, MagickFalse },
777 { "Darken", DarkenCompositeOp, UndefinedOptionFlag, MagickFalse },
778 { "DarkenIntensity", DarkenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
779 { "DivideDst", DivideDstCompositeOp, UndefinedOptionFlag, MagickFalse },
780 { "DivideSrc", DivideSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
781 { "Dst", DstCompositeOp, UndefinedOptionFlag, MagickFalse },
782 { "Difference", DifferenceCompositeOp, UndefinedOptionFlag, MagickFalse },
783 { "Displace", DisplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
784 { "Dissolve", DissolveCompositeOp, UndefinedOptionFlag, MagickFalse },
785 { "Distort", DistortCompositeOp, UndefinedOptionFlag, MagickFalse },
786 { "DstAtop", DstAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
787 { "DstIn", DstInCompositeOp, UndefinedOptionFlag, MagickFalse },
788 { "DstOut", DstOutCompositeOp, UndefinedOptionFlag, MagickFalse },
789 { "DstOver", DstOverCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000790 { "Exclusion", ExclusionCompositeOp, UndefinedOptionFlag, MagickFalse },
791 { "HardLight", HardLightCompositeOp, UndefinedOptionFlag, MagickFalse },
792 { "Hue", HueCompositeOp, UndefinedOptionFlag, MagickFalse },
793 { "In", InCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy98621462011-12-31 22:31:11 +0000794 { "Intensity", IntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000795 { "Lighten", LightenCompositeOp, UndefinedOptionFlag, MagickFalse },
796 { "LightenIntensity", LightenIntensityCompositeOp, UndefinedOptionFlag, MagickFalse },
797 { "LinearBurn", LinearBurnCompositeOp, UndefinedOptionFlag, MagickFalse },
798 { "LinearDodge", LinearDodgeCompositeOp, UndefinedOptionFlag, MagickFalse },
799 { "LinearLight", LinearLightCompositeOp, UndefinedOptionFlag, MagickFalse },
800 { "Luminize", LuminizeCompositeOp, UndefinedOptionFlag, MagickFalse },
801 { "Mathematics", MathematicsCompositeOp, UndefinedOptionFlag, MagickFalse },
802 { "MinusDst", MinusDstCompositeOp, UndefinedOptionFlag, MagickFalse },
803 { "MinusSrc", MinusSrcCompositeOp, UndefinedOptionFlag, MagickFalse },
804 { "Modulate", ModulateCompositeOp, UndefinedOptionFlag, MagickFalse },
805 { "ModulusAdd", ModulusAddCompositeOp, UndefinedOptionFlag, MagickFalse },
806 { "ModulusSubtract", ModulusSubtractCompositeOp, UndefinedOptionFlag, MagickFalse },
807 { "Multiply", MultiplyCompositeOp, UndefinedOptionFlag, MagickFalse },
808 { "None", NoCompositeOp, UndefinedOptionFlag, MagickFalse },
809 { "Out", OutCompositeOp, UndefinedOptionFlag, MagickFalse },
810 { "Overlay", OverlayCompositeOp, UndefinedOptionFlag, MagickFalse },
811 { "Over", OverCompositeOp, UndefinedOptionFlag, MagickFalse },
812 { "PegtopLight", PegtopLightCompositeOp, UndefinedOptionFlag, MagickFalse },
813 { "PinLight", PinLightCompositeOp, UndefinedOptionFlag, MagickFalse },
814 { "Plus", PlusCompositeOp, UndefinedOptionFlag, MagickFalse },
815 { "Replace", ReplaceCompositeOp, UndefinedOptionFlag, MagickFalse },
816 { "Saturate", SaturateCompositeOp, UndefinedOptionFlag, MagickFalse },
817 { "Screen", ScreenCompositeOp, UndefinedOptionFlag, MagickFalse },
818 { "SoftLight", SoftLightCompositeOp, UndefinedOptionFlag, MagickFalse },
819 { "Src", SrcCompositeOp, UndefinedOptionFlag, MagickFalse },
820 { "SrcAtop", SrcAtopCompositeOp, UndefinedOptionFlag, MagickFalse },
821 { "SrcIn", SrcInCompositeOp, UndefinedOptionFlag, MagickFalse },
822 { "SrcOut", SrcOutCompositeOp, UndefinedOptionFlag, MagickFalse },
823 { "SrcOver", SrcOverCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000824 { "VividLight", VividLightCompositeOp, UndefinedOptionFlag, MagickFalse },
825 { "Xor", XorCompositeOp, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +0000826 { "Divide", DivideDstCompositeOp, DeprecateOptionFlag, MagickTrue },
827 { "Minus", MinusDstCompositeOp, DeprecateOptionFlag, MagickTrue },
cristy1df692a2011-04-23 17:09:35 +0000828 { "Threshold", ThresholdCompositeOp, DeprecateOptionFlag, MagickTrue },
anthonyea068a52012-04-09 05:46:25 +0000829 { "CopyOpacity", CopyAlphaCompositeOp, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000830 { (char *) NULL, UndefinedCompositeOp, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000831 },
832 CompressOptions[] =
833 {
cristy042ee782011-04-22 18:48:30 +0000834 { "Undefined", UndefinedCompression, UndefinedOptionFlag, MagickTrue },
835 { "B44", B44Compression, UndefinedOptionFlag, MagickFalse },
836 { "B44A", B44ACompression, UndefinedOptionFlag, MagickFalse },
837 { "BZip", BZipCompression, UndefinedOptionFlag, MagickFalse },
838 { "DXT1", DXT1Compression, UndefinedOptionFlag, MagickFalse },
839 { "DXT3", DXT3Compression, UndefinedOptionFlag, MagickFalse },
840 { "DXT5", DXT5Compression, UndefinedOptionFlag, MagickFalse },
841 { "Fax", FaxCompression, UndefinedOptionFlag, MagickFalse },
842 { "Group4", Group4Compression, UndefinedOptionFlag, MagickFalse },
cristy6d5e20f2011-04-25 13:48:54 +0000843 { "JBIG1", JBIG1Compression, UndefinedOptionFlag, MagickFalse },
844 { "JBIG2", JBIG2Compression, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000845 { "JPEG", JPEGCompression, UndefinedOptionFlag, MagickFalse },
846 { "JPEG2000", JPEG2000Compression, UndefinedOptionFlag, MagickFalse },
847 { "Lossless", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
848 { "LosslessJPEG", LosslessJPEGCompression, UndefinedOptionFlag, MagickFalse },
849 { "LZMA", LZMACompression, UndefinedOptionFlag, MagickFalse },
850 { "LZW", LZWCompression, UndefinedOptionFlag, MagickFalse },
851 { "None", NoCompression, UndefinedOptionFlag, MagickFalse },
852 { "Piz", PizCompression, UndefinedOptionFlag, MagickFalse },
853 { "Pxr24", Pxr24Compression, UndefinedOptionFlag, MagickFalse },
854 { "RLE", RLECompression, UndefinedOptionFlag, MagickFalse },
855 { "Zip", ZipCompression, UndefinedOptionFlag, MagickFalse },
856 { "RunlengthEncoded", RLECompression, UndefinedOptionFlag, MagickFalse },
857 { "ZipS", ZipSCompression, UndefinedOptionFlag, MagickFalse },
858 { (char *) NULL, UndefinedCompression, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000859 },
860 ColorspaceOptions[] =
861 {
cristy042ee782011-04-22 18:48:30 +0000862 { "Undefined", UndefinedColorspace, UndefinedOptionFlag, MagickTrue },
863 { "CMY", CMYColorspace, UndefinedOptionFlag, MagickFalse },
864 { "CMYK", CMYKColorspace, UndefinedOptionFlag, MagickFalse },
865 { "Gray", GRAYColorspace, UndefinedOptionFlag, MagickFalse },
866 { "HSB", HSBColorspace, UndefinedOptionFlag, MagickFalse },
867 { "HSL", HSLColorspace, UndefinedOptionFlag, MagickFalse },
868 { "HWB", HWBColorspace, UndefinedOptionFlag, MagickFalse },
869 { "Lab", LabColorspace, UndefinedOptionFlag, MagickFalse },
870 { "Log", LogColorspace, UndefinedOptionFlag, MagickFalse },
871 { "OHTA", OHTAColorspace, UndefinedOptionFlag, MagickFalse },
872 { "Rec601Luma", Rec601LumaColorspace, UndefinedOptionFlag, MagickFalse },
873 { "Rec601YCbCr", Rec601YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
874 { "Rec709Luma", Rec709LumaColorspace, UndefinedOptionFlag, MagickFalse },
875 { "Rec709YCbCr", Rec709YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
876 { "RGB", RGBColorspace, UndefinedOptionFlag, MagickFalse },
877 { "sRGB", sRGBColorspace, UndefinedOptionFlag, MagickFalse },
878 { "Transparent", TransparentColorspace, UndefinedOptionFlag, MagickFalse },
879 { "XYZ", XYZColorspace, UndefinedOptionFlag, MagickFalse },
880 { "YCbCr", YCbCrColorspace, UndefinedOptionFlag, MagickFalse },
881 { "YCC", YCCColorspace, UndefinedOptionFlag, MagickFalse },
882 { "YIQ", YIQColorspace, UndefinedOptionFlag, MagickFalse },
883 { "YPbPr", YPbPrColorspace, UndefinedOptionFlag, MagickFalse },
884 { "YUV", YUVColorspace, UndefinedOptionFlag, MagickFalse },
885 { (char *) NULL, UndefinedColorspace, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000886 },
887 DataTypeOptions[] =
888 {
cristy042ee782011-04-22 18:48:30 +0000889 { "Undefined", UndefinedData, UndefinedOptionFlag, MagickTrue },
890 { "Byte", ByteData, UndefinedOptionFlag, MagickFalse },
891 { "Long", LongData, UndefinedOptionFlag, MagickFalse },
892 { "Short", ShortData, UndefinedOptionFlag, MagickFalse },
893 { "String", StringData, UndefinedOptionFlag, MagickFalse },
894 { (char *) NULL, UndefinedData, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000895 },
896 DecorateOptions[] =
897 {
cristy042ee782011-04-22 18:48:30 +0000898 { "Undefined", UndefinedDecoration, UndefinedOptionFlag, MagickTrue },
899 { "LineThrough", LineThroughDecoration, UndefinedOptionFlag, MagickFalse },
900 { "None", NoDecoration, UndefinedOptionFlag, MagickFalse },
901 { "Overline", OverlineDecoration, UndefinedOptionFlag, MagickFalse },
902 { "Underline", UnderlineDecoration, UndefinedOptionFlag, MagickFalse },
903 { (char *) NULL, UndefinedDecoration, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000904 },
cristyc9b12952010-03-28 01:12:28 +0000905 DirectionOptions[] =
906 {
cristy042ee782011-04-22 18:48:30 +0000907 { "Undefined", UndefinedDirection, UndefinedOptionFlag, MagickTrue },
908 { "right-to-left", RightToLeftDirection, UndefinedOptionFlag, MagickFalse },
909 { "left-to-right", LeftToRightDirection, UndefinedOptionFlag, MagickFalse },
910 { (char *) NULL, UndefinedDirection, UndefinedOptionFlag, MagickFalse }
cristyc9b12952010-03-28 01:12:28 +0000911 },
cristy3ed852e2009-09-05 21:47:34 +0000912 DisposeOptions[] =
913 {
cristy042ee782011-04-22 18:48:30 +0000914 { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickTrue },
915 { "Background", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
916 { "None", NoneDispose, UndefinedOptionFlag, MagickFalse },
917 { "Previous", PreviousDispose, UndefinedOptionFlag, MagickFalse },
918 { "Undefined", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
919 { "0", UndefinedDispose, UndefinedOptionFlag, MagickFalse },
920 { "1", NoneDispose, UndefinedOptionFlag, MagickFalse },
921 { "2", BackgroundDispose, UndefinedOptionFlag, MagickFalse },
922 { "3", PreviousDispose, UndefinedOptionFlag, MagickFalse },
923 { (char *) NULL, UndefinedDispose, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000924 },
925 DistortOptions[] =
926 {
cristy042ee782011-04-22 18:48:30 +0000927 { "Affine", AffineDistortion, UndefinedOptionFlag, MagickFalse },
928 { "AffineProjection", AffineProjectionDistortion, UndefinedOptionFlag, MagickFalse },
929 { "ScaleRotateTranslate", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
930 { "SRT", ScaleRotateTranslateDistortion, UndefinedOptionFlag, MagickFalse },
931 { "Perspective", PerspectiveDistortion, UndefinedOptionFlag, MagickFalse },
932 { "PerspectiveProjection", PerspectiveProjectionDistortion, UndefinedOptionFlag, MagickFalse },
933 { "Bilinear", BilinearForwardDistortion, UndefinedOptionFlag, MagickTrue },
934 { "BilinearForward", BilinearForwardDistortion, UndefinedOptionFlag, MagickFalse },
935 { "BilinearReverse", BilinearReverseDistortion, UndefinedOptionFlag, MagickFalse },
936 { "Polynomial", PolynomialDistortion, UndefinedOptionFlag, MagickFalse },
937 { "Arc", ArcDistortion, UndefinedOptionFlag, MagickFalse },
938 { "Polar", PolarDistortion, UndefinedOptionFlag, MagickFalse },
939 { "DePolar", DePolarDistortion, UndefinedOptionFlag, MagickFalse },
940 { "Barrel", BarrelDistortion, UndefinedOptionFlag, MagickFalse },
anthonye0d9bbd2011-06-15 01:05:57 +0000941 { "Cylinder2Plane", Cylinder2PlaneDistortion, UndefinedOptionFlag, MagickTrue },
942 { "Plane2Cylinder", Plane2CylinderDistortion, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +0000943 { "BarrelInverse", BarrelInverseDistortion, UndefinedOptionFlag, MagickFalse },
944 { "Shepards", ShepardsDistortion, UndefinedOptionFlag, MagickFalse },
945 { "Resize", ResizeDistortion, UndefinedOptionFlag, MagickFalse },
946 { (char *) NULL, UndefinedDistortion, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000947 },
948 DitherOptions[] =
949 {
cristy042ee782011-04-22 18:48:30 +0000950 { "Undefined", UndefinedDitherMethod, UndefinedOptionFlag, MagickTrue },
951 { "None", NoDitherMethod, UndefinedOptionFlag, MagickFalse },
952 { "FloydSteinberg", FloydSteinbergDitherMethod, UndefinedOptionFlag, MagickFalse },
953 { "Riemersma", RiemersmaDitherMethod, UndefinedOptionFlag, MagickFalse },
954 { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000955 },
956 EndianOptions[] =
957 {
cristy042ee782011-04-22 18:48:30 +0000958 { "Undefined", UndefinedEndian, UndefinedOptionFlag, MagickTrue },
959 { "LSB", LSBEndian, UndefinedOptionFlag, MagickFalse },
960 { "MSB", MSBEndian, UndefinedOptionFlag, MagickFalse },
961 { (char *) NULL, UndefinedEndian, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +0000962 },
963 EvaluateOptions[] =
964 {
cristy042ee782011-04-22 18:48:30 +0000965 { "Undefined", UndefinedEvaluateOperator, UndefinedOptionFlag, MagickTrue },
966 { "Abs", AbsEvaluateOperator, UndefinedOptionFlag, MagickFalse },
967 { "Add", AddEvaluateOperator, UndefinedOptionFlag, MagickFalse },
968 { "AddModulus", AddModulusEvaluateOperator, UndefinedOptionFlag, MagickFalse },
969 { "And", AndEvaluateOperator, UndefinedOptionFlag, MagickFalse },
970 { "Cos", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
971 { "Cosine", CosineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
972 { "Divide", DivideEvaluateOperator, UndefinedOptionFlag, MagickFalse },
973 { "Exp", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
974 { "Exponential", ExponentialEvaluateOperator, UndefinedOptionFlag, MagickFalse },
975 { "GaussianNoise", GaussianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
976 { "ImpulseNoise", ImpulseNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
977 { "LaplacianNoise", LaplacianNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
978 { "LeftShift", LeftShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
979 { "Log", LogEvaluateOperator, UndefinedOptionFlag, MagickFalse },
980 { "Max", MaxEvaluateOperator, UndefinedOptionFlag, MagickFalse },
981 { "Mean", MeanEvaluateOperator, UndefinedOptionFlag, MagickFalse },
982 { "Median", MedianEvaluateOperator, UndefinedOptionFlag, MagickFalse },
983 { "Min", MinEvaluateOperator, UndefinedOptionFlag, MagickFalse },
984 { "MultiplicativeNoise", MultiplicativeNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
985 { "Multiply", MultiplyEvaluateOperator, UndefinedOptionFlag, MagickFalse },
986 { "Or", OrEvaluateOperator, UndefinedOptionFlag, MagickFalse },
987 { "PoissonNoise", PoissonNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
988 { "Pow", PowEvaluateOperator, UndefinedOptionFlag, MagickFalse },
989 { "RightShift", RightShiftEvaluateOperator, UndefinedOptionFlag, MagickFalse },
990 { "Set", SetEvaluateOperator, UndefinedOptionFlag, MagickFalse },
991 { "Sin", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
992 { "Sine", SineEvaluateOperator, UndefinedOptionFlag, MagickFalse },
993 { "Subtract", SubtractEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy12a3f8e2012-01-31 01:53:19 +0000994 { "Sum", SumEvaluateOperator, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +0000995 { "Threshold", ThresholdEvaluateOperator, UndefinedOptionFlag, MagickFalse },
996 { "ThresholdBlack", ThresholdBlackEvaluateOperator, UndefinedOptionFlag, MagickFalse },
997 { "ThresholdWhite", ThresholdWhiteEvaluateOperator, UndefinedOptionFlag, MagickFalse },
998 { "UniformNoise", UniformNoiseEvaluateOperator, UndefinedOptionFlag, MagickFalse },
999 { "Xor", XorEvaluateOperator, UndefinedOptionFlag, MagickFalse },
1000 { (char *) NULL, UndefinedEvaluateOperator, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001001 },
1002 FillRuleOptions[] =
1003 {
cristy042ee782011-04-22 18:48:30 +00001004 { "Undefined", UndefinedRule, UndefinedOptionFlag, MagickTrue },
1005 { "Evenodd", EvenOddRule, UndefinedOptionFlag, MagickFalse },
1006 { "NonZero", NonZeroRule, UndefinedOptionFlag, MagickFalse },
1007 { (char *) NULL, UndefinedRule, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001008 },
1009 FilterOptions[] =
1010 {
cristy042ee782011-04-22 18:48:30 +00001011 { "Undefined", UndefinedFilter, UndefinedOptionFlag, MagickTrue },
1012 { "Bartlett", BartlettFilter, UndefinedOptionFlag, MagickFalse },
1013 { "Blackman", BlackmanFilter, UndefinedOptionFlag, MagickFalse },
1014 { "Bohman", BohmanFilter, UndefinedOptionFlag, MagickFalse },
1015 { "Box", BoxFilter, UndefinedOptionFlag, MagickFalse },
1016 { "Catrom", CatromFilter, UndefinedOptionFlag, MagickFalse },
1017 { "Cubic", CubicFilter, UndefinedOptionFlag, MagickFalse },
1018 { "Gaussian", GaussianFilter, UndefinedOptionFlag, MagickFalse },
1019 { "Hamming", HammingFilter, UndefinedOptionFlag, MagickFalse },
1020 { "Hanning", HanningFilter, UndefinedOptionFlag, MagickFalse },
1021 { "Hermite", HermiteFilter, UndefinedOptionFlag, MagickFalse },
1022 { "Jinc", JincFilter, UndefinedOptionFlag, MagickFalse },
1023 { "Kaiser", KaiserFilter, UndefinedOptionFlag, MagickFalse },
1024 { "Lagrange", LagrangeFilter, UndefinedOptionFlag, MagickFalse },
1025 { "Lanczos", LanczosFilter, UndefinedOptionFlag, MagickFalse },
1026 { "LanczosSharp", LanczosSharpFilter, UndefinedOptionFlag, MagickFalse },
1027 { "Lanczos2", Lanczos2Filter, UndefinedOptionFlag, MagickFalse },
1028 { "Lanczos2Sharp", Lanczos2SharpFilter, UndefinedOptionFlag, MagickFalse },
1029 { "Mitchell", MitchellFilter, UndefinedOptionFlag, MagickFalse },
1030 { "Parzen", ParzenFilter, UndefinedOptionFlag, MagickFalse },
1031 { "Point", PointFilter, UndefinedOptionFlag, MagickFalse },
1032 { "Quadratic", QuadraticFilter, UndefinedOptionFlag, MagickFalse },
1033 { "Robidoux", RobidouxFilter, UndefinedOptionFlag, MagickFalse },
1034 { "Sinc", SincFilter, UndefinedOptionFlag, MagickFalse },
1035 { "SincFast", SincFastFilter, UndefinedOptionFlag, MagickFalse },
1036 { "Triangle", TriangleFilter, UndefinedOptionFlag, MagickFalse },
1037 { "Welsh", WelshFilter, UndefinedOptionFlag, MagickFalse },
anthony06b1edf2010-10-25 01:19:50 +00001038 /* For backward compatibility - must be after "Jinc" */
cristy042ee782011-04-22 18:48:30 +00001039 { "Bessel", JincFilter, UndefinedOptionFlag, MagickTrue },
1040 { (char *) NULL, UndefinedFilter, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001041 },
1042 FunctionOptions[] =
1043 {
cristy042ee782011-04-22 18:48:30 +00001044 { "Undefined", UndefinedFunction, UndefinedOptionFlag, MagickTrue },
1045 { "Polynomial", PolynomialFunction, UndefinedOptionFlag, MagickFalse },
1046 { "Sinusoid", SinusoidFunction, UndefinedOptionFlag, MagickFalse },
1047 { "ArcSin", ArcsinFunction, UndefinedOptionFlag, MagickFalse },
1048 { "ArcTan", ArctanFunction, UndefinedOptionFlag, MagickFalse },
1049 { (char *) NULL, UndefinedFunction, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001050 },
1051 GravityOptions[] =
1052 {
cristy042ee782011-04-22 18:48:30 +00001053 { "Undefined", UndefinedGravity, UndefinedOptionFlag, MagickTrue },
1054 { "None", UndefinedGravity, UndefinedOptionFlag, MagickFalse },
1055 { "Center", CenterGravity, UndefinedOptionFlag, MagickFalse },
1056 { "East", EastGravity, UndefinedOptionFlag, MagickFalse },
1057 { "Forget", ForgetGravity, UndefinedOptionFlag, MagickFalse },
1058 { "NorthEast", NorthEastGravity, UndefinedOptionFlag, MagickFalse },
1059 { "North", NorthGravity, UndefinedOptionFlag, MagickFalse },
1060 { "NorthWest", NorthWestGravity, UndefinedOptionFlag, MagickFalse },
1061 { "SouthEast", SouthEastGravity, UndefinedOptionFlag, MagickFalse },
1062 { "South", SouthGravity, UndefinedOptionFlag, MagickFalse },
1063 { "SouthWest", SouthWestGravity, UndefinedOptionFlag, MagickFalse },
1064 { "West", WestGravity, UndefinedOptionFlag, MagickFalse },
1065 { "Static", StaticGravity, UndefinedOptionFlag, MagickFalse },
1066 { (char *) NULL, UndefinedGravity, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001067 },
cristy3ed852e2009-09-05 21:47:34 +00001068 IntentOptions[] =
1069 {
cristy042ee782011-04-22 18:48:30 +00001070 { "Undefined", UndefinedIntent, UndefinedOptionFlag, MagickTrue },
1071 { "Absolute", AbsoluteIntent, UndefinedOptionFlag, MagickFalse },
1072 { "Perceptual", PerceptualIntent, UndefinedOptionFlag, MagickFalse },
1073 { "Relative", RelativeIntent, UndefinedOptionFlag, MagickFalse },
1074 { "Saturation", SaturationIntent, UndefinedOptionFlag, MagickFalse },
1075 { (char *) NULL, UndefinedIntent, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001076 },
1077 InterlaceOptions[] =
1078 {
cristy042ee782011-04-22 18:48:30 +00001079 { "Undefined", UndefinedInterlace, UndefinedOptionFlag, MagickTrue },
1080 { "Line", LineInterlace, UndefinedOptionFlag, MagickFalse },
1081 { "None", NoInterlace, UndefinedOptionFlag, MagickFalse },
1082 { "Plane", PlaneInterlace, UndefinedOptionFlag, MagickFalse },
1083 { "Partition", PartitionInterlace, UndefinedOptionFlag, MagickFalse },
1084 { "GIF", GIFInterlace, UndefinedOptionFlag, MagickFalse },
1085 { "JPEG", JPEGInterlace, UndefinedOptionFlag, MagickFalse },
1086 { "PNG", PNGInterlace, UndefinedOptionFlag, MagickFalse },
1087 { (char *) NULL, UndefinedInterlace, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001088 },
1089 InterpolateOptions[] =
1090 {
cristy042ee782011-04-22 18:48:30 +00001091 { "Undefined", UndefinedInterpolatePixel, UndefinedOptionFlag, MagickTrue },
1092 { "Average", AverageInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1093 { "Bicubic", BicubicInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1094 { "Bilinear", BilinearInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1095 { "filter", FilterInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1096 { "Integer", IntegerInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1097 { "Mesh", MeshInterpolatePixel, UndefinedOptionFlag, MagickFalse },
anthonyf46d4262012-03-26 03:30:34 +00001098 { "Nearest", NearestNeighborInterpolatePixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001099 { "NearestNeighbor", NearestNeighborInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1100 { "Spline", SplineInterpolatePixel, UndefinedOptionFlag, MagickFalse },
1101 { (char *) NULL, UndefinedInterpolatePixel, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001102 },
anthony602ab9b2010-01-05 08:06:50 +00001103 KernelOptions[] =
1104 {
cristy042ee782011-04-22 18:48:30 +00001105 { "Undefined", UndefinedKernel, UndefinedOptionFlag, MagickTrue },
1106 { "Unity", UnityKernel, UndefinedOptionFlag, MagickFalse },
1107 { "Gaussian", GaussianKernel, UndefinedOptionFlag, MagickFalse },
1108 { "DoG", DoGKernel, UndefinedOptionFlag, MagickFalse },
1109 { "LoG", LoGKernel, UndefinedOptionFlag, MagickFalse },
1110 { "Blur", BlurKernel, UndefinedOptionFlag, MagickFalse },
1111 { "Comet", CometKernel, UndefinedOptionFlag, MagickFalse },
1112 { "Laplacian", LaplacianKernel, UndefinedOptionFlag, MagickFalse },
1113 { "Sobel", SobelKernel, UndefinedOptionFlag, MagickFalse },
1114 { "FreiChen", FreiChenKernel, UndefinedOptionFlag, MagickFalse },
1115 { "Roberts", RobertsKernel, UndefinedOptionFlag, MagickFalse },
1116 { "Prewitt", PrewittKernel, UndefinedOptionFlag, MagickFalse },
1117 { "Compass", CompassKernel, UndefinedOptionFlag, MagickFalse },
1118 { "Kirsch", KirschKernel, UndefinedOptionFlag, MagickFalse },
1119 { "Diamond", DiamondKernel, UndefinedOptionFlag, MagickFalse },
1120 { "Square", SquareKernel, UndefinedOptionFlag, MagickFalse },
1121 { "Rectangle", RectangleKernel, UndefinedOptionFlag, MagickFalse },
1122 { "Disk", DiskKernel, UndefinedOptionFlag, MagickFalse },
1123 { "Octagon", OctagonKernel, UndefinedOptionFlag, MagickFalse },
1124 { "Plus", PlusKernel, UndefinedOptionFlag, MagickFalse },
1125 { "Cross", CrossKernel, UndefinedOptionFlag, MagickFalse },
1126 { "Ring", RingKernel, UndefinedOptionFlag, MagickFalse },
1127 { "Peaks", PeaksKernel, UndefinedOptionFlag, MagickFalse },
1128 { "Edges", EdgesKernel, UndefinedOptionFlag, MagickFalse },
1129 { "Corners", CornersKernel, UndefinedOptionFlag, MagickFalse },
1130 { "Diagonals", DiagonalsKernel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +00001131 { "ThinDiagonals", DiagonalsKernel, DeprecateOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001132 { "LineEnds", LineEndsKernel, UndefinedOptionFlag, MagickFalse },
1133 { "LineJunctions", LineJunctionsKernel, UndefinedOptionFlag, MagickFalse },
1134 { "Ridges", RidgesKernel, UndefinedOptionFlag, MagickFalse },
1135 { "ConvexHull", ConvexHullKernel, UndefinedOptionFlag, MagickFalse },
1136 { "ThinSe", ThinSEKernel, UndefinedOptionFlag, MagickFalse },
1137 { "Skeleton", SkeletonKernel, UndefinedOptionFlag, MagickFalse },
1138 { "Chebyshev", ChebyshevKernel, UndefinedOptionFlag, MagickFalse },
1139 { "Manhattan", ManhattanKernel, UndefinedOptionFlag, MagickFalse },
1140 { "Octagonal", OctagonalKernel, UndefinedOptionFlag, MagickFalse },
1141 { "Euclidean", EuclideanKernel, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +00001142 { "User Defined", UserDefinedKernel, UndefinedOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001143 { (char *) NULL, UndefinedKernel, UndefinedOptionFlag, MagickFalse }
anthony602ab9b2010-01-05 08:06:50 +00001144 },
cristy3ed852e2009-09-05 21:47:34 +00001145 LayerOptions[] =
1146 {
cristy042ee782011-04-22 18:48:30 +00001147 { "Undefined", UndefinedLayer, UndefinedOptionFlag, MagickTrue },
1148 { "Coalesce", CoalesceLayer, UndefinedOptionFlag, MagickFalse },
1149 { "CompareAny", CompareAnyLayer, UndefinedOptionFlag, MagickFalse },
1150 { "CompareClear", CompareClearLayer, UndefinedOptionFlag, MagickFalse },
1151 { "CompareOverlay", CompareOverlayLayer, UndefinedOptionFlag, MagickFalse },
1152 { "Dispose", DisposeLayer, UndefinedOptionFlag, MagickFalse },
1153 { "Optimize", OptimizeLayer, UndefinedOptionFlag, MagickFalse },
1154 { "OptimizeFrame", OptimizeImageLayer, UndefinedOptionFlag, MagickFalse },
1155 { "OptimizePlus", OptimizePlusLayer, UndefinedOptionFlag, MagickFalse },
1156 { "OptimizeTransparency", OptimizeTransLayer, UndefinedOptionFlag, MagickFalse },
1157 { "RemoveDups", RemoveDupsLayer, UndefinedOptionFlag, MagickFalse },
1158 { "RemoveZero", RemoveZeroLayer, UndefinedOptionFlag, MagickFalse },
1159 { "Composite", CompositeLayer, UndefinedOptionFlag, MagickFalse },
1160 { "Merge", MergeLayer, UndefinedOptionFlag, MagickFalse },
1161 { "Flatten", FlattenLayer, UndefinedOptionFlag, MagickFalse },
1162 { "Mosaic", MosaicLayer, UndefinedOptionFlag, MagickFalse },
1163 { "TrimBounds", TrimBoundsLayer, UndefinedOptionFlag, MagickFalse },
1164 { (char *) NULL, UndefinedLayer, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001165 },
1166 LineCapOptions[] =
1167 {
cristy042ee782011-04-22 18:48:30 +00001168 { "Undefined", UndefinedCap, UndefinedOptionFlag, MagickTrue },
1169 { "Butt", ButtCap, UndefinedOptionFlag, MagickFalse },
1170 { "Round", RoundCap, UndefinedOptionFlag, MagickFalse },
1171 { "Square", SquareCap, UndefinedOptionFlag, MagickFalse },
1172 { (char *) NULL, UndefinedCap, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001173 },
1174 LineJoinOptions[] =
1175 {
cristy042ee782011-04-22 18:48:30 +00001176 { "Undefined", UndefinedJoin, UndefinedOptionFlag, MagickTrue },
1177 { "Bevel", BevelJoin, UndefinedOptionFlag, MagickFalse },
1178 { "Miter", MiterJoin, UndefinedOptionFlag, MagickFalse },
1179 { "Round", RoundJoin, UndefinedOptionFlag, MagickFalse },
1180 { (char *) NULL, UndefinedJoin, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001181 },
1182 ListOptions[] =
1183 {
cristy042ee782011-04-22 18:48:30 +00001184 { "Align", MagickAlignOptions, UndefinedOptionFlag, MagickFalse },
1185 { "Alpha", MagickAlphaOptions, UndefinedOptionFlag, MagickFalse },
1186 { "Boolean", MagickBooleanOptions, UndefinedOptionFlag, MagickFalse },
1187 { "Channel", MagickChannelOptions, UndefinedOptionFlag, MagickFalse },
1188 { "Class", MagickClassOptions, UndefinedOptionFlag, MagickFalse },
1189 { "ClipPath", MagickClipPathOptions, UndefinedOptionFlag, MagickFalse },
1190 { "Coder", MagickCoderOptions, UndefinedOptionFlag, MagickFalse },
1191 { "Color", MagickColorOptions, UndefinedOptionFlag, MagickFalse },
1192 { "Colorspace", MagickColorspaceOptions, UndefinedOptionFlag, MagickFalse },
1193 { "Command", MagickCommandOptions, UndefinedOptionFlag, MagickFalse },
1194 { "Compose", MagickComposeOptions, UndefinedOptionFlag, MagickFalse },
1195 { "Compress", MagickCompressOptions, UndefinedOptionFlag, MagickFalse },
1196 { "Configure", MagickConfigureOptions, UndefinedOptionFlag, MagickFalse },
1197 { "DataType", MagickDataTypeOptions, UndefinedOptionFlag, MagickFalse },
1198 { "Debug", MagickDebugOptions, UndefinedOptionFlag, MagickFalse },
1199 { "Decoration", MagickDecorateOptions, UndefinedOptionFlag, MagickFalse },
1200 { "Delegate", MagickDelegateOptions, UndefinedOptionFlag, MagickFalse },
1201 { "Direction", MagickDirectionOptions, UndefinedOptionFlag, MagickFalse },
1202 { "Dispose", MagickDisposeOptions, UndefinedOptionFlag, MagickFalse },
1203 { "Distort", MagickDistortOptions, UndefinedOptionFlag, MagickFalse },
1204 { "Dither", MagickDitherOptions, UndefinedOptionFlag, MagickFalse },
1205 { "Endian", MagickEndianOptions, UndefinedOptionFlag, MagickFalse },
1206 { "Evaluate", MagickEvaluateOptions, UndefinedOptionFlag, MagickFalse },
1207 { "FillRule", MagickFillRuleOptions, UndefinedOptionFlag, MagickFalse },
1208 { "Filter", MagickFilterOptions, UndefinedOptionFlag, MagickFalse },
1209 { "Font", MagickFontOptions, UndefinedOptionFlag, MagickFalse },
1210 { "Format", MagickFormatOptions, UndefinedOptionFlag, MagickFalse },
1211 { "Function", MagickFunctionOptions, UndefinedOptionFlag, MagickFalse },
1212 { "Gravity", MagickGravityOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001213 { "Intent", MagickIntentOptions, UndefinedOptionFlag, MagickFalse },
1214 { "Interlace", MagickInterlaceOptions, UndefinedOptionFlag, MagickFalse },
1215 { "Interpolate", MagickInterpolateOptions, UndefinedOptionFlag, MagickFalse },
1216 { "Kernel", MagickKernelOptions, UndefinedOptionFlag, MagickFalse },
1217 { "Layers", MagickLayerOptions, UndefinedOptionFlag, MagickFalse },
1218 { "LineCap", MagickLineCapOptions, UndefinedOptionFlag, MagickFalse },
1219 { "LineJoin", MagickLineJoinOptions, UndefinedOptionFlag, MagickFalse },
1220 { "List", MagickListOptions, UndefinedOptionFlag, MagickFalse },
1221 { "Locale", MagickLocaleOptions, UndefinedOptionFlag, MagickFalse },
1222 { "LogEvent", MagickLogEventOptions, UndefinedOptionFlag, MagickFalse },
1223 { "Log", MagickLogOptions, UndefinedOptionFlag, MagickFalse },
1224 { "Magic", MagickMagicOptions, UndefinedOptionFlag, MagickFalse },
1225 { "Method", MagickMethodOptions, UndefinedOptionFlag, MagickFalse },
1226 { "Metric", MagickMetricOptions, UndefinedOptionFlag, MagickFalse },
1227 { "Mime", MagickMimeOptions, UndefinedOptionFlag, MagickFalse },
1228 { "Mode", MagickModeOptions, UndefinedOptionFlag, MagickFalse },
1229 { "Morphology", MagickMorphologyOptions, UndefinedOptionFlag, MagickFalse },
1230 { "Module", MagickModuleOptions, UndefinedOptionFlag, MagickFalse },
1231 { "Noise", MagickNoiseOptions, UndefinedOptionFlag, MagickFalse },
1232 { "Orientation", MagickOrientationOptions, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001233 { "PixelChannel", MagickPixelChannelOptions, UndefinedOptionFlag, MagickFalse },
1234 { "PixelTrait", MagickPixelTraitOptions, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001235 { "Policy", MagickPolicyOptions, UndefinedOptionFlag, MagickFalse },
1236 { "PolicyDomain", MagickPolicyDomainOptions, UndefinedOptionFlag, MagickFalse },
1237 { "PolicyRights", MagickPolicyRightsOptions, UndefinedOptionFlag, MagickFalse },
1238 { "Preview", MagickPreviewOptions, UndefinedOptionFlag, MagickFalse },
1239 { "Primitive", MagickPrimitiveOptions, UndefinedOptionFlag, MagickFalse },
1240 { "QuantumFormat", MagickQuantumFormatOptions, UndefinedOptionFlag, MagickFalse },
1241 { "Resource", MagickResourceOptions, UndefinedOptionFlag, MagickFalse },
1242 { "SparseColor", MagickSparseColorOptions, UndefinedOptionFlag, MagickFalse },
1243 { "Statistic", MagickStatisticOptions, UndefinedOptionFlag, MagickFalse },
1244 { "Storage", MagickStorageOptions, UndefinedOptionFlag, MagickFalse },
1245 { "Stretch", MagickStretchOptions, UndefinedOptionFlag, MagickFalse },
1246 { "Style", MagickStyleOptions, UndefinedOptionFlag, MagickFalse },
1247 { "Threshold", MagickThresholdOptions, UndefinedOptionFlag, MagickFalse },
1248 { "Type", MagickTypeOptions, UndefinedOptionFlag, MagickFalse },
1249 { "Units", MagickResolutionOptions, UndefinedOptionFlag, MagickFalse },
1250 { "Undefined", MagickUndefinedOptions, UndefinedOptionFlag, MagickTrue },
1251 { "Validate", MagickValidateOptions, UndefinedOptionFlag, MagickFalse },
1252 { "VirtualPixel", MagickVirtualPixelOptions, UndefinedOptionFlag, MagickFalse },
1253 { (char *) NULL, MagickUndefinedOptions, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001254 },
1255 LogEventOptions[] =
1256 {
cristy042ee782011-04-22 18:48:30 +00001257 { "Undefined", UndefinedEvents, UndefinedOptionFlag, MagickTrue },
1258 { "All", (AllEvents &~ TraceEvent), UndefinedOptionFlag, MagickFalse },
cristy68b14972011-10-26 14:54:58 +00001259 { "Accelerate", AccelerateEvent, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001260 { "Annotate", AnnotateEvent, UndefinedOptionFlag, MagickFalse },
1261 { "Blob", BlobEvent, UndefinedOptionFlag, MagickFalse },
1262 { "Cache", CacheEvent, UndefinedOptionFlag, MagickFalse },
1263 { "Coder", CoderEvent, UndefinedOptionFlag, MagickFalse },
1264 { "Configure", ConfigureEvent, UndefinedOptionFlag, MagickFalse },
1265 { "Deprecate", DeprecateEvent, UndefinedOptionFlag, MagickFalse },
1266 { "Draw", DrawEvent, UndefinedOptionFlag, MagickFalse },
1267 { "Exception", ExceptionEvent, UndefinedOptionFlag, MagickFalse },
1268 { "Locale", LocaleEvent, UndefinedOptionFlag, MagickFalse },
1269 { "Module", ModuleEvent, UndefinedOptionFlag, MagickFalse },
1270 { "None", NoEvents, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001271 { "Pixel", PixelEvent, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001272 { "Policy", PolicyEvent, UndefinedOptionFlag, MagickFalse },
1273 { "Resource", ResourceEvent, UndefinedOptionFlag, MagickFalse },
1274 { "Trace", TraceEvent, UndefinedOptionFlag, MagickFalse },
1275 { "Transform", TransformEvent, UndefinedOptionFlag, MagickFalse },
1276 { "User", UserEvent, UndefinedOptionFlag, MagickFalse },
1277 { "Wand", WandEvent, UndefinedOptionFlag, MagickFalse },
1278 { "X11", X11Event, UndefinedOptionFlag, MagickFalse },
1279 { (char *) NULL, UndefinedEvents, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001280 },
1281 MetricOptions[] =
1282 {
cristy042ee782011-04-22 18:48:30 +00001283 { "Undefined", UndefinedMetric, UndefinedOptionFlag, MagickTrue },
1284 { "AE", AbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1285 { "Fuzz", FuzzErrorMetric, UndefinedOptionFlag, MagickFalse },
1286 { "MAE", MeanAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1287 { "MEPP", MeanErrorPerPixelMetric, UndefinedOptionFlag, MagickFalse },
1288 { "MSE", MeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1289 { "NCC", NormalizedCrossCorrelationErrorMetric, UndefinedOptionFlag, MagickFalse },
1290 { "PAE", PeakAbsoluteErrorMetric, UndefinedOptionFlag, MagickFalse },
1291 { "PSNR", PeakSignalToNoiseRatioMetric, UndefinedOptionFlag, MagickFalse },
1292 { "RMSE", RootMeanSquaredErrorMetric, UndefinedOptionFlag, MagickFalse },
1293 { (char *) NULL, UndefinedMetric, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001294 },
1295 MethodOptions[] =
1296 {
cristy042ee782011-04-22 18:48:30 +00001297 { "Undefined", UndefinedMethod, UndefinedOptionFlag, MagickTrue },
1298 { "FillToBorder", FillToBorderMethod, UndefinedOptionFlag, MagickFalse },
1299 { "Floodfill", FloodfillMethod, UndefinedOptionFlag, MagickFalse },
1300 { "Point", PointMethod, UndefinedOptionFlag, MagickFalse },
1301 { "Replace", ReplaceMethod, UndefinedOptionFlag, MagickFalse },
1302 { "Reset", ResetMethod, UndefinedOptionFlag, MagickFalse },
1303 { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001304 },
1305 ModeOptions[] =
1306 {
cristy042ee782011-04-22 18:48:30 +00001307 { "Undefined", UndefinedMode, UndefinedOptionFlag, MagickTrue },
1308 { "Concatenate", ConcatenateMode, UndefinedOptionFlag, MagickFalse },
1309 { "Frame", FrameMode, UndefinedOptionFlag, MagickFalse },
1310 { "Unframe", UnframeMode, UndefinedOptionFlag, MagickFalse },
1311 { (char *) NULL, UndefinedMode, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001312 },
anthony602ab9b2010-01-05 08:06:50 +00001313 MorphologyOptions[] =
1314 {
cristy042ee782011-04-22 18:48:30 +00001315 { "Undefined", UndefinedMorphology, UndefinedOptionFlag, MagickTrue },
1316 { "Correlate", CorrelateMorphology, UndefinedOptionFlag, MagickFalse },
1317 { "Convolve", ConvolveMorphology, UndefinedOptionFlag, MagickFalse },
1318 { "Dilate", DilateMorphology, UndefinedOptionFlag, MagickFalse },
1319 { "Erode", ErodeMorphology, UndefinedOptionFlag, MagickFalse },
1320 { "Close", CloseMorphology, UndefinedOptionFlag, MagickFalse },
1321 { "Open", OpenMorphology, UndefinedOptionFlag, MagickFalse },
1322 { "DilateIntensity", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1323 { "ErodeIntensity", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1324 { "CloseIntensity", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1325 { "OpenIntensity", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1326 { "DilateI", DilateIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1327 { "ErodeI", ErodeIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1328 { "CloseI", CloseIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1329 { "OpenI", OpenIntensityMorphology, UndefinedOptionFlag, MagickFalse },
1330 { "Smooth", SmoothMorphology, UndefinedOptionFlag, MagickFalse },
1331 { "EdgeOut", EdgeOutMorphology, UndefinedOptionFlag, MagickFalse },
1332 { "EdgeIn", EdgeInMorphology, UndefinedOptionFlag, MagickFalse },
1333 { "Edge", EdgeMorphology, UndefinedOptionFlag, MagickFalse },
1334 { "TopHat", TopHatMorphology, UndefinedOptionFlag, MagickFalse },
1335 { "BottomHat", BottomHatMorphology, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001336 { "Hmt", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1337 { "HitNMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1338 { "HitAndMiss", HitAndMissMorphology, UndefinedOptionFlag, MagickFalse },
1339 { "Thinning", ThinningMorphology, UndefinedOptionFlag, MagickFalse },
1340 { "Thicken", ThickenMorphology, UndefinedOptionFlag, MagickFalse },
anthonyf34d9b22012-02-22 06:11:08 +00001341 { "Distance", DistanceMorphology, UndefinedOptionFlag, MagickFalse },
1342 { "IterativeDistance", IterativeDistanceMorphology, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001343 { "Voronoi", VoronoiMorphology, UndefinedOptionFlag, MagickTrue },
1344 { (char *) NULL, UndefinedMorphology, UndefinedOptionFlag, MagickFalse }
anthony602ab9b2010-01-05 08:06:50 +00001345 },
cristy3ed852e2009-09-05 21:47:34 +00001346 NoiseOptions[] =
1347 {
cristy042ee782011-04-22 18:48:30 +00001348 { "Undefined", UndefinedNoise, UndefinedOptionFlag, MagickTrue },
1349 { "Gaussian", GaussianNoise, UndefinedOptionFlag, MagickFalse },
1350 { "Impulse", ImpulseNoise, UndefinedOptionFlag, MagickFalse },
1351 { "Laplacian", LaplacianNoise, UndefinedOptionFlag, MagickFalse },
1352 { "Multiplicative", MultiplicativeGaussianNoise, UndefinedOptionFlag, MagickFalse },
1353 { "Poisson", PoissonNoise, UndefinedOptionFlag, MagickFalse },
1354 { "Random", RandomNoise, UndefinedOptionFlag, MagickFalse },
1355 { "Uniform", UniformNoise, UndefinedOptionFlag, MagickFalse },
1356 { (char *) NULL, UndefinedNoise, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001357 },
1358 OrientationOptions[] =
1359 {
cristy042ee782011-04-22 18:48:30 +00001360 { "Undefined", UndefinedOrientation, UndefinedOptionFlag, MagickTrue },
1361 { "TopLeft", TopLeftOrientation, UndefinedOptionFlag, MagickFalse },
1362 { "TopRight", TopRightOrientation, UndefinedOptionFlag, MagickFalse },
1363 { "BottomRight", BottomRightOrientation, UndefinedOptionFlag, MagickFalse },
1364 { "BottomLeft", BottomLeftOrientation, UndefinedOptionFlag, MagickFalse },
1365 { "LeftTop", LeftTopOrientation, UndefinedOptionFlag, MagickFalse },
1366 { "RightTop", RightTopOrientation, UndefinedOptionFlag, MagickFalse },
1367 { "RightBottom", RightBottomOrientation, UndefinedOptionFlag, MagickFalse },
1368 { "LeftBottom", LeftBottomOrientation, UndefinedOptionFlag, MagickFalse },
1369 { (char *) NULL, UndefinedOrientation, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001370 },
cristy6dcb9b82011-10-23 23:21:25 +00001371 PixelChannelOptions[] =
1372 {
1373 { "Undefined", UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001374 { "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001375 { "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001376 { "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
anthony30b912a2012-03-22 01:20:28 +00001377 { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001378 { "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1379 { "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
1380 { "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
1381 { "Composite", CompositePixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001382 { "C", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001383 { "Cr", CrPixelChannel, UndefinedOptionFlag, MagickFalse },
1384 { "Cyan", CyanPixelChannel, UndefinedOptionFlag, MagickFalse },
1385 { "Gray", GrayPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001386 { "G", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001387 { "Green", GreenPixelChannel, UndefinedOptionFlag, MagickFalse },
1388 { "Index", IndexPixelChannel, UndefinedOptionFlag, MagickFalse },
1389 { "Intensity", IntensityPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001390 { "K", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
1391 { "M", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001392 { "Magenta", MagentaPixelChannel, UndefinedOptionFlag, MagickFalse },
1393 { "Mask", MaskPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001394 { "R", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001395 { "Red", RedPixelChannel, UndefinedOptionFlag, MagickFalse },
1396 { "Sync", SyncPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy542dd0b2012-03-18 19:10:09 +00001397 { "Y", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
cristy6dcb9b82011-10-23 23:21:25 +00001398 { "Yellow", YellowPixelChannel, UndefinedOptionFlag, MagickFalse },
1399 { (char *) NULL, UndefinedPixelChannel, UndefinedOptionFlag, MagickFalse }
1400 },
1401 PixelTraitOptions[] =
1402 {
1403 { "Undefined", UndefinedPixelTrait, UndefinedOptionFlag, MagickTrue },
1404 { "Blend", BlendPixelTrait, UndefinedOptionFlag, MagickFalse },
1405 { "Copy", CopyPixelTrait, UndefinedOptionFlag, MagickFalse },
1406 { "Update", UpdatePixelTrait, UndefinedOptionFlag, MagickFalse },
1407 { (char *) NULL, UndefinedPixelTrait, UndefinedOptionFlag, MagickFalse }
1408 },
cristy3ed852e2009-09-05 21:47:34 +00001409 PolicyDomainOptions[] =
1410 {
cristy042ee782011-04-22 18:48:30 +00001411 { "Undefined", UndefinedPolicyDomain, UndefinedOptionFlag, MagickTrue },
1412 { "Coder", CoderPolicyDomain, UndefinedOptionFlag, MagickFalse },
1413 { "Delegate", DelegatePolicyDomain, UndefinedOptionFlag, MagickFalse },
1414 { "Filter", FilterPolicyDomain, UndefinedOptionFlag, MagickFalse },
1415 { "Path", PathPolicyDomain, UndefinedOptionFlag, MagickFalse },
1416 { "Resource", ResourcePolicyDomain, UndefinedOptionFlag, MagickFalse },
1417 { "System", SystemPolicyDomain, UndefinedOptionFlag, MagickFalse },
1418 { (char *) NULL, UndefinedPolicyDomain, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001419 },
1420 PolicyRightsOptions[] =
1421 {
cristy042ee782011-04-22 18:48:30 +00001422 { "Undefined", UndefinedPolicyRights, UndefinedOptionFlag, MagickTrue },
1423 { "None", NoPolicyRights, UndefinedOptionFlag, MagickFalse },
1424 { "Read", ReadPolicyRights, UndefinedOptionFlag, MagickFalse },
1425 { "Write", WritePolicyRights, UndefinedOptionFlag, MagickFalse },
1426 { "Execute", ExecutePolicyRights, UndefinedOptionFlag, MagickFalse },
1427 { (char *) NULL, UndefinedPolicyRights, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001428 },
1429 PreviewOptions[] =
1430 {
cristy042ee782011-04-22 18:48:30 +00001431 { "Undefined", UndefinedPreview, UndefinedOptionFlag, MagickTrue },
1432 { "AddNoise", AddNoisePreview, UndefinedOptionFlag, MagickFalse },
1433 { "Blur", BlurPreview, UndefinedOptionFlag, MagickFalse },
1434 { "Brightness", BrightnessPreview, UndefinedOptionFlag, MagickFalse },
1435 { "Charcoal", CharcoalDrawingPreview, UndefinedOptionFlag, MagickFalse },
1436 { "Despeckle", DespecklePreview, UndefinedOptionFlag, MagickFalse },
1437 { "Dull", DullPreview, UndefinedOptionFlag, MagickFalse },
1438 { "EdgeDetect", EdgeDetectPreview, UndefinedOptionFlag, MagickFalse },
1439 { "Gamma", GammaPreview, UndefinedOptionFlag, MagickFalse },
1440 { "Grayscale", GrayscalePreview, UndefinedOptionFlag, MagickFalse },
1441 { "Hue", HuePreview, UndefinedOptionFlag, MagickFalse },
1442 { "Implode", ImplodePreview, UndefinedOptionFlag, MagickFalse },
1443 { "JPEG", JPEGPreview, UndefinedOptionFlag, MagickFalse },
1444 { "OilPaint", OilPaintPreview, UndefinedOptionFlag, MagickFalse },
1445 { "Quantize", QuantizePreview, UndefinedOptionFlag, MagickFalse },
1446 { "Raise", RaisePreview, UndefinedOptionFlag, MagickFalse },
1447 { "ReduceNoise", ReduceNoisePreview, UndefinedOptionFlag, MagickFalse },
1448 { "Roll", RollPreview, UndefinedOptionFlag, MagickFalse },
1449 { "Rotate", RotatePreview, UndefinedOptionFlag, MagickFalse },
1450 { "Saturation", SaturationPreview, UndefinedOptionFlag, MagickFalse },
1451 { "Segment", SegmentPreview, UndefinedOptionFlag, MagickFalse },
1452 { "Shade", ShadePreview, UndefinedOptionFlag, MagickFalse },
1453 { "Sharpen", SharpenPreview, UndefinedOptionFlag, MagickFalse },
1454 { "Shear", ShearPreview, UndefinedOptionFlag, MagickFalse },
1455 { "Solarize", SolarizePreview, UndefinedOptionFlag, MagickFalse },
1456 { "Spiff", SpiffPreview, UndefinedOptionFlag, MagickFalse },
1457 { "Spread", SpreadPreview, UndefinedOptionFlag, MagickFalse },
1458 { "Swirl", SwirlPreview, UndefinedOptionFlag, MagickFalse },
1459 { "Threshold", ThresholdPreview, UndefinedOptionFlag, MagickFalse },
1460 { "Wave", WavePreview, UndefinedOptionFlag, MagickFalse },
1461 { (char *) NULL, UndefinedPreview, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001462 },
1463 PrimitiveOptions[] =
1464 {
cristy042ee782011-04-22 18:48:30 +00001465 { "Undefined", UndefinedPrimitive, UndefinedOptionFlag, MagickTrue },
1466 { "Arc", ArcPrimitive, UndefinedOptionFlag, MagickFalse },
1467 { "Bezier", BezierPrimitive, UndefinedOptionFlag, MagickFalse },
1468 { "Circle", CirclePrimitive, UndefinedOptionFlag, MagickFalse },
1469 { "Color", ColorPrimitive, UndefinedOptionFlag, MagickFalse },
1470 { "Ellipse", EllipsePrimitive, UndefinedOptionFlag, MagickFalse },
1471 { "Image", ImagePrimitive, UndefinedOptionFlag, MagickFalse },
1472 { "Line", LinePrimitive, UndefinedOptionFlag, MagickFalse },
1473 { "Matte", MattePrimitive, UndefinedOptionFlag, MagickFalse },
1474 { "Path", PathPrimitive, UndefinedOptionFlag, MagickFalse },
1475 { "Point", PointPrimitive, UndefinedOptionFlag, MagickFalse },
1476 { "Polygon", PolygonPrimitive, UndefinedOptionFlag, MagickFalse },
1477 { "Polyline", PolylinePrimitive, UndefinedOptionFlag, MagickFalse },
1478 { "Rectangle", RectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1479 { "RoundRectangle", RoundRectanglePrimitive, UndefinedOptionFlag, MagickFalse },
1480 { "Text", TextPrimitive, UndefinedOptionFlag, MagickFalse },
1481 { (char *) NULL, UndefinedPrimitive, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001482 },
1483 QuantumFormatOptions[] =
1484 {
cristy042ee782011-04-22 18:48:30 +00001485 { "Undefined", UndefinedQuantumFormat, UndefinedOptionFlag, MagickTrue },
1486 { "FloatingPoint", FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse },
1487 { "Signed", SignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1488 { "Unsigned", UnsignedQuantumFormat, UndefinedOptionFlag, MagickFalse },
1489 { (char *) NULL, FloatingPointQuantumFormat, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001490 },
1491 ResolutionOptions[] =
1492 {
cristy042ee782011-04-22 18:48:30 +00001493 { "Undefined", UndefinedResolution, UndefinedOptionFlag, MagickTrue },
1494 { "PixelsPerInch", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
1495 { "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
1496 { (char *) NULL, UndefinedResolution, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001497 },
1498 ResourceOptions[] =
1499 {
cristy042ee782011-04-22 18:48:30 +00001500 { "Undefined", UndefinedResource, UndefinedOptionFlag, MagickTrue },
1501 { "Area", AreaResource, UndefinedOptionFlag, MagickFalse },
1502 { "Disk", DiskResource, UndefinedOptionFlag, MagickFalse },
1503 { "File", FileResource, UndefinedOptionFlag, MagickFalse },
1504 { "Map", MapResource, UndefinedOptionFlag, MagickFalse },
1505 { "Memory", MemoryResource, UndefinedOptionFlag, MagickFalse },
1506 { "Thread", ThreadResource, UndefinedOptionFlag, MagickFalse },
1507 { "Time", TimeResource, UndefinedOptionFlag, MagickFalse },
1508 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001509 },
1510 SparseColorOptions[] =
1511 {
cristy042ee782011-04-22 18:48:30 +00001512 { "Undefined", UndefinedDistortion, UndefinedOptionFlag, MagickTrue },
1513 { "Barycentric", BarycentricColorInterpolate, UndefinedOptionFlag, MagickFalse },
1514 { "Bilinear", BilinearColorInterpolate, UndefinedOptionFlag, MagickFalse },
anthony09d867c2011-04-26 08:28:41 +00001515 { "Inverse", InverseColorInterpolate, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001516 { "Shepards", ShepardsColorInterpolate, UndefinedOptionFlag, MagickFalse },
1517 { "Voronoi", VoronoiColorInterpolate, UndefinedOptionFlag, MagickFalse },
1518 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001519 },
cristy0834d642011-03-18 18:26:08 +00001520 StatisticOptions[] =
1521 {
cristy042ee782011-04-22 18:48:30 +00001522 { "Undefined", UndefinedStatistic, UndefinedOptionFlag, MagickTrue },
1523 { "Gradient", GradientStatistic, UndefinedOptionFlag, MagickFalse },
1524 { "Maximum", MaximumStatistic, UndefinedOptionFlag, MagickFalse },
1525 { "Mean", MeanStatistic, UndefinedOptionFlag, MagickFalse },
1526 { "Median", MedianStatistic, UndefinedOptionFlag, MagickFalse },
1527 { "Minimum", MinimumStatistic, UndefinedOptionFlag, MagickFalse },
1528 { "Mode", ModeStatistic, UndefinedOptionFlag, MagickFalse },
anthony975a8d72012-04-12 13:54:36 +00001529 { "NonPeak", NonpeakStatistic, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001530 { "StandardDeviation", StandardDeviationStatistic, UndefinedOptionFlag, MagickFalse },
1531 { (char *) NULL, UndefinedMethod, UndefinedOptionFlag, MagickFalse }
cristy0834d642011-03-18 18:26:08 +00001532 },
cristy3ed852e2009-09-05 21:47:34 +00001533 StorageOptions[] =
1534 {
cristy042ee782011-04-22 18:48:30 +00001535 { "Undefined", UndefinedPixel, UndefinedOptionFlag, MagickTrue },
1536 { "Char", CharPixel, UndefinedOptionFlag, MagickFalse },
1537 { "Double", DoublePixel, UndefinedOptionFlag, MagickFalse },
1538 { "Float", FloatPixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001539 { "Long", LongPixel, UndefinedOptionFlag, MagickFalse },
cristy6c9e1682012-01-07 21:37:44 +00001540 { "LongLong", LongLongPixel, UndefinedOptionFlag, MagickFalse },
cristy042ee782011-04-22 18:48:30 +00001541 { "Quantum", QuantumPixel, UndefinedOptionFlag, MagickFalse },
1542 { "Short", ShortPixel, UndefinedOptionFlag, MagickFalse },
1543 { (char *) NULL, UndefinedResource, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001544 },
1545 StretchOptions[] =
1546 {
cristy042ee782011-04-22 18:48:30 +00001547 { "Undefined", UndefinedStretch, UndefinedOptionFlag, MagickTrue },
1548 { "Any", AnyStretch, UndefinedOptionFlag, MagickFalse },
1549 { "Condensed", CondensedStretch, UndefinedOptionFlag, MagickFalse },
1550 { "Expanded", ExpandedStretch, UndefinedOptionFlag, MagickFalse },
1551 { "ExtraCondensed", ExtraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1552 { "ExtraExpanded", ExtraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1553 { "Normal", NormalStretch, UndefinedOptionFlag, MagickFalse },
1554 { "SemiCondensed", SemiCondensedStretch, UndefinedOptionFlag, MagickFalse },
1555 { "SemiExpanded", SemiExpandedStretch, UndefinedOptionFlag, MagickFalse },
1556 { "UltraCondensed", UltraCondensedStretch, UndefinedOptionFlag, MagickFalse },
1557 { "UltraExpanded", UltraExpandedStretch, UndefinedOptionFlag, MagickFalse },
1558 { (char *) NULL, UndefinedStretch, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001559 },
1560 StyleOptions[] =
1561 {
cristy042ee782011-04-22 18:48:30 +00001562 { "Undefined", UndefinedStyle, UndefinedOptionFlag, MagickTrue },
1563 { "Any", AnyStyle, UndefinedOptionFlag, MagickFalse },
1564 { "Italic", ItalicStyle, UndefinedOptionFlag, MagickFalse },
1565 { "Normal", NormalStyle, UndefinedOptionFlag, MagickFalse },
1566 { "Oblique", ObliqueStyle, UndefinedOptionFlag, MagickFalse },
1567 { (char *) NULL, UndefinedStyle, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001568 },
1569 TypeOptions[] =
1570 {
cristy042ee782011-04-22 18:48:30 +00001571 { "Undefined", UndefinedType, UndefinedOptionFlag, MagickTrue },
1572 { "Bilevel", BilevelType, UndefinedOptionFlag, MagickFalse },
1573 { "ColorSeparation", ColorSeparationType, UndefinedOptionFlag, MagickFalse },
1574 { "ColorSeparationMatte", ColorSeparationMatteType, UndefinedOptionFlag, MagickFalse },
1575 { "Grayscale", GrayscaleType, UndefinedOptionFlag, MagickFalse },
1576 { "GrayscaleMatte", GrayscaleMatteType, UndefinedOptionFlag, MagickFalse },
1577 { "Optimize", OptimizeType, UndefinedOptionFlag, MagickFalse },
1578 { "Palette", PaletteType, UndefinedOptionFlag, MagickFalse },
1579 { "PaletteBilevelMatte", PaletteBilevelMatteType, UndefinedOptionFlag, MagickFalse },
1580 { "PaletteMatte", PaletteMatteType, UndefinedOptionFlag, MagickFalse },
1581 { "TrueColorMatte", TrueColorMatteType, UndefinedOptionFlag, MagickFalse },
1582 { "TrueColor", TrueColorType, UndefinedOptionFlag, MagickFalse },
1583 { (char *) NULL, UndefinedType, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001584 },
1585 ValidateOptions[] =
1586 {
cristy042ee782011-04-22 18:48:30 +00001587 { "Undefined", UndefinedValidate, UndefinedOptionFlag, MagickTrue },
1588 { "All", AllValidate, UndefinedOptionFlag, MagickFalse },
1589 { "Compare", CompareValidate, UndefinedOptionFlag, MagickFalse },
1590 { "Composite", CompositeValidate, UndefinedOptionFlag, MagickFalse },
1591 { "Convert", ConvertValidate, UndefinedOptionFlag, MagickFalse },
1592 { "FormatsInMemory", FormatsInMemoryValidate, UndefinedOptionFlag, MagickFalse },
1593 { "FormatsOnDisk", FormatsOnDiskValidate, UndefinedOptionFlag, MagickFalse },
1594 { "Identify", IdentifyValidate, UndefinedOptionFlag, MagickFalse },
1595 { "ImportExport", ImportExportValidate, UndefinedOptionFlag, MagickFalse },
1596 { "Montage", MontageValidate, UndefinedOptionFlag, MagickFalse },
1597 { "Stream", StreamValidate, UndefinedOptionFlag, MagickFalse },
1598 { "None", NoValidate, UndefinedOptionFlag, MagickFalse },
1599 { (char *) NULL, UndefinedValidate, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001600 },
1601 VirtualPixelOptions[] =
1602 {
cristy042ee782011-04-22 18:48:30 +00001603 { "Undefined", UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickTrue },
1604 { "Background", BackgroundVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1605 { "Black", BlackVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
cristy1df692a2011-04-23 17:09:35 +00001606 { "Constant", BackgroundVirtualPixelMethod, DeprecateOptionFlag, MagickTrue },
cristy042ee782011-04-22 18:48:30 +00001607 { "CheckerTile", CheckerTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1608 { "Dither", DitherVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1609 { "Edge", EdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1610 { "Gray", GrayVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1611 { "HorizontalTile", HorizontalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1612 { "HorizontalTileEdge", HorizontalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1613 { "Mirror", MirrorVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1614 { "Random", RandomVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1615 { "Tile", TileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1616 { "Transparent", TransparentVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1617 { "VerticalTile", VerticalTileVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1618 { "VerticalTileEdge", VerticalTileEdgeVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1619 { "White", WhiteVirtualPixelMethod, UndefinedOptionFlag, MagickFalse },
1620 { (char *) NULL, UndefinedVirtualPixelMethod, UndefinedOptionFlag, MagickFalse }
cristy3ed852e2009-09-05 21:47:34 +00001621 };
1622
anthony686b1a32012-02-15 14:50:53 +00001623static const OptionInfo *GetOptionInfo(const CommandOption option)
1624{
1625 switch (option)
1626 {
1627 case MagickAlignOptions: return(AlignOptions);
1628 case MagickAlphaOptions: return(AlphaOptions);
1629 case MagickBooleanOptions: return(BooleanOptions);
1630 case MagickChannelOptions: return(ChannelOptions);
1631 case MagickClassOptions: return(ClassOptions);
1632 case MagickClipPathOptions: return(ClipPathOptions);
1633 case MagickColorspaceOptions: return(ColorspaceOptions);
1634 case MagickCommandOptions: return(CommandOptions);
1635 case MagickComposeOptions: return(ComposeOptions);
1636 case MagickCompressOptions: return(CompressOptions);
1637 case MagickDataTypeOptions: return(DataTypeOptions);
1638 case MagickDebugOptions: return(LogEventOptions);
1639 case MagickDecorateOptions: return(DecorateOptions);
1640 case MagickDirectionOptions: return(DirectionOptions);
1641 case MagickDisposeOptions: return(DisposeOptions);
1642 case MagickDistortOptions: return(DistortOptions);
1643 case MagickDitherOptions: return(DitherOptions);
1644 case MagickEndianOptions: return(EndianOptions);
1645 case MagickEvaluateOptions: return(EvaluateOptions);
1646 case MagickFillRuleOptions: return(FillRuleOptions);
1647 case MagickFilterOptions: return(FilterOptions);
1648 case MagickFunctionOptions: return(FunctionOptions);
1649 case MagickGravityOptions: return(GravityOptions);
1650/* case MagickImageListOptions: return(ImageListOptions); */
1651 case MagickIntentOptions: return(IntentOptions);
1652 case MagickInterlaceOptions: return(InterlaceOptions);
1653 case MagickInterpolateOptions: return(InterpolateOptions);
1654 case MagickKernelOptions: return(KernelOptions);
1655 case MagickLayerOptions: return(LayerOptions);
1656 case MagickLineCapOptions: return(LineCapOptions);
1657 case MagickLineJoinOptions: return(LineJoinOptions);
1658 case MagickListOptions: return(ListOptions);
1659 case MagickLogEventOptions: return(LogEventOptions);
1660 case MagickMetricOptions: return(MetricOptions);
1661 case MagickMethodOptions: return(MethodOptions);
1662 case MagickModeOptions: return(ModeOptions);
1663 case MagickMorphologyOptions: return(MorphologyOptions);
1664 case MagickNoiseOptions: return(NoiseOptions);
1665 case MagickOrientationOptions: return(OrientationOptions);
1666 case MagickPixelChannelOptions: return(PixelChannelOptions);
1667 case MagickPixelTraitOptions: return(PixelTraitOptions);
1668 case MagickPolicyDomainOptions: return(PolicyDomainOptions);
1669 case MagickPolicyRightsOptions: return(PolicyRightsOptions);
1670 case MagickPreviewOptions: return(PreviewOptions);
1671 case MagickPrimitiveOptions: return(PrimitiveOptions);
1672 case MagickQuantumFormatOptions: return(QuantumFormatOptions);
1673 case MagickResolutionOptions: return(ResolutionOptions);
1674 case MagickResourceOptions: return(ResourceOptions);
1675 case MagickSparseColorOptions: return(SparseColorOptions);
1676 case MagickStatisticOptions: return(StatisticOptions);
1677 case MagickStorageOptions: return(StorageOptions);
1678 case MagickStretchOptions: return(StretchOptions);
1679 case MagickStyleOptions: return(StyleOptions);
1680 case MagickTypeOptions: return(TypeOptions);
1681 case MagickValidateOptions: return(ValidateOptions);
1682 case MagickVirtualPixelOptions: return(VirtualPixelOptions);
1683 default: break;
1684 }
1685 return((const OptionInfo *) NULL);
1686}
1687
cristy3ed852e2009-09-05 21:47:34 +00001688/*
1689%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1690% %
1691% %
1692% %
1693% C l o n e I m a g e O p t i o n s %
1694% %
1695% %
1696% %
1697%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1698%
1699% CloneImageOptions() clones one or more image options.
1700%
1701% The format of the CloneImageOptions method is:
1702%
1703% MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1704% const ImageInfo *clone_info)
1705%
1706% A description of each parameter follows:
1707%
1708% o image_info: the image info.
1709%
1710% o clone_info: the clone image info.
1711%
1712*/
1713MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info,
1714 const ImageInfo *clone_info)
1715{
1716 assert(image_info != (ImageInfo *) NULL);
1717 assert(image_info->signature == MagickSignature);
1718 if (image_info->debug != MagickFalse)
1719 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1720 image_info->filename);
1721 assert(clone_info != (const ImageInfo *) NULL);
1722 assert(clone_info->signature == MagickSignature);
1723 if (clone_info->options != (void *) NULL)
1724 image_info->options=CloneSplayTree((SplayTreeInfo *) clone_info->options,
1725 (void *(*)(void *)) ConstantString,(void *(*)(void *)) ConstantString);
1726 return(MagickTrue);
1727}
1728
1729/*
1730%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1731% %
1732% %
1733% %
1734% D e f i n e I m a g e O p t i o n %
1735% %
1736% %
1737% %
1738%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1739%
anthony8ea79832011-10-05 10:08:39 +00001740% DefineImageOption() associates an assignment string of the form
anthony72feaa62012-01-17 06:46:23 +00001741% "key=value" with an image option. It is equivelent to SetImageOption().
cristy3ed852e2009-09-05 21:47:34 +00001742%
1743% The format of the DefineImageOption method is:
1744%
1745% MagickBooleanType DefineImageOption(ImageInfo *image_info,
1746% const char *option)
1747%
1748% A description of each parameter follows:
1749%
1750% o image_info: the image info.
1751%
anthony8ea79832011-10-05 10:08:39 +00001752% o option: the image option assignment string.
cristy3ed852e2009-09-05 21:47:34 +00001753%
1754*/
1755MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info,
1756 const char *option)
1757{
1758 char
1759 key[MaxTextExtent],
1760 value[MaxTextExtent];
1761
1762 register char
1763 *p;
1764
1765 assert(image_info != (ImageInfo *) NULL);
1766 assert(option != (const char *) NULL);
1767 (void) CopyMagickString(key,option,MaxTextExtent);
1768 for (p=key; *p != '\0'; p++)
1769 if (*p == '=')
1770 break;
1771 *value='\0';
1772 if (*p == '=')
1773 (void) CopyMagickString(value,p+1,MaxTextExtent);
1774 *p='\0';
1775 return(SetImageOption(image_info,key,value));
1776}
1777
1778/*
1779%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1780% %
1781% %
1782% %
1783% D e l e t e I m a g e O p t i o n %
1784% %
1785% %
1786% %
1787%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1788%
1789% DeleteImageOption() deletes an key from the image map.
1790%
anthonyebb73a22012-03-22 14:25:52 +00001791% Returns MagickTrue is the option is found and deleted from the Options.
1792%
cristy3ed852e2009-09-05 21:47:34 +00001793% The format of the DeleteImageOption method is:
1794%
1795% MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1796% const char *key)
1797%
1798% A description of each parameter follows:
1799%
1800% o image_info: the image info.
1801%
1802% o option: the image option.
1803%
1804*/
1805MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
1806 const char *option)
1807{
1808 assert(image_info != (ImageInfo *) NULL);
1809 assert(image_info->signature == MagickSignature);
1810 if (image_info->debug != MagickFalse)
1811 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1812 image_info->filename);
1813 if (image_info->options == (void *) NULL)
1814 return(MagickFalse);
1815 return(DeleteNodeFromSplayTree((SplayTreeInfo *) image_info->options,option));
1816}
1817
1818/*
1819%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1820% %
1821% %
1822% %
1823% D e s t r o y I m a g e O p t i o n s %
1824% %
1825% %
1826% %
1827%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1828%
1829% DestroyImageOptions() releases memory associated with image option values.
1830%
1831% The format of the DestroyDefines method is:
1832%
1833% void DestroyImageOptions(ImageInfo *image_info)
1834%
1835% A description of each parameter follows:
1836%
1837% o image_info: the image info.
1838%
1839*/
1840MagickExport void DestroyImageOptions(ImageInfo *image_info)
1841{
1842 assert(image_info != (ImageInfo *) NULL);
1843 assert(image_info->signature == MagickSignature);
1844 if (image_info->debug != MagickFalse)
1845 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1846 image_info->filename);
1847 if (image_info->options != (void *) NULL)
1848 image_info->options=DestroySplayTree((SplayTreeInfo *) image_info->options);
1849}
1850
1851/*
1852%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1853% %
1854% %
1855% %
1856% G e t I m a g e O p t i o n %
1857% %
1858% %
1859% %
1860%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1861%
1862% GetImageOption() gets a value associated with an image option.
1863%
1864% The format of the GetImageOption method is:
1865%
1866% const char *GetImageOption(const ImageInfo *image_info,
cristye3f77792011-10-07 00:09:09 +00001867% const char *option)
cristy3ed852e2009-09-05 21:47:34 +00001868%
1869% A description of each parameter follows:
1870%
1871% o image_info: the image info.
1872%
cristye3f77792011-10-07 00:09:09 +00001873% o option: the option.
cristy3ed852e2009-09-05 21:47:34 +00001874%
1875*/
1876MagickExport const char *GetImageOption(const ImageInfo *image_info,
anthony7df2b832011-10-06 11:55:25 +00001877 const char *option)
cristy3ed852e2009-09-05 21:47:34 +00001878{
cristy3ed852e2009-09-05 21:47:34 +00001879 assert(image_info != (ImageInfo *) NULL);
1880 assert(image_info->signature == MagickSignature);
1881 if (image_info->debug != MagickFalse)
1882 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
1883 image_info->filename);
1884 if (image_info->options == (void *) NULL)
1885 return((const char *) NULL);
cristye3f77792011-10-07 00:09:09 +00001886 return((const char *) GetValueFromSplayTree((SplayTreeInfo *)
1887 image_info->options,option));
cristy3ed852e2009-09-05 21:47:34 +00001888}
1889
1890/*
1891%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1892% %
1893% %
1894% %
cristy042ee782011-04-22 18:48:30 +00001895% 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 +00001896% %
1897% %
1898% %
1899%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1900%
cristy042ee782011-04-22 18:48:30 +00001901% GetCommandOptionFlags() parses a string and returns an enumerated option
1902% flags(s). Return a value of -1 if no such option is found.
cristy3ed852e2009-09-05 21:47:34 +00001903%
cristy042ee782011-04-22 18:48:30 +00001904% The format of the GetCommandOptionFlags method is:
cristy3ed852e2009-09-05 21:47:34 +00001905%
cristy042ee782011-04-22 18:48:30 +00001906% ssize_t GetCommandOptionFlags(const CommandOption option,
1907% const MagickBooleanType list,const char *options)
cristy3ed852e2009-09-05 21:47:34 +00001908%
1909% A description of each parameter follows:
1910%
cristy042ee782011-04-22 18:48:30 +00001911% o option: Index to the option table to lookup
1912%
1913% o list: A option other than zero permits more than one option separated by
1914% a comma or pipe.
1915%
1916% o options: One or more options separated by commas.
cristy3ed852e2009-09-05 21:47:34 +00001917%
1918*/
1919
cristy042ee782011-04-22 18:48:30 +00001920MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
1921 const MagickBooleanType list,const char *options)
1922{
1923 char
1924 token[MaxTextExtent];
1925
1926 const OptionInfo
1927 *option_info;
1928
1929 int
1930 sentinel;
1931
1932 MagickBooleanType
1933 negate;
1934
1935 register char
1936 *q;
1937
1938 register const char
1939 *p;
1940
1941 register ssize_t
1942 i;
1943
1944 ssize_t
1945 option_types;
1946
1947 option_info=GetOptionInfo(option);
1948 if (option_info == (const OptionInfo *) NULL)
anthonye8f56492012-02-12 12:39:02 +00001949 return(UndefinedOptionFlag);
cristy042ee782011-04-22 18:48:30 +00001950 option_types=0;
1951 sentinel=',';
1952 if (strchr(options,'|') != (char *) NULL)
1953 sentinel='|';
1954 for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
1955 {
1956 while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
1957 (*p != '\0'))
1958 p++;
1959 negate=(*p == '!') ? MagickTrue : MagickFalse;
1960 if (negate != MagickFalse)
1961 p++;
1962 q=token;
1963 while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
1964 (*p != '\0'))
1965 {
cristya0019202011-06-07 13:23:55 +00001966 if ((q-token) >= (MaxTextExtent-1))
cristy042ee782011-04-22 18:48:30 +00001967 break;
1968 *q++=(*p++);
1969 }
1970 *q='\0';
1971 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
1972 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
1973 {
1974 if (*token == '!')
1975 option_types=option_types &~ option_info[i].flags;
1976 else
1977 option_types=option_types | option_info[i].flags;
1978 break;
1979 }
1980 if ((option_info[i].mnemonic == (char *) NULL) &&
1981 ((strchr(token+1,'-') != (char *) NULL) ||
1982 (strchr(token+1,'_') != (char *) NULL)))
1983 {
1984 while ((q=strchr(token+1,'-')) != (char *) NULL)
1985 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
1986 while ((q=strchr(token+1,'_')) != (char *) NULL)
1987 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
1988 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
1989 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
1990 {
1991 if (*token == '!')
1992 option_types=option_types &~ option_info[i].flags;
1993 else
1994 option_types=option_types | option_info[i].flags;
1995 break;
1996 }
1997 }
1998 if (option_info[i].mnemonic == (char *) NULL)
1999 return(-1);
2000 if (list == MagickFalse)
2001 break;
2002 }
2003 return(option_types);
2004}
2005
2006/*
2007%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2008% %
2009% %
2010% %
anthony686b1a32012-02-15 14:50:53 +00002011% G e t C o m m a n d O p t i o n I n f o %
2012% %
2013% %
2014% %
2015%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2016%
2017% GetCommandOptionInfo() returns pointer to the matching OptionInfo entry
2018% for the "CommandOptions" table only. A specialised binary search is used,
2019% to speed up the lookup for that very large table, and returns both the
2020% type (arg count) and flags (arg type).
2021%
2022% This search reduces linear search of over 500 options (250 tests of
2023% average) to about 10 lookups!
2024%
2025% The format of the GetCommandOptionInfo method is:
2026%
2027% const char **GetCommandOptions(const CommandOption value)
2028%
2029% A description of each parameter follows:
2030%
2031% o value: the value.
2032%
2033*/
2034MagickExport const OptionInfo *GetCommandOptionInfo(const char *value)
2035{
2036 const OptionInfo
2037 *option_info=CommandOptions;
2038
2039 static ssize_t
2040 table_size = 0;
2041
anthony24aa8822012-03-11 00:56:06 +00002042 register int
anthony686b1a32012-02-15 14:50:53 +00002043 i,l,h;
2044
2045 assert(value != (char *) NULL);
2046 assert(*value != '\0');
2047
2048 /* count up table items - first time only */
2049 if ( table_size == 0 )
2050 {
2051 l=-1;
2052 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2053 if ( LocaleCompare(value,option_info[i].mnemonic) == 0 )
2054 l=i;
2055 table_size = i;
anthony24aa8822012-03-11 00:56:06 +00002056 return( &option_info[(l>=0)?l:i] );
anthony686b1a32012-02-15 14:50:53 +00002057 }
2058
2059 /* faster binary search of command table, now that its length is known */
2060 l=0;
anthony668f43a2012-02-20 14:55:32 +00002061 h=table_size;
anthony686b1a32012-02-15 14:50:53 +00002062 while ( l < h )
2063 {
2064 int cmp;
2065 i = (l+h)/2; /* half the bounds */
2066 /* compare string part, then switch character! */
2067 cmp=LocaleCompare(value+1,option_info[i].mnemonic+1);
2068 if ( cmp == 0 )
2069 cmp = *value - *(option_info[i].mnemonic);
anthony668f43a2012-02-20 14:55:32 +00002070#if 0
2071 (void) FormatLocaleFile(stderr,
2072 "%d --- %u < %u < %u --- \"%s\" < \"%s\" < \"%s\"\n",
cristy73380532012-02-18 20:26:28 +00002073 cmp,l,i,h,option_info[l].mnemonic,option_info[i].mnemonic,
2074 option_info[h].mnemonic);
anthony668f43a2012-02-20 14:55:32 +00002075#endif
anthony686b1a32012-02-15 14:50:53 +00002076 if (cmp == 0)
2077 return(&option_info[i]);
2078 if (cmp > 0) l=i+1; else h=i; /* reassign search bounds */
2079 }
2080 /* option was not found in table - return last 'null' entry. */
2081 return(&option_info[table_size]);
2082}
2083
2084/*
2085%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2086% %
2087% %
2088% %
cristy042ee782011-04-22 18:48:30 +00002089% G e t C o m m a n d O p t i o n s %
2090% %
2091% %
2092% %
2093%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2094%
2095% GetCommandOptions() returns a list of values.
2096%
2097% The format of the GetCommandOptions method is:
2098%
2099% const char **GetCommandOptions(const CommandOption value)
2100%
2101% A description of each parameter follows:
2102%
2103% o value: the value.
2104%
2105*/
2106MagickExport char **GetCommandOptions(const CommandOption value)
cristy3ed852e2009-09-05 21:47:34 +00002107{
2108 char
2109 **values;
2110
2111 const OptionInfo
2112 *option_info;
2113
cristybb503372010-05-27 20:51:26 +00002114 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002115 i;
2116
2117 option_info=GetOptionInfo(value);
2118 if (option_info == (const OptionInfo *) NULL)
2119 return((char **) NULL);
2120 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++) ;
2121 values=(char **) AcquireQuantumMemory((size_t) i+1UL,sizeof(*values));
2122 if (values == (char **) NULL)
2123 ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
2124 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2125 values[i]=AcquireString(option_info[i].mnemonic);
2126 values[i]=(char *) NULL;
2127 return(values);
2128}
2129
2130/*
2131%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2132% %
2133% %
2134% %
2135% G e t N e x t I m a g e O p t i o n %
2136% %
2137% %
2138% %
2139%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2140%
2141% GetNextImageOption() gets the next image option value.
2142%
2143% The format of the GetNextImageOption method is:
2144%
2145% char *GetNextImageOption(const ImageInfo *image_info)
2146%
2147% A description of each parameter follows:
2148%
2149% o image_info: the image info.
2150%
2151*/
2152MagickExport char *GetNextImageOption(const ImageInfo *image_info)
2153{
2154 assert(image_info != (ImageInfo *) NULL);
2155 assert(image_info->signature == MagickSignature);
2156 if (image_info->debug != MagickFalse)
2157 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2158 image_info->filename);
2159 if (image_info->options == (void *) NULL)
2160 return((char *) NULL);
2161 return((char *) GetNextKeyInSplayTree((SplayTreeInfo *) image_info->options));
2162}
2163
2164/*
2165%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2166% %
2167% %
2168% %
cristy042ee782011-04-22 18:48:30 +00002169% I s C o m m a n d O p t i o n %
cristy3ed852e2009-09-05 21:47:34 +00002170% %
2171% %
2172% %
2173%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2174%
cristy042ee782011-04-22 18:48:30 +00002175% IsCommandOption() returns MagickTrue if the option begins with a - or + and
cristy3ed852e2009-09-05 21:47:34 +00002176% the first character that follows is alphanumeric.
2177%
cristy042ee782011-04-22 18:48:30 +00002178% The format of the IsCommandOption method is:
cristy3ed852e2009-09-05 21:47:34 +00002179%
cristy042ee782011-04-22 18:48:30 +00002180% MagickBooleanType IsCommandOption(const char *option)
cristy3ed852e2009-09-05 21:47:34 +00002181%
2182% A description of each parameter follows:
2183%
2184% o option: the option.
2185%
2186*/
cristy042ee782011-04-22 18:48:30 +00002187MagickExport MagickBooleanType IsCommandOption(const char *option)
cristy3ed852e2009-09-05 21:47:34 +00002188{
2189 assert(option != (const char *) NULL);
2190 if ((*option != '-') && (*option != '+'))
2191 return(MagickFalse);
2192 if (strlen(option) == 1)
2193 return(MagickFalse);
2194 option++;
2195 if (isalpha((int) ((unsigned char) *option)) == 0)
2196 return(MagickFalse);
2197 return(MagickTrue);
2198}
2199
2200/*
2201%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2202% %
2203% %
2204% %
cristy042ee782011-04-22 18:48:30 +00002205% 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 +00002206% %
2207% %
2208% %
2209%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2210%
cristy042ee782011-04-22 18:48:30 +00002211% CommandOptionToMnemonic() returns an enumerated value as a mnemonic.
cristy3ed852e2009-09-05 21:47:34 +00002212%
cristy042ee782011-04-22 18:48:30 +00002213% The format of the CommandOptionToMnemonic method is:
cristy3ed852e2009-09-05 21:47:34 +00002214%
cristy042ee782011-04-22 18:48:30 +00002215% const char *CommandOptionToMnemonic(const CommandOption option,
cristybb503372010-05-27 20:51:26 +00002216% const ssize_t type)
cristy3ed852e2009-09-05 21:47:34 +00002217%
2218% A description of each parameter follows:
2219%
2220% o option: the option.
2221%
2222% o type: one or more values separated by commas.
2223%
2224*/
cristy042ee782011-04-22 18:48:30 +00002225MagickExport const char *CommandOptionToMnemonic(const CommandOption option,
cristybb503372010-05-27 20:51:26 +00002226 const ssize_t type)
cristy3ed852e2009-09-05 21:47:34 +00002227{
2228 const OptionInfo
2229 *option_info;
2230
cristybb503372010-05-27 20:51:26 +00002231 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002232 i;
2233
2234 option_info=GetOptionInfo(option);
2235 if (option_info == (const OptionInfo *) NULL)
2236 return((const char *) NULL);
2237 for (i=0; option_info[i].mnemonic != (const char *) NULL; i++)
2238 if (type == option_info[i].type)
2239 break;
2240 if (option_info[i].mnemonic == (const char *) NULL)
2241 return("undefined");
2242 return(option_info[i].mnemonic);
2243}
2244
2245/*
2246%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2247% %
2248% %
2249% %
cristy042ee782011-04-22 18:48:30 +00002250% L i s t C o m m a n d O p t i o n s %
cristy3ed852e2009-09-05 21:47:34 +00002251% %
2252% %
2253% %
2254%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2255%
cristy042ee782011-04-22 18:48:30 +00002256% ListCommandOptions() lists the contents of enumerated option type(s).
cristy3ed852e2009-09-05 21:47:34 +00002257%
cristy042ee782011-04-22 18:48:30 +00002258% The format of the ListCommandOptions method is:
cristy3ed852e2009-09-05 21:47:34 +00002259%
cristy2b9582a2011-07-04 17:38:56 +00002260% MagickBooleanType ListCommandOptions(FILE *file,
2261% const CommandOption option,ExceptionInfo *exception)
cristy3ed852e2009-09-05 21:47:34 +00002262%
2263% A description of each parameter follows:
2264%
2265% o file: list options to this file handle.
2266%
2267% o option: list these options.
2268%
2269% o exception: return any errors or warnings in this structure.
2270%
2271*/
cristy042ee782011-04-22 18:48:30 +00002272MagickExport MagickBooleanType ListCommandOptions(FILE *file,
2273 const CommandOption option,ExceptionInfo *magick_unused(exception))
cristy3ed852e2009-09-05 21:47:34 +00002274{
2275 const OptionInfo
2276 *option_info;
2277
cristybb503372010-05-27 20:51:26 +00002278 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002279 i;
2280
2281 if (file == (FILE *) NULL)
2282 file=stdout;
2283 option_info=GetOptionInfo(option);
2284 if (option_info == (const OptionInfo *) NULL)
2285 return(MagickFalse);
2286 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2287 {
2288 if (option_info[i].stealth != MagickFalse)
2289 continue;
cristyb51dff52011-05-19 16:55:47 +00002290 (void) FormatLocaleFile(file,"%s\n",option_info[i].mnemonic);
cristy3ed852e2009-09-05 21:47:34 +00002291 }
2292 return(MagickTrue);
2293}
2294
2295/*
2296%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2297% %
2298% %
2299% %
2300% P a r s e C h a n n e l O p t i o n %
2301% %
2302% %
2303% %
2304%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2305%
2306% ParseChannelOption() parses a string and returns an enumerated channel
2307% type(s).
2308%
2309% The format of the ParseChannelOption method is:
2310%
cristybb503372010-05-27 20:51:26 +00002311% ssize_t ParseChannelOption(const char *channels)
cristy3ed852e2009-09-05 21:47:34 +00002312%
2313% A description of each parameter follows:
2314%
2315% o options: One or more values separated by commas.
2316%
2317*/
cristybb503372010-05-27 20:51:26 +00002318MagickExport ssize_t ParseChannelOption(const char *channels)
cristy3ed852e2009-09-05 21:47:34 +00002319{
cristybb503372010-05-27 20:51:26 +00002320 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002321 i;
2322
cristyb9902b72010-10-05 18:21:50 +00002323 ssize_t
2324 channel;
2325
cristy042ee782011-04-22 18:48:30 +00002326 channel=ParseCommandOption(MagickChannelOptions,MagickTrue,channels);
cristy3ed852e2009-09-05 21:47:34 +00002327 if (channel >= 0)
2328 return(channel);
2329 channel=0;
cristybb503372010-05-27 20:51:26 +00002330 for (i=0; i < (ssize_t) strlen(channels); i++)
cristy3ed852e2009-09-05 21:47:34 +00002331 {
2332 switch (channels[i])
2333 {
2334 case 'A':
2335 case 'a':
2336 {
cristy953c4bd2012-02-24 01:04:04 +00002337 channel|=AlphaChannel;
cristy3ed852e2009-09-05 21:47:34 +00002338 break;
2339 }
2340 case 'B':
2341 case 'b':
2342 {
2343 channel|=BlueChannel;
2344 break;
2345 }
2346 case 'C':
2347 case 'c':
2348 {
2349 channel|=CyanChannel;
2350 break;
2351 }
2352 case 'g':
2353 case 'G':
2354 {
2355 channel|=GreenChannel;
2356 break;
2357 }
cristy3ed852e2009-09-05 21:47:34 +00002358 case 'K':
2359 case 'k':
2360 {
2361 channel|=BlackChannel;
2362 break;
2363 }
2364 case 'M':
2365 case 'm':
2366 {
2367 channel|=MagentaChannel;
2368 break;
2369 }
2370 case 'o':
2371 case 'O':
2372 {
anthony30b912a2012-03-22 01:20:28 +00002373 channel|=AlphaChannel; /* depreciate */
cristy3ed852e2009-09-05 21:47:34 +00002374 break;
2375 }
2376 case 'R':
2377 case 'r':
2378 {
2379 channel|=RedChannel;
2380 break;
2381 }
2382 case 'Y':
2383 case 'y':
2384 {
2385 channel|=YellowChannel;
2386 break;
2387 }
2388 case ',':
2389 {
cristybb503372010-05-27 20:51:26 +00002390 ssize_t
cristy3e4015d2010-10-05 18:18:56 +00002391 type;
2392
2393 /*
2394 Gather the additional channel flags and merge with shorthand.
2395 */
cristy042ee782011-04-22 18:48:30 +00002396 type=ParseCommandOption(MagickChannelOptions,MagickTrue,channels+i+1);
cristy3e4015d2010-10-05 18:18:56 +00002397 if (type < 0)
2398 return(type);
2399 channel|=type;
cristy3ed852e2009-09-05 21:47:34 +00002400 return(channel);
2401 }
2402 default:
2403 return(-1);
2404 }
2405 }
2406 return(channel);
2407}
2408
2409/*
2410%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2411% %
2412% %
2413% %
cristy042ee782011-04-22 18:48:30 +00002414% P a r s e C o m m a n d O p t i o n %
cristy3ed852e2009-09-05 21:47:34 +00002415% %
2416% %
2417% %
2418%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2419%
cristy042ee782011-04-22 18:48:30 +00002420% ParseCommandOption() parses a string and returns an enumerated option
anthonyce2716b2011-04-22 09:51:34 +00002421% type(s). Return a value of -1 if no such option is found.
cristy3ed852e2009-09-05 21:47:34 +00002422%
cristy042ee782011-04-22 18:48:30 +00002423% The format of the ParseCommandOption method is:
cristy3ed852e2009-09-05 21:47:34 +00002424%
anthony31f1bf72012-01-30 12:37:22 +00002425% ssize_t ParseCommandOption(const CommandOption option_table,
cristy3ed852e2009-09-05 21:47:34 +00002426% const MagickBooleanType list,const char *options)
2427%
2428% A description of each parameter follows:
2429%
anthony31f1bf72012-01-30 12:37:22 +00002430% o option_table: Index to the option table to lookup
cristy3ed852e2009-09-05 21:47:34 +00002431%
2432% o list: A option other than zero permits more than one option separated by
2433% a comma or pipe.
2434%
2435% o options: One or more options separated by commas.
2436%
2437*/
anthony31f1bf72012-01-30 12:37:22 +00002438MagickExport ssize_t ParseCommandOption(const CommandOption option_table,
cristy3ed852e2009-09-05 21:47:34 +00002439 const MagickBooleanType list,const char *options)
2440{
2441 char
2442 token[MaxTextExtent];
2443
2444 const OptionInfo
2445 *option_info;
2446
2447 int
2448 sentinel;
2449
cristy3ed852e2009-09-05 21:47:34 +00002450 MagickBooleanType
2451 negate;
2452
2453 register char
2454 *q;
2455
2456 register const char
2457 *p;
2458
cristybb503372010-05-27 20:51:26 +00002459 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002460 i;
2461
cristyb9902b72010-10-05 18:21:50 +00002462 ssize_t
2463 option_types;
2464
anthony31f1bf72012-01-30 12:37:22 +00002465 option_info=GetOptionInfo(option_table);
cristy3ed852e2009-09-05 21:47:34 +00002466 if (option_info == (const OptionInfo *) NULL)
2467 return(-1);
2468 option_types=0;
2469 sentinel=',';
2470 if (strchr(options,'|') != (char *) NULL)
2471 sentinel='|';
2472 for (p=options; p != (char *) NULL; p=strchr(p,sentinel))
2473 {
2474 while (((isspace((int) ((unsigned char) *p)) != 0) || (*p == sentinel)) &&
2475 (*p != '\0'))
2476 p++;
2477 negate=(*p == '!') ? MagickTrue : MagickFalse;
2478 if (negate != MagickFalse)
2479 p++;
2480 q=token;
2481 while (((isspace((int) ((unsigned char) *p)) == 0) && (*p != sentinel)) &&
2482 (*p != '\0'))
2483 {
cristya0019202011-06-07 13:23:55 +00002484 if ((q-token) >= (MaxTextExtent-1))
cristy3ed852e2009-09-05 21:47:34 +00002485 break;
2486 *q++=(*p++);
2487 }
2488 *q='\0';
2489 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2490 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2491 {
2492 if (*token == '!')
2493 option_types=option_types &~ option_info[i].type;
2494 else
2495 option_types=option_types | option_info[i].type;
2496 break;
2497 }
2498 if ((option_info[i].mnemonic == (char *) NULL) &&
2499 ((strchr(token+1,'-') != (char *) NULL) ||
2500 (strchr(token+1,'_') != (char *) NULL)))
2501 {
2502 while ((q=strchr(token+1,'-')) != (char *) NULL)
2503 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2504 while ((q=strchr(token+1,'_')) != (char *) NULL)
2505 (void) CopyMagickString(q,q+1,MaxTextExtent-strlen(q));
2506 for (i=0; option_info[i].mnemonic != (char *) NULL; i++)
2507 if (LocaleCompare(token,option_info[i].mnemonic) == 0)
2508 {
2509 if (*token == '!')
2510 option_types=option_types &~ option_info[i].type;
2511 else
2512 option_types=option_types | option_info[i].type;
2513 break;
2514 }
2515 }
2516 if (option_info[i].mnemonic == (char *) NULL)
2517 return(-1);
2518 if (list == MagickFalse)
2519 break;
2520 }
2521 return(option_types);
2522}
2523
2524/*
2525%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2526% %
2527% %
2528% %
cristy953c4bd2012-02-24 01:04:04 +00002529% P a r s e P i x e l C h a n n e l O p t i o n %
2530% %
2531% %
2532% %
2533%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2534%
2535% ParsePixelChannelOption() parses a string and returns an enumerated pixel
2536% channel type(s).
2537%
2538% The format of the ParsePixelChannelOption method is:
2539%
2540% ssize_t ParsePixelChannelOption(const char *channels)
2541%
2542% A description of each parameter follows:
2543%
cristyd04e7bf2012-03-03 19:19:12 +00002544% o channels: One or more channels separated by commas.
cristy953c4bd2012-02-24 01:04:04 +00002545%
2546*/
2547MagickExport ssize_t ParsePixelChannelOption(const char *channels)
2548{
cristyd04e7bf2012-03-03 19:19:12 +00002549 char
cristya15140f2012-03-04 01:21:15 +00002550 *q,
2551 token[MaxTextExtent];
cristy953c4bd2012-02-24 01:04:04 +00002552
2553 ssize_t
2554 channel;
2555
cristya15140f2012-03-04 01:21:15 +00002556 GetMagickToken(channels,NULL,token);
cristyd4311d42012-03-18 23:03:10 +00002557 if ((*token == ';') || (*token == '|'))
2558 return(RedPixelChannel);
cristya15140f2012-03-04 01:21:15 +00002559 channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
cristy953c4bd2012-02-24 01:04:04 +00002560 if (channel >= 0)
2561 return(channel);
cristya15140f2012-03-04 01:21:15 +00002562 q=(char *) token;
2563 channel=InterpretLocaleValue(token,&q);
cristyabb241b2012-03-06 01:12:58 +00002564 if ((q == token) || (channel < 0) || (channel >= MaxPixelChannels))
cristyd04e7bf2012-03-03 19:19:12 +00002565 return(-1);
cristy953c4bd2012-02-24 01:04:04 +00002566 return(channel);
2567}
2568
2569/*
2570%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2571% %
2572% %
2573% %
cristy3ed852e2009-09-05 21:47:34 +00002574% R e m o v e I m a g e O p t i o n %
2575% %
2576% %
2577% %
2578%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2579%
2580% RemoveImageOption() removes an option from the image and returns its value.
2581%
2582% The format of the RemoveImageOption method is:
2583%
2584% char *RemoveImageOption(ImageInfo *image_info,const char *option)
2585%
2586% A description of each parameter follows:
2587%
2588% o image_info: the image info.
2589%
2590% o option: the image option.
2591%
2592*/
2593MagickExport char *RemoveImageOption(ImageInfo *image_info,const char *option)
2594{
2595 char
2596 *value;
2597
2598 assert(image_info != (ImageInfo *) NULL);
2599 assert(image_info->signature == MagickSignature);
2600 if (image_info->debug != MagickFalse)
2601 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2602 image_info->filename);
2603 if (image_info->options == (void *) NULL)
2604 return((char *) NULL);
2605 value=(char *) RemoveNodeFromSplayTree((SplayTreeInfo *)
2606 image_info->options,option);
2607 return(value);
2608}
2609
2610/*
2611%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2612% %
2613% %
2614% %
2615% R e s e t I m a g e O p t i o n %
2616% %
2617% %
2618% %
2619%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2620%
2621% ResetImageOptions() resets the image_info option. That is, it deletes
2622% all options associated with the image_info structure.
2623%
2624% The format of the ResetImageOptions method is:
2625%
2626% ResetImageOptions(ImageInfo *image_info)
2627%
2628% A description of each parameter follows:
2629%
2630% o image_info: the image info.
2631%
2632*/
2633MagickExport void ResetImageOptions(const ImageInfo *image_info)
2634{
2635 assert(image_info != (ImageInfo *) NULL);
2636 assert(image_info->signature == MagickSignature);
2637 if (image_info->debug != MagickFalse)
2638 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2639 image_info->filename);
2640 if (image_info->options == (void *) NULL)
2641 return;
2642 ResetSplayTree((SplayTreeInfo *) image_info->options);
2643}
2644
2645/*
2646%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2647% %
2648% %
2649% %
2650% R e s e t I m a g e O p t i o n I t e r a t o r %
2651% %
2652% %
2653% %
2654%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2655%
2656% ResetImageOptionIterator() resets the image_info values iterator. Use it
2657% in conjunction with GetNextImageOption() to iterate over all the values
2658% associated with an image option.
2659%
2660% The format of the ResetImageOptionIterator method is:
2661%
2662% ResetImageOptionIterator(ImageInfo *image_info)
2663%
2664% A description of each parameter follows:
2665%
2666% o image_info: the image info.
2667%
2668*/
2669MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
2670{
2671 assert(image_info != (ImageInfo *) NULL);
2672 assert(image_info->signature == MagickSignature);
2673 if (image_info->debug != MagickFalse)
2674 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2675 image_info->filename);
2676 if (image_info->options == (void *) NULL)
2677 return;
2678 ResetSplayTreeIterator((SplayTreeInfo *) image_info->options);
2679}
2680
2681/*
2682%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2683% %
2684% %
2685% %
2686% S e t I m a g e O p t i o n %
2687% %
2688% %
2689% %
2690%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2691%
2692% SetImageOption() associates an value with an image option.
2693%
2694% The format of the SetImageOption method is:
2695%
2696% MagickBooleanType SetImageOption(ImageInfo *image_info,
2697% const char *option,const char *value)
2698%
2699% A description of each parameter follows:
2700%
2701% o image_info: the image info.
2702%
2703% o option: the image option.
2704%
2705% o values: the image option values.
2706%
2707*/
2708MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info,
2709 const char *option,const char *value)
2710{
cristy3ed852e2009-09-05 21:47:34 +00002711 assert(image_info != (ImageInfo *) NULL);
2712 assert(image_info->signature == MagickSignature);
2713 if (image_info->debug != MagickFalse)
2714 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2715 image_info->filename);
anthony7df2b832011-10-06 11:55:25 +00002716
anthony7df2b832011-10-06 11:55:25 +00002717 /* This should not be here! - but others might */
cristy3ed852e2009-09-05 21:47:34 +00002718 if (LocaleCompare(option,"size") == 0)
2719 (void) CloneString(&image_info->size,value);
anthony7df2b832011-10-06 11:55:25 +00002720
anthony72feaa62012-01-17 06:46:23 +00002721 /* create tree if needed - specify how key,values are to be freed */
cristy3ed852e2009-09-05 21:47:34 +00002722 if (image_info->options == (void *) NULL)
2723 image_info->options=NewSplayTree(CompareSplayTreeString,
2724 RelinquishMagickMemory,RelinquishMagickMemory);
anthony7df2b832011-10-06 11:55:25 +00002725
anthonyd181ea02011-10-12 07:44:13 +00002726 /* Delete Option if NULL */
2727 if (value == (const char *) NULL)
2728 return(DeleteImageOption(image_info,option));
2729
anthony7df2b832011-10-06 11:55:25 +00002730 /* add option and return */
cristye3f77792011-10-07 00:09:09 +00002731 return(AddValueToSplayTree((SplayTreeInfo *) image_info->options,
2732 ConstantString(option),ConstantString(value)));
cristy3ed852e2009-09-05 21:47:34 +00002733}