MagickCore  7.1.0
Convert, Edit, Or Compose Bitmap Images
blob.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 Binary Large OBjects methods.
17 */
18 #ifndef MAGICKCORE_BLOB_H
19 #define MAGICKCORE_BLOB_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 #define MagickMaxBufferExtent 81920
26 #define MagickMinBufferExtent 16384
27 
28 typedef enum
29 {
30  ReadMode,
31  WriteMode,
32  IOMode,
33  PersistMode
34 } MapMode;
35 
36 typedef ssize_t
37  (*CustomStreamHandler)(unsigned char *,const size_t,void *);
38 
39 typedef MagickOffsetType
40  (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
41 
42 typedef MagickOffsetType
43  (*CustomStreamTeller)(void *);
44 
45 typedef struct _CustomStreamInfo
47 
48 #include "MagickCore/image.h"
49 #include "MagickCore/stream.h"
50 
51 extern MagickExport CustomStreamInfo
52  *AcquireCustomStreamInfo(ExceptionInfo *),
53  *DestroyCustomStreamInfo(CustomStreamInfo *);
54 
55 extern MagickExport FILE
56  *GetBlobFileHandle(const Image *) magick_attribute((__pure__));
57 
58 extern MagickExport Image
59  *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
60  *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
61  *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
62 
63 extern MagickExport MagickBooleanType
64  BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
65  FileToImage(Image *,const char *,ExceptionInfo *),
66  GetBlobError(const Image *) magick_attribute((__pure__)),
67  ImageToFile(Image *,char *,ExceptionInfo *),
68  InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
69  ExceptionInfo *),
70  IsBlobExempt(const Image *) magick_attribute((__pure__)),
71  IsBlobSeekable(const Image *) magick_attribute((__pure__)),
72  IsBlobTemporary(const Image *) magick_attribute((__pure__));
73 
74 extern MagickExport MagickSizeType
75  GetBlobSize(const Image *);
76 
77 extern MagickExport StreamHandler
78  GetBlobStreamHandler(const Image *) magick_attribute((__pure__));
79 
80 extern MagickExport void
81  *GetBlobStreamData(const Image *) magick_attribute((__pure__)),
82  DestroyBlob(Image *),
83  DuplicateBlob(Image *,const Image *),
84  *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
85  *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
86  ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
87  *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
88  ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
89  SetBlobExempt(Image *,const MagickBooleanType),
90  SetCustomStreamData(CustomStreamInfo *,void *),
91  SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
92  SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
93  SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
94  SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
95 
96 #if defined(__cplusplus) || defined(c_plusplus)
97 }
98 #endif
99 
100 #endif
Definition: image.h:152