blob: dc3cdf4dc97685e2ae1ae109ac4b6fedcd43f570 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy7e41fe82010-12-04 23:12:08 +00002 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 http://www.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 MagickAlphaOptions,
30 MagickBooleanOptions,
31 MagickChannelOptions,
32 MagickClassOptions,
33 MagickClipPathOptions,
34 MagickCoderOptions,
35 MagickColorOptions,
36 MagickColorspaceOptions,
37 MagickCommandOptions,
38 MagickComposeOptions,
39 MagickCompressOptions,
40 MagickConfigureOptions,
41 MagickDataTypeOptions,
42 MagickDebugOptions,
43 MagickDecorateOptions,
44 MagickDelegateOptions,
cristyc9b12952010-03-28 01:12:28 +000045 MagickDirectionOptions,
cristy3ed852e2009-09-05 21:47:34 +000046 MagickDisposeOptions,
47 MagickDistortOptions,
48 MagickDitherOptions,
49 MagickEndianOptions,
50 MagickEvaluateOptions,
51 MagickFillRuleOptions,
52 MagickFilterOptions,
53 MagickFontOptions,
54 MagickFontsOptions,
55 MagickFormatOptions,
56 MagickFunctionOptions,
57 MagickGravityOptions,
cristy3ed852e2009-09-05 21:47:34 +000058 MagickIntentOptions,
59 MagickInterlaceOptions,
60 MagickInterpolateOptions,
anthony29188a82010-01-22 10:12:34 +000061 MagickKernelOptions,
cristy3ed852e2009-09-05 21:47:34 +000062 MagickLayerOptions,
63 MagickLineCapOptions,
64 MagickLineJoinOptions,
65 MagickListOptions,
66 MagickLocaleOptions,
67 MagickLogEventOptions,
68 MagickLogOptions,
69 MagickMagicOptions,
70 MagickMethodOptions,
71 MagickMetricOptions,
72 MagickMimeOptions,
73 MagickModeOptions,
74 MagickModuleOptions,
anthony29188a82010-01-22 10:12:34 +000075 MagickMorphologyOptions,
cristy3ed852e2009-09-05 21:47:34 +000076 MagickNoiseOptions,
77 MagickOrientationOptions,
78 MagickPolicyOptions,
79 MagickPolicyDomainOptions,
80 MagickPolicyRightsOptions,
81 MagickPreviewOptions,
82 MagickPrimitiveOptions,
83 MagickQuantumFormatOptions,
84 MagickResolutionOptions,
85 MagickResourceOptions,
86 MagickSparseColorOptions,
cristy0834d642011-03-18 18:26:08 +000087 MagickStatisticOptions,
cristy3ed852e2009-09-05 21:47:34 +000088 MagickStorageOptions,
89 MagickStretchOptions,
90 MagickStyleOptions,
91 MagickThresholdOptions,
92 MagickTypeOptions,
93 MagickValidateOptions,
anthony29188a82010-01-22 10:12:34 +000094 MagickVirtualPixelOptions
cristy042ee782011-04-22 18:48:30 +000095} CommandOption;
cristy3ed852e2009-09-05 21:47:34 +000096
97typedef enum
98{
99 UndefinedValidate,
100 NoValidate = 0x00000,
101 CompareValidate = 0x00001,
102 CompositeValidate = 0x00002,
103 ConvertValidate = 0x00004,
104 FormatsInMemoryValidate = 0x00008,
105 FormatsOnDiskValidate = 0x00010,
106 IdentifyValidate = 0x00020,
107 ImportExportValidate = 0x00040,
108 MontageValidate = 0x00080,
109 StreamValidate = 0x00100,
110 AllValidate = 0x7fffffff
111} ValidateType;
112
113typedef struct _OptionInfo
114{
115 const char
116 *mnemonic;
117
cristybb503372010-05-27 20:51:26 +0000118 ssize_t
cristy042ee782011-04-22 18:48:30 +0000119 type,
120 flags;
cristy3ed852e2009-09-05 21:47:34 +0000121
122 MagickBooleanType
123 stealth;
124} OptionInfo;
125
cristy042ee782011-04-22 18:48:30 +0000126/*
127 Flags to describe classes of image processing options.
128*/
anthonyce2716b2011-04-22 09:51:34 +0000129typedef enum
130{
cristy042ee782011-04-22 18:48:30 +0000131 UndefinedOptionFlag = 0x0000,
cristy1df692a2011-04-23 17:09:35 +0000132 FireOptionFlag = 0x0001, /* Option sequence firing point */
anthonyce2716b2011-04-22 09:51:34 +0000133#if 0
cristy042ee782011-04-22 18:48:30 +0000134 ImageInfoOptionFlag = 0x0002, /* Sets ImageInfo only, no image needed */
cristy1df692a2011-04-23 17:09:35 +0000135 SimpleOptionFlag = 0x0004, /* Simple image processing option */
cristy042ee782011-04-22 18:48:30 +0000136 ImageListOptionFlag = 0x0010, /* Multi-Image list processing option */
anthonyce2716b2011-04-22 09:51:34 +0000137#endif
cristy1df692a2011-04-23 17:09:35 +0000138 DeprecateOptionFlag = 0x1000 /* Deprecate option, give warning */
anthonyce2716b2011-04-22 09:51:34 +0000139} CommandOptionFlags;
140
cristy3ed852e2009-09-05 21:47:34 +0000141extern MagickExport char
cristy042ee782011-04-22 18:48:30 +0000142 **GetCommandOptions(const CommandOption),
cristy3ed852e2009-09-05 21:47:34 +0000143 *GetNextImageOption(const ImageInfo *),
144 *RemoveImageOption(ImageInfo *,const char *);
145
146extern MagickExport const char
cristy042ee782011-04-22 18:48:30 +0000147 *CommandOptionToMnemonic(const CommandOption,const ssize_t),
148 *GetImageOption(const ImageInfo *,const char *);
cristy3ed852e2009-09-05 21:47:34 +0000149
cristy3ed852e2009-09-05 21:47:34 +0000150extern MagickExport MagickBooleanType
151 CloneImageOptions(ImageInfo *,const ImageInfo *),
152 DefineImageOption(ImageInfo *,const char *),
153 DeleteImageOption(ImageInfo *,const char *),
cristy042ee782011-04-22 18:48:30 +0000154 IsCommandOption(const char *),
155 ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *),
cristy3ed852e2009-09-05 21:47:34 +0000156 SetImageOption(ImageInfo *,const char *,const char *);
157
cristy5ed838e2010-05-31 00:05:35 +0000158extern MagickExport ssize_t
cristy042ee782011-04-22 18:48:30 +0000159 GetCommandOptionFlags(const CommandOption,const MagickBooleanType,
160 const char *),
cristy5ed838e2010-05-31 00:05:35 +0000161 ParseChannelOption(const char *),
cristy042ee782011-04-22 18:48:30 +0000162 ParseCommandOption(const CommandOption,const MagickBooleanType,const char *);
cristy5ed838e2010-05-31 00:05:35 +0000163
cristy3ed852e2009-09-05 21:47:34 +0000164extern MagickExport void
165 DestroyImageOptions(ImageInfo *),
166 ResetImageOptions(const ImageInfo *),
167 ResetImageOptionIterator(const ImageInfo *);
168
169#if defined(__cplusplus) || defined(c_plusplus)
170}
171#endif
172
173#endif