]> granicus.if.org Git - imagemagick/blob - MagickCore/magick.h
(no commit message)
[imagemagick] / MagickCore / magick.h
1 /*
2   Copyright 1999-2011 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.
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 magick methods.
17 */
18 #ifndef _MAGICKCORE_MAGICK_H
19 #define _MAGICKCORE_MAGICK_H
20
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24
25 typedef enum
26 {
27   UndefinedFormatType,
28   ImplicitFormatType,
29   ExplicitFormatType
30 } MagickFormatType;
31
32 typedef enum
33 {
34   NoThreadSupport = 0x0000,
35   DecoderThreadSupport = 0x0001,
36   EncoderThreadSupport = 0x0002
37 } MagickThreadSupport;
38
39 typedef Image
40   *DecodeImageHandler(const ImageInfo *,ExceptionInfo *);
41
42 typedef MagickBooleanType
43   EncodeImageHandler(const ImageInfo *,Image *,ExceptionInfo *);
44
45 typedef MagickBooleanType
46   IsImageFormatHandler(const unsigned char *,const size_t);
47
48 typedef struct _MagickInfo
49 {
50   char
51     *name,
52     *description,
53     *version,
54     *note,
55     *module;
56
57   ImageInfo
58     *image_info;
59
60   DecodeImageHandler
61     *decoder;
62
63   EncodeImageHandler
64     *encoder;
65
66   IsImageFormatHandler
67     *magick;
68
69   void
70     *client_data;
71
72   MagickBooleanType
73     adjoin,
74     raw,
75     endian_support,
76     blob_support,
77     seekable_stream;
78
79   MagickFormatType
80     format_type;
81
82   MagickStatusType
83     thread_support;
84
85   MagickBooleanType
86     stealth;
87
88   size_t
89     signature;
90 } MagickInfo;
91
92 extern MagickExport char
93   **GetMagickList(const char *,size_t *,ExceptionInfo *);
94
95 extern MagickExport const char
96   *GetMagickDescription(const MagickInfo *);
97
98 extern MagickExport DecodeImageHandler
99   *GetImageDecoder(const MagickInfo *);
100
101 extern MagickExport EncodeImageHandler
102   *GetImageEncoder(const MagickInfo *);
103
104 extern MagickExport int
105   GetMagickPrecision(void),
106   SetMagickPrecision(const int);
107
108 extern MagickExport MagickBooleanType
109   GetImageMagick(const unsigned char *,const size_t,char *),
110   GetMagickAdjoin(const MagickInfo *),
111   GetMagickBlobSupport(const MagickInfo *),
112   GetMagickEndianSupport(const MagickInfo *),
113   GetMagickRawSupport(const MagickInfo *),
114   GetMagickSeekableStream(const MagickInfo *),
115   IsMagickInstantiated(void),
116   MagickComponentGenesis(void),
117   UnregisterMagickInfo(const char *);
118
119 extern const MagickExport MagickInfo
120   *GetMagickInfo(const char *,ExceptionInfo *),
121   **GetMagickInfoList(const char *,size_t *,ExceptionInfo *);
122
123 extern MagickExport MagickInfo
124   *RegisterMagickInfo(MagickInfo *),
125   *SetMagickInfo(const char *);
126
127 extern MagickExport MagickStatusType
128   GetMagickThreadSupport(const MagickInfo *);
129
130 extern MagickExport void
131   MagickComponentTerminus(void),
132   MagickCoreGenesis(const char *,const MagickBooleanType),
133   MagickCoreTerminus(void);
134
135 #if defined(__cplusplus) || defined(c_plusplus)
136 }
137 #endif
138
139 #endif