MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
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)
22extern "C" {
23#endif
24
25#define MagickMaxBufferExtent 524288
26#define MagickMinBufferExtent 16384
27
28typedef enum
29{
30 ReadMode,
31 WriteMode,
32 IOMode,
33 PersistMode
34} MapMode;
35
36typedef ssize_t
37 (*CustomStreamHandler)(unsigned char *,const size_t,void *);
38
39typedef MagickOffsetType
40 (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
41
42typedef MagickOffsetType
43 (*CustomStreamTeller)(void *);
44
45typedef struct _CustomStreamInfo
47
48#include "MagickCore/image.h"
49#include "MagickCore/stream.h"
50
51extern MagickExport CustomStreamInfo
52 *AcquireCustomStreamInfo(ExceptionInfo *),
53 *DestroyCustomStreamInfo(CustomStreamInfo *);
54
55extern MagickExport FILE
56 *GetBlobFileHandle(const Image *) magick_attribute((__pure__));
57
58extern 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
63extern 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 *,
70 IsBlobExempt(const Image *) magick_attribute((__pure__)),
71 IsBlobSeekable(const Image *) magick_attribute((__pure__)),
72 IsBlobTemporary(const Image *) magick_attribute((__pure__));
73
74extern MagickExport MagickSizeType
75 GetBlobSize(const Image *);
76
77extern MagickExport StreamHandler
78 GetBlobStreamHandler(const Image *) magick_attribute((__pure__));
79
80extern 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