2 Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://imagemagick.org/script/license.php
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.
16 MagickCore Binary Large OBjects methods.
18 #ifndef MAGICKCORE_BLOB_H
19 #define MAGICKCORE_BLOB_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #define MagickMaxBufferExtent 81920
36 (*CustomStreamHandler)(unsigned char *,const size_t,void *);
38 typedef MagickOffsetType
39 (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
41 typedef MagickOffsetType
42 (*CustomStreamTeller)(void *);
44 typedef struct _CustomStreamInfo
47 #include "MagickCore/image.h"
48 #include "MagickCore/stream.h"
50 extern MagickExport CustomStreamInfo
51 *AcquireCustomStreamInfo(ExceptionInfo *),
52 *DestroyCustomStreamInfo(CustomStreamInfo *);
54 extern MagickExport FILE
55 *GetBlobFileHandle(const Image *);
57 extern MagickExport Image
58 *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
59 *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
60 *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
62 extern MagickExport MagickBooleanType
63 BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
64 FileToImage(Image *,const char *,ExceptionInfo *),
65 GetBlobError(const Image *),
66 ImageToFile(Image *,char *,ExceptionInfo *),
67 InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
69 IsBlobExempt(const Image *),
70 IsBlobSeekable(const Image *),
71 IsBlobTemporary(const Image *);
73 extern MagickExport MagickSizeType
74 GetBlobSize(const Image *);
76 extern MagickExport StreamHandler
77 GetBlobStreamHandler(const Image *);
79 extern MagickExport void
80 *GetBlobStreamData(const Image *),
82 DuplicateBlob(Image *,const Image *),
83 *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
84 *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
85 ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
86 *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
87 ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
88 SetBlobExempt(Image *,const MagickBooleanType),
89 SetCustomStreamData(CustomStreamInfo *,void *),
90 SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
91 SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
92 SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
93 SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
95 #if defined(__cplusplus) || defined(c_plusplus)