MagickCore  7.0.3
option.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 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)
22 extern "C" {
23 #endif
24 
25 typedef enum
26 {
108 } CommandOption;
109 
110 typedef enum
111 {
113  NoValidate = 0x00000,
115  CompareValidate = 0x00002,
116  CompositeValidate = 0x00004,
117  ConvertValidate = 0x00008,
121  IdentifyValidate = 0x00080,
123  MontageValidate = 0x00200,
124  StreamValidate = 0x00400,
125  AllValidate = 0x7fffffff
126 } ValidateType;
127 
128 /*
129  Flags to describe classes of image processing options.
130  These are used to determine how a option should be processed, and
131  avoid attempting to process all options in every way posible.
132 */
133 typedef enum
134 {
135  UndefinedOptionFlag = 0x0000, /* option flag is not in use */
136 
137  ImageInfoOptionFlag = 0x0001, /* Setting stored in ImageInfo */
138  DrawInfoOptionFlag = 0x0002, /* Setting stored in DrawInfo */
139  QuantizeInfoOptionFlag = 0x0004, /* Setting stored in QuantizeInfo */
140  GlobalOptionFlag = 0x0008, /* Global Setting or Control */
141  SettingOptionFlags = 0x000F, /* mask any setting option */
142 
143  NoImageOperatorFlag = 0x0010, /* Images not required operator */
144  SimpleOperatorFlag = 0x0020, /* Simple Image processing operator */
145  ListOperatorFlag = 0x0040, /* Multi-Image processing operator */
146  GenesisOptionFlag = 0x0080, /* MagickCommandGenesis() Only Option */
147 
148  SpecialOptionFlag = 0x0100, /* Operator with Special Requirements */
149  /* EG: for specific CLI commands */
150 
151  AlwaysInterpretArgsFlag = 0x0400, /* Always Interpret escapes in Args */
152  /* CF: "convert" compatibility mode */
153  NeverInterpretArgsFlag = 0x0800, /* Never Interpret escapes in Args */
154  /* EG: filename, or delayed escapes */
155 
156  NonMagickOptionFlag = 0x1000, /* Option not used by Magick Command */
157  FireOptionFlag = 0x2000, /* Convert operation seq firing point */
158  DeprecateOptionFlag = 0x4000, /* Deprecate option (no code) */
159  ReplacedOptionFlag = 0x8800 /* Replaced Option (but still works) */
160 
162 
163 typedef struct _OptionInfo
164 {
165  const char
167 
168  ssize_t
170  flags;
171 
174 } OptionInfo;
175 
176 
177 extern MagickExport char
179  *GetNextImageOption(const ImageInfo *),
180  *RemoveImageOption(ImageInfo *,const char *);
181 
182 extern MagickExport const char
183  *CommandOptionToMnemonic(const CommandOption,const ssize_t),
184  *GetImageOption(const ImageInfo *,const char *);
185 
188  DefineImageOption(ImageInfo *,const char *),
189  DeleteImageOption(ImageInfo *,const char *),
190  IsCommandOption(const char *),
191  IsOptionMember(const char *,const char *),
193  SetImageOption(ImageInfo *,const char *,const char *);
194 
195 extern MagickExport ssize_t
197  const char *),
198  ParseChannelOption(const char *),
199  ParsePixelChannelOption(const char *),
200  ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
201 
202 extern MagickExport void
204  ResetImageOptions(const ImageInfo *),
206 
207 extern MagickExport const OptionInfo
208  *GetCommandOptionInfo(const char *value);
209 
210 #if defined(__cplusplus) || defined(c_plusplus)
211 }
212 #endif
213 
214 #endif
MagickExport void ResetImageOptions(const ImageInfo *image_info)
Definition: option.c:3162
MagickExport MagickBooleanType IsOptionMember(const char *option, const char *options)
Definition: option.c:2726
MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info, const char *option)
Definition: option.c:2227
MagickExport ssize_t ParseCommandOption(const CommandOption option, const MagickBooleanType list, const char *options)
Definition: option.c:2967
CommandOptionFlags
Definition: option.h:133
MagickBooleanType stealth
Definition: option.h:173
MagickExport char ** GetCommandOptions(const CommandOption option)
Definition: option.c:2560
MagickExport const char * GetImageOption(const ImageInfo *image_info, const char *option)
Definition: option.c:2302
MagickExport ssize_t ParseChannelOption(const char *channels)
Definition: option.c:2847
MagickExport void DestroyImageOptions(ImageInfo *image_info)
Definition: option.c:2263
MagickExport MagickBooleanType SetImageOption(ImageInfo *image_info, const char *option, const char *value)
Definition: option.c:3237
MagickExport MagickBooleanType DefineImageOption(ImageInfo *image_info, const char *option)
Definition: option.c:2177
MagickBooleanType
Definition: magick-type.h:158
MagickExport const char * CommandOptionToMnemonic(const CommandOption option, const ssize_t type)
Definition: option.c:2680
struct _OptionInfo OptionInfo
const char * mnemonic
Definition: option.h:166
MagickExport const OptionInfo * GetCommandOptionInfo(const char *option)
Definition: option.c:2527
MagickExport void ResetImageOptionIterator(const ImageInfo *image_info)
Definition: option.c:3198
MagickExport ssize_t GetCommandOptionFlags(const CommandOption option, const MagickBooleanType list, const char *options)
Definition: option.c:2420
ssize_t type
Definition: option.h:169
ssize_t flags
Definition: option.h:169
MagickExport MagickBooleanType ListCommandOptions(FILE *file, const CommandOption option, ExceptionInfo *magick_unused(exception))
Definition: option.c:2800
MagickExport MagickBooleanType CloneImageOptions(ImageInfo *image_info, const ImageInfo *clone_info)
Definition: option.c:2130
ValidateType
Definition: option.h:110
MagickExport ssize_t ParsePixelChannelOption(const char *channels)
Definition: option.c:3073
MagickExport char * RemoveImageOption(ImageInfo *image_info, const char *option)
Definition: option.c:3122
#define MagickExport
CommandOption
Definition: option.h:25
MagickExport MagickBooleanType IsCommandOption(const char *option)
Definition: option.c:2641
MagickExport char * GetNextImageOption(const ImageInfo *image_info)
Definition: option.c:2606