MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
option.h
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License. You may
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
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.
15
16 MagickCore option methods.
17*/
18#ifndef MAGICKCORE_OPTION_H
19#define MAGICKCORE_OPTION_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25typedef enum
26{
27 MagickUndefinedOptions = -1,
28 MagickAlignOptions = 0,
29 MagickAlphaChannelOptions,
30 MagickBooleanOptions,
31 MagickCacheOptions,
32 MagickChannelOptions,
33 MagickClassOptions,
34 MagickClipPathOptions,
35 MagickCoderOptions,
36 MagickColorOptions,
37 MagickColorspaceOptions,
38 MagickCommandOptions,
39 MagickComplexOptions,
40 MagickComplianceOptions,
41 MagickComposeOptions,
42 MagickCompressOptions,
43 MagickConfigureOptions,
44 MagickDataTypeOptions,
45 MagickDebugOptions,
46 MagickDecorateOptions,
47 MagickDelegateOptions,
48 MagickDirectionOptions,
49 MagickDisposeOptions,
50 MagickDistortOptions,
51 MagickDitherOptions,
52 MagickEndianOptions,
53 MagickEvaluateOptions,
54 MagickFillRuleOptions,
55 MagickFilterOptions,
56 MagickFontOptions,
57 MagickFontsOptions,
58 MagickFormatOptions,
59 MagickFunctionOptions,
60 MagickGradientOptions,
61 MagickGravityOptions,
62 MagickIntensityOptions,
63 MagickIntentOptions,
64 MagickInterlaceOptions,
65 MagickInterpolateOptions,
66 MagickKernelOptions,
67 MagickLayerOptions,
68 MagickLineCapOptions,
69 MagickLineJoinOptions,
70 MagickListOptions,
71 MagickLocaleOptions,
72 MagickLogEventOptions,
73 MagickLogOptions,
74 MagickMagicOptions,
75 MagickMethodOptions,
76 MagickMetricOptions,
77 MagickMimeOptions,
78 MagickModeOptions,
79 MagickModuleOptions,
80 MagickMorphologyOptions,
81 MagickNoiseOptions,
82 MagickOrientationOptions,
83 MagickPixelChannelOptions,
84 MagickPixelIntensityOptions,
85 MagickPixelMaskOptions,
86 MagickPixelTraitOptions,
87 MagickPolicyOptions,
88 MagickPolicyDomainOptions,
89 MagickPolicyRightsOptions,
90 MagickPreviewOptions,
91 MagickPrimitiveOptions,
92 MagickQuantumFormatOptions,
93 MagickResolutionOptions,
94 MagickResourceOptions,
95 MagickSparseColorOptions,
96 MagickStatisticOptions,
97 MagickStorageOptions,
98 MagickStretchOptions,
99 MagickStyleOptions,
100 MagickThresholdOptions,
101 MagickTypeOptions,
102 MagickValidateOptions,
103 MagickVirtualPixelOptions,
104 MagickWeightOptions,
105 MagickAutoThresholdOptions,
106 MagickToolOptions,
107 MagickCLIOptions,
108 MagickIlluminantOptions,
109 MagickWordBreakOptions,
110 MagickPagesizeOptions
111} CommandOption;
112
113typedef enum
114{
115 UndefinedValidate,
116 NoValidate = 0x00000,
117 ColorspaceValidate = 0x00001,
118 CompareValidate = 0x00002,
119 CompositeValidate = 0x00004,
120 ConvertValidate = 0x00008,
121 FormatsDiskValidate = 0x00010,
122 FormatsMapValidate = 0x00020,
123 FormatsMemoryValidate = 0x00040,
124 IdentifyValidate = 0x00080,
125 ImportExportValidate = 0x00100,
126 MontageValidate = 0x00200,
127 StreamValidate = 0x00400,
128 MagickValidate = 0x00800,
129 AllValidate = 0x7fffffff
130} ValidateType;
131
132/*
133 Flags to describe classes of image processing options.
134 These are used to determine how a option should be processed, and
135 avoid attempting to process all options in every way possible.
136*/
137typedef enum
138{
139 UndefinedOptionFlag = 0x0000, /* option flag is not in use */
140
141 ImageInfoOptionFlag = 0x0001, /* Setting stored in ImageInfo */
142 DrawInfoOptionFlag = 0x0002, /* Setting stored in DrawInfo */
143 QuantizeInfoOptionFlag = 0x0004, /* Setting stored in QuantizeInfo */
144 GlobalOptionFlag = 0x0008, /* Global Setting or Control */
145 SettingOptionFlags = 0x000F, /* mask any setting option */
146
147 NoImageOperatorFlag = 0x0010, /* Images not required operator */
148 SimpleOperatorFlag = 0x0020, /* Simple Image processing operator */
149 ListOperatorFlag = 0x0040, /* Multi-Image processing operator */
150 GenesisOptionFlag = 0x0080, /* MagickCommandGenesis() Only Option */
151
152 SpecialOptionFlag = 0x0100, /* Operator with Special Requirements */
153 /* EG: for specific CLI commands */
154
155 AlwaysInterpretArgsFlag = 0x0400, /* Always Interpret escapes in Args */
156 /* CF: "convert" compatibility mode */
157 NeverInterpretArgsFlag = 0x0800, /* Never Interpret escapes in Args */
158 /* EG: filename, or delayed escapes */
159
160 NonMagickOptionFlag = 0x1000, /* Option not used by Magick Command */
161 FireOptionFlag = 0x2000, /* Convert operation seq firing point */
162 DeprecateOptionFlag = 0x4000, /* Deprecate option (no code) */
163 ReplacedOptionFlag = 0x8800 /* Replaced Option (but still works) */
164
165} CommandOptionFlags;
166
167typedef struct _OptionInfo
168{
169 const char
170 *mnemonic;
171
172 ssize_t
173 type,
174 flags;
175
176 MagickBooleanType
177 stealth;
178} OptionInfo;
179
180
181extern MagickExport char
182 **GetCommandOptions(const CommandOption),
183 *GetNextImageOption(const ImageInfo *),
184 *RemoveImageOption(ImageInfo *,const char *);
185
186extern MagickExport const char
187 *CommandOptionToMnemonic(const CommandOption,const ssize_t),
188 *GetImageOption(const ImageInfo *,const char *);
189
190extern MagickExport MagickBooleanType
191 CloneImageOptions(ImageInfo *,const ImageInfo *),
192 DefineImageOption(ImageInfo *,const char *),
193 DeleteImageOption(ImageInfo *,const char *),
194 IsCommandOption(const char *),
195 IsOptionMember(const char *,const char *),
196 ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *),
197 SetImageOption(ImageInfo *,const char *,const char *);
198
199extern MagickExport ssize_t
200 GetCommandOptionFlags(const CommandOption,const MagickBooleanType,
201 const char *),
202 ParseChannelOption(const char *),
203 ParsePixelChannelOption(const char *),
204 ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
205
206extern MagickExport void
207 DestroyImageOptions(ImageInfo *),
208 ResetImageOptions(const ImageInfo *),
209 ResetImageOptionIterator(const ImageInfo *);
210
211extern MagickExport const OptionInfo
212 *GetCommandOptionInfo(const char *value);
213
214#if defined(__cplusplus) || defined(c_plusplus)
215}
216#endif
217
218#endif