blob: 54ae1539e428216f476c08f664292d3029b03c3b [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 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
25typedef enum
26{
27 UndefinedFormatType,
28 ImplicitFormatType,
29 ExplicitFormatType
30} MagickFormatType;
31
32typedef enum
33{
34 NoThreadSupport = 0x0000,
35 DecoderThreadSupport = 0x0001,
36 EncoderThreadSupport = 0x0002
37} MagickThreadSupport;
38
39typedef Image
40 *DecodeImageHandler(const ImageInfo *,ExceptionInfo *);
41
42typedef MagickBooleanType
43 EncodeImageHandler(const ImageInfo *,Image *);
44
45typedef MagickBooleanType
46 IsImageFormatHandler(const unsigned char *,const size_t);
47
48typedef 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 struct _MagickInfo
89 *previous,
90 *next; /* deprecated, use GetMagickInfoList() */
91
cristybb503372010-05-27 20:51:26 +000092 size_t
cristy3ed852e2009-09-05 21:47:34 +000093 signature;
94} MagickInfo;
95
96extern MagickExport char
cristybb503372010-05-27 20:51:26 +000097 **GetMagickList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000098
99extern MagickExport const char
100 *GetMagickDescription(const MagickInfo *);
101
102extern MagickExport DecodeImageHandler
103 *GetImageDecoder(const MagickInfo *);
104
105extern MagickExport EncodeImageHandler
106 *GetImageEncoder(const MagickInfo *);
107
cristy7ce14bc2010-01-17 00:01:01 +0000108extern MagickExport int
cristybf2766a2010-01-17 03:33:23 +0000109 GetMagickPrecision(void),
110 SetMagickPrecision(const int);
cristy7ce14bc2010-01-17 00:01:01 +0000111
cristy3ed852e2009-09-05 21:47:34 +0000112extern MagickExport MagickBooleanType
113 GetImageMagick(const unsigned char *,const size_t,char *),
114 GetMagickAdjoin(const MagickInfo *),
115 GetMagickBlobSupport(const MagickInfo *),
116 GetMagickEndianSupport(const MagickInfo *),
117 GetMagickRawSupport(const MagickInfo *),
118 GetMagickSeekableStream(const MagickInfo *),
119 IsMagickInstantiated(void),
cristyf34a1452009-10-24 22:29:27 +0000120 MagickComponentGenesis(void),
cristy3ed852e2009-09-05 21:47:34 +0000121 UnregisterMagickInfo(const char *);
122
123extern const MagickExport MagickInfo
124 *GetMagickInfo(const char *,ExceptionInfo *),
cristybb503372010-05-27 20:51:26 +0000125 **GetMagickInfoList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +0000126
127extern MagickExport MagickInfo
128 *RegisterMagickInfo(MagickInfo *),
129 *SetMagickInfo(const char *);
130
131extern MagickExport MagickStatusType
132 GetMagickThreadSupport(const MagickInfo *);
133
134extern MagickExport void
cristyf34a1452009-10-24 22:29:27 +0000135 MagickComponentTerminus(void),
cristy3ed852e2009-09-05 21:47:34 +0000136 MagickCoreGenesis(const char *,const MagickBooleanType),
cristybf2766a2010-01-17 03:33:23 +0000137 MagickCoreTerminus(void);
cristy3ed852e2009-09-05 21:47:34 +0000138
139#if defined(__cplusplus) || defined(c_plusplus)
140}
141#endif
142
143#endif