2 Copyright 1999-2017 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://www.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
35 (*CustomStreamHandler)(const unsigned char *,const size_t,const void *);
38 (*CustomStreamSeeker)(const MagickOffsetType,const int,const void *);
40 typedef MagickOffsetType
41 (*CustomStreamTeller)(const void *);
43 typedef struct _CustomStreamInfo
46 #include "MagickCore/image.h"
47 #include "MagickCore/stream.h"
49 extern MagickExport CustomStreamInfo
50 *AcquireCustomStreamInfo(ExceptionInfo *),
51 *DestroyCustomStreamInfo(CustomStreamInfo *);
53 extern MagickExport FILE
54 *GetBlobFileHandle(const Image *);
56 extern MagickExport Image
57 *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
58 *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
59 *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
61 extern MagickExport MagickBooleanType
62 BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
63 FileToImage(Image *,const char *,ExceptionInfo *),
64 GetBlobError(const Image *),
65 ImageToFile(Image *,char *,ExceptionInfo *),
66 InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
68 IsBlobExempt(const Image *),
69 IsBlobSeekable(const Image *),
70 IsBlobTemporary(const Image *);
72 extern MagickExport MagickSizeType
73 GetBlobSize(const Image *);
75 extern MagickExport StreamHandler
76 GetBlobStreamHandler(const Image *);
78 extern MagickExport void
79 *GetBlobStreamData(const Image *),
81 DuplicateBlob(Image *,const Image *),
82 *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
83 *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
84 ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
85 *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
86 ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
87 SetBlobExempt(Image *,const MagickBooleanType),
88 SetCustomStreamData(CustomStreamInfo *,void *),
89 SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
90 SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
91 SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
92 SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
94 #if defined(__cplusplus) || defined(c_plusplus)