MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
magick.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 magick methods.
17*/
18#ifndef MAGICKCORE_MAGICK_H
19#define MAGICKCORE_MAGICK_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include <stdarg.h>
26#include "MagickCore/semaphore.h"
27
28#if defined(__cplusplus) || defined(c_plusplus)
29# define magick_module _module /* reserved word in C++(20) */
30#else
31# define magick_module module
32#endif
33
34typedef enum
35{
36 UndefinedFormatType,
37 ImplicitFormatType,
38 ExplicitFormatType
39} MagickFormatType;
40
41typedef enum
42{
43 CoderNoFlag = 0x0000,
44 CoderAdjoinFlag = 0x0001,
45 CoderBlobSupportFlag = 0x0002,
46 CoderDecoderThreadSupportFlag = 0x0004,
47 CoderEncoderThreadSupportFlag = 0x0008,
48 CoderEndianSupportFlag = 0x0010,
49 CoderRawSupportFlag = 0x0020,
50 CoderSeekableStreamFlag = 0x0040, /* deprecated */
51 CoderStealthFlag = 0x0080,
52 CoderUseExtensionFlag = 0x0100,
53 CoderDecoderSeekableStreamFlag = 0x0200,
54 CoderEncoderSeekableStreamFlag = 0x0400
55} MagickInfoFlag;
56
57typedef Image
58 *DecodeImageHandler(const ImageInfo *,ExceptionInfo *);
59
60typedef MagickBooleanType
61 EncodeImageHandler(const ImageInfo *,Image *,ExceptionInfo *);
62
63typedef MagickBooleanType
64 IsImageFormatHandler(const unsigned char *,const size_t);
65
66typedef struct _MagickInfo
67{
68 char
69 *name,
70 *description,
71 *version,
72 *mime_type,
73 *note,
74 *magick_module;
75
76 DecodeImageHandler
77 *decoder;
78
79 EncodeImageHandler
80 *encoder;
81
83 *image_info;
84
85 IsImageFormatHandler
86 *magick;
87
88 MagickFormatType
89 format_type;
90
91 MagickStatusType
92 flags;
93
95 *semaphore;
96
97 size_t
98 signature;
99
100 void
101 *client_data;
102} MagickInfo;
103
104extern MagickExport char
105 **GetMagickList(const char *,size_t *,ExceptionInfo *);
106
107extern MagickExport const char
108 *GetMagickDescription(const MagickInfo *),
109 *GetMagickMimeType(const MagickInfo *),
110 *GetMagickModuleName(const MagickInfo *),
111 *GetMagickName(const MagickInfo *);
112
113extern MagickExport DecodeImageHandler
114 *GetImageDecoder(const MagickInfo *) magick_attribute((__pure__));
115
116extern MagickExport EncodeImageHandler
117 *GetImageEncoder(const MagickInfo *) magick_attribute((__pure__));
118
119extern MagickExport int
120 GetMagickPrecision(void),
121 SetMagickPrecision(const int);
122
123extern MagickExport MagickBooleanType
124 GetImageMagick(const unsigned char *,const size_t,char *),
125 GetMagickAdjoin(const MagickInfo *) magick_attribute((__pure__)),
126 GetMagickBlobSupport(const MagickInfo *) magick_attribute((__pure__)),
127 GetMagickDecoderSeekableStream(const MagickInfo *)
128 magick_attribute((__pure__)),
129 GetMagickDecoderThreadSupport(const MagickInfo *)
130 magick_attribute((__pure__)),
131 GetMagickEncoderSeekableStream(const MagickInfo *)
132 magick_attribute((__pure__)),
133 GetMagickEncoderThreadSupport(const MagickInfo *)
134 magick_attribute((__pure__)),
135 GetMagickEndianSupport(const MagickInfo *) magick_attribute((__pure__)),
136 GetMagickRawSupport(const MagickInfo *) magick_attribute((__pure__)),
137 GetMagickStealth(const MagickInfo *) magick_attribute((__pure__)),
138 GetMagickUseExtension(const MagickInfo *) magick_attribute((__pure__)),
139 IsMagickCoreInstantiated(void) magick_attribute((__pure__)),
140 RegisterMagickInfo(MagickInfo *),
141 UnregisterMagickInfo(const char *);
142
143extern const MagickExport MagickInfo
144 *GetMagickInfo(const char *,ExceptionInfo *),
145 **GetMagickInfoList(const char *,size_t *,ExceptionInfo *);
146
147extern MagickExport MagickInfo
148 *AcquireMagickInfo(const char *, const char *, const char *);
149
150extern MagickExport void
151 MagickCoreGenesis(const char *,const MagickBooleanType),
152 MagickCoreTerminus(void);
153
154#if defined(__cplusplus) || defined(c_plusplus)
155}
156#endif
157
158#endif