2 Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore option methods.
18 #ifndef MAGICKCORE_OPTION_H
19 #define MAGICKCORE_OPTION_H
21 #if defined(__cplusplus) || defined(c_plusplus)
27 MagickUndefinedOptions = -1,
28 MagickAlignOptions = 0,
29 MagickAlphaChannelOptions,
34 MagickClipPathOptions,
37 MagickColorspaceOptions,
40 MagickComplianceOptions,
42 MagickCompressOptions,
43 MagickConfigureOptions,
44 MagickDataTypeOptions,
46 MagickDecorateOptions,
47 MagickDelegateOptions,
48 MagickDirectionOptions,
53 MagickEvaluateOptions,
54 MagickFillRuleOptions,
59 MagickFunctionOptions,
60 MagickGradientOptions,
62 MagickIntensityOptions,
64 MagickInterlaceOptions,
65 MagickInterpolateOptions,
69 MagickLineJoinOptions,
72 MagickLogEventOptions,
80 MagickMorphologyOptions,
82 MagickOrientationOptions,
83 MagickPixelChannelOptions,
84 MagickPixelIntensityOptions,
85 MagickPixelMaskOptions,
86 MagickPixelTraitOptions,
88 MagickPolicyDomainOptions,
89 MagickPolicyRightsOptions,
91 MagickPrimitiveOptions,
92 MagickQuantumFormatOptions,
93 MagickResolutionOptions,
94 MagickResourceOptions,
95 MagickSparseColorOptions,
96 MagickStatisticOptions,
100 MagickThresholdOptions,
102 MagickValidateOptions,
103 MagickVirtualPixelOptions,
110 NoValidate = 0x00000,
111 ColorspaceValidate = 0x00001,
112 CompareValidate = 0x00002,
113 CompositeValidate = 0x00004,
114 ConvertValidate = 0x00008,
115 FormatsDiskValidate = 0x00010,
116 FormatsMapValidate = 0x00020,
117 FormatsMemoryValidate = 0x00040,
118 IdentifyValidate = 0x00080,
119 ImportExportValidate = 0x00100,
120 MontageValidate = 0x00200,
121 StreamValidate = 0x00400,
122 AllValidate = 0x7fffffff
126 Flags to describe classes of image processing options.
127 These are used to determine how a option should be processed, and
128 avoid attempting to process all options in every way posible.
132 UndefinedOptionFlag = 0x0000, /* option flag is not in use */
134 ImageInfoOptionFlag = 0x0001, /* Setting stored in ImageInfo */
135 DrawInfoOptionFlag = 0x0002, /* Setting stored in DrawInfo */
136 QuantizeInfoOptionFlag = 0x0004, /* Setting stored in QuantizeInfo */
137 GlobalOptionFlag = 0x0008, /* Global Setting or Control */
138 SettingOptionFlags = 0x000F, /* mask any setting option */
140 NoImageOperatorFlag = 0x0010, /* Images not required operator */
141 SimpleOperatorFlag = 0x0020, /* Simple Image processing operator */
142 ListOperatorFlag = 0x0040, /* Multi-Image processing operator */
143 GenesisOptionFlag = 0x0080, /* MagickCommandGenesis() Only Option */
145 SpecialOptionFlag = 0x0100, /* Operator with Special Requirements */
146 /* EG: for specific CLI commands */
148 AlwaysInterpretArgsFlag = 0x0400, /* Always Interpret escapes in Args */
149 /* CF: "convert" compatibility mode */
150 NeverInterpretArgsFlag = 0x0800, /* Never Interpret escapes in Args */
151 /* EG: filename, or delayed escapes */
153 NonMagickOptionFlag = 0x1000, /* Option not used by Magick Command */
154 FireOptionFlag = 0x2000, /* Convert operation seq firing point */
155 DeprecateOptionFlag = 0x4000, /* Deprecate option (no code) */
156 ReplacedOptionFlag = 0x8800 /* Replaced Option (but still works) */
158 } CommandOptionFlags;
160 typedef struct _OptionInfo
174 extern MagickExport char
175 **GetCommandOptions(const CommandOption),
176 *GetNextImageOption(const ImageInfo *),
177 *RemoveImageOption(ImageInfo *,const char *);
179 extern MagickExport const char
180 *CommandOptionToMnemonic(const CommandOption,const ssize_t),
181 *GetImageOption(const ImageInfo *,const char *);
183 extern MagickExport MagickBooleanType
184 CloneImageOptions(ImageInfo *,const ImageInfo *),
185 DefineImageOption(ImageInfo *,const char *),
186 DeleteImageOption(ImageInfo *,const char *),
187 IsCommandOption(const char *),
188 IsOptionMember(const char *,const char *),
189 ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *),
190 SetImageOption(ImageInfo *,const char *,const char *);
192 extern MagickExport ssize_t
193 GetCommandOptionFlags(const CommandOption,const MagickBooleanType,
195 ParseChannelOption(const char *),
196 ParsePixelChannelOption(const char *),
197 ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
199 extern MagickExport void
200 DestroyImageOptions(ImageInfo *),
201 ResetImageOptions(const ImageInfo *),
202 ResetImageOptionIterator(const ImageInfo *);
204 extern MagickExport const OptionInfo
205 *GetCommandOptionInfo(const char *value);
207 #if defined(__cplusplus) || defined(c_plusplus)