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 http://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 typedef struct _UserBlobInfo UserBlobInfo;
23 #include "MagickCore/image.h"
24 #include "MagickCore/stream.h"
26 #if defined(__cplusplus) || defined(c_plusplus)
30 #define MagickMaxBufferExtent 81920
40 (*BlobHandler)(const unsigned char *,const size_t,const void *);
43 (*BlobSeeker)(const MagickOffsetType offset,const int whence,const void *);
45 typedef MagickOffsetType
46 (*BlobTeller)(const void *);
64 extern MagickExport FILE
65 *GetBlobFileHandle(const Image *);
67 extern MagickExport Image
68 *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
69 *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
70 *UserBlobToImage(const ImageInfo *image_info,UserBlobInfo *user_info,
71 ExceptionInfo *exception);
73 extern MagickExport MagickBooleanType
74 BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
75 FileToImage(Image *,const char *,ExceptionInfo *),
76 GetBlobError(const Image *),
77 ImageToFile(Image *,char *,ExceptionInfo *),
78 InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
80 IsBlobExempt(const Image *),
81 IsBlobSeekable(const Image *),
82 IsBlobTemporary(const Image *);
84 extern MagickExport MagickSizeType
85 GetBlobSize(const Image *);
87 extern MagickExport StreamHandler
88 GetBlobStreamHandler(const Image *);
90 extern MagickExport void
91 *GetBlobStreamData(const Image *),
93 DuplicateBlob(Image *,const Image *),
94 *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
95 *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
96 ImageToUserBlob(const ImageInfo *,Image *,UserBlobInfo *,ExceptionInfo *),
97 *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
98 ImagesToUserBlob(const ImageInfo *,Image *,UserBlobInfo *,ExceptionInfo *),
99 SetBlobExempt(Image *,const MagickBooleanType);
101 #if defined(__cplusplus) || defined(c_plusplus)