MagickCore  7.1.0
blob.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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 {
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 
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 *),
62 
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 
75  GetBlobSize(const Image *);
76 
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 *),
87  *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
95 
96 #if defined(__cplusplus) || defined(c_plusplus)
97 }
98 #endif
99 
100 #endif
Definition: blob.h:30
MagickExport MagickSizeType GetBlobSize(const Image *)
Definition: blob.c:1844
MagickExport Image * CustomStreamToImage(const ImageInfo *, ExceptionInfo *)
Definition: blob.c:777
MagickExport void SetCustomStreamReader(CustomStreamInfo *, CustomStreamHandler)
MagickExport CustomStreamInfo * DestroyCustomStreamInfo(CustomStreamInfo *)
Definition: blob.c:995
MagickExport MagickBooleanType InjectImageBlob(const ImageInfo *, Image *, Image *, const char *, ExceptionInfo *)
MagickExport MagickBooleanType IsBlobTemporary(const Image *) magick_attribute((__pure__))
Definition: blob.c:2960
MagickExport void SetCustomStreamData(CustomStreamInfo *, void *)
MagickExport CustomStreamInfo * AcquireCustomStreamInfo(ExceptionInfo *)
MagickExport void SetCustomStreamSeeker(CustomStreamInfo *, CustomStreamSeeker)
Definition: blob.h:32
MagickExport void ImageToCustomStream(const ImageInfo *, Image *, ExceptionInfo *)
MagickExport void SetBlobExempt(Image *, const MagickBooleanType)
MagickExport Image * BlobToImage(const ImageInfo *, const void *, const size_t, ExceptionInfo *)
ssize_t MagickOffsetType
Definition: magick-type.h:133
Definition: image.h:151
#define magick_attribute(x)
MagickExport FILE * GetBlobFileHandle(const Image *) magick_attribute((__pure__))
Definition: blob.c:1747
MagickBooleanType
Definition: magick-type.h:161
MagickExport Image * PingBlob(const ImageInfo *, const void *, const size_t, ExceptionInfo *)
MagickExport void DuplicateBlob(Image *, const Image *)
MagickExport MagickBooleanType GetBlobError(const Image *) magick_attribute((__pure__))
size_t MagickSizeType
Definition: magick-type.h:134
MagickExport StreamHandler GetBlobStreamHandler(const Image *) magick_attribute((__pure__))
Definition: blob.c:1977
MagickExport MagickBooleanType BlobToFile(char *, const void *, const size_t, ExceptionInfo *)
MagickExport MagickBooleanType ImageToFile(Image *, char *, ExceptionInfo *)
MagickExport void * FileToBlob(const char *, const size_t, size_t *, ExceptionInfo *)
ssize_t(* CustomStreamHandler)(unsigned char *, const size_t, void *)
Definition: blob.h:37
MagickExport void * GetBlobStreamData(const Image *) magick_attribute((__pure__))
MagickExport MagickBooleanType IsBlobExempt(const Image *) magick_attribute((__pure__))
Definition: blob.h:31
MagickExport void ImagesToCustomStream(const ImageInfo *, Image *, ExceptionInfo *)
MagickExport MagickBooleanType FileToImage(Image *, const char *, ExceptionInfo *)
MapMode
Definition: blob.h:28
MagickExport MagickBooleanType IsBlobSeekable(const Image *) magick_attribute((__pure__))
MagickExport void SetCustomStreamTeller(CustomStreamInfo *, CustomStreamTeller)
MagickExport void * ImagesToBlob(const ImageInfo *, Image *, size_t *, ExceptionInfo *)
MagickOffsetType(* CustomStreamTeller)(void *)
Definition: blob.h:43
MagickExport void * ImageToBlob(const ImageInfo *, Image *, size_t *, ExceptionInfo *)
MagickExport void SetCustomStreamWriter(CustomStreamInfo *, CustomStreamHandler)
Definition: blob.c:5360
MagickOffsetType(* CustomStreamSeeker)(const MagickOffsetType, const int, void *)
Definition: blob.h:40
#define MagickExport
size_t(* StreamHandler)(const Image *, const void *, const size_t)
Definition: stream.h:31
MagickExport void DestroyBlob(Image *)