MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
blob.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 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.
6  obtain a copy of the License at
7 
8  https://www.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 
27 typedef enum
28 {
33 } MapMode;
34 
35 typedef ssize_t
36  (*CustomStreamHandler)(unsigned char *,const size_t,void *);
37 
38 typedef MagickOffsetType
39  (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
40 
41 typedef MagickOffsetType
42  (*CustomStreamTeller)(void *);
43 
44 typedef struct _CustomStreamInfo
46 
47 #include "MagickCore/image.h"
48 #include "MagickCore/stream.h"
49 
53 
54 extern MagickExport FILE
55  *GetBlobFileHandle(const Image *);
56 
57 extern MagickExport Image
58  *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
59  *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
61 
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 *,
68  ExceptionInfo *),
69  IsBlobExempt(const Image *),
70  IsBlobSeekable(const Image *),
71  IsBlobTemporary(const Image *);
72 
74  GetBlobSize(const Image *);
75 
77  GetBlobStreamHandler(const Image *);
78 
79 extern MagickExport void
80  *GetBlobStreamData(const Image *),
81  DestroyBlob(Image *),
82  DuplicateBlob(Image *,const Image *),
83  *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
84  *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
86  *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
94 
95 #if defined(__cplusplus) || defined(c_plusplus)
96 }
97 #endif
98 
99 #endif
Definition: blob.h:29
MagickExport MagickBooleanType IsBlobExempt(const Image *)
MagickExport MagickSizeType GetBlobSize(const Image *)
Definition: blob.c:1686
MagickExport Image * CustomStreamToImage(const ImageInfo *, ExceptionInfo *)
Definition: blob.c:734
MagickExport void SetCustomStreamReader(CustomStreamInfo *, CustomStreamHandler)
MagickExport CustomStreamInfo * DestroyCustomStreamInfo(CustomStreamInfo *)
Definition: blob.c:949
MagickExport MagickBooleanType InjectImageBlob(const ImageInfo *, Image *, Image *, const char *, ExceptionInfo *)
MagickExport void SetCustomStreamData(CustomStreamInfo *, void *)
MagickExport CustomStreamInfo * AcquireCustomStreamInfo(ExceptionInfo *)
MagickExport void SetCustomStreamSeeker(CustomStreamInfo *, CustomStreamSeeker)
Definition: blob.h:31
MagickExport void ImageToCustomStream(const ImageInfo *, Image *, ExceptionInfo *)
MagickExport MagickBooleanType IsBlobSeekable(const Image *)
MagickExport void SetBlobExempt(Image *, const MagickBooleanType)
MagickExport Image * BlobToImage(const ImageInfo *, const void *, const size_t, ExceptionInfo *)
ssize_t MagickOffsetType
Definition: magick-type.h:127
MagickExport FILE * GetBlobFileHandle(const Image *)
Definition: blob.c:1589
Definition: image.h:151
MagickExport MagickBooleanType GetBlobError(const Image *)
MagickExport MagickBooleanType IsBlobTemporary(const Image *)
Definition: blob.c:2758
MagickBooleanType
Definition: magick-type.h:156
MagickExport Image * PingBlob(const ImageInfo *, const void *, const size_t, ExceptionInfo *)
MagickExport void DuplicateBlob(Image *, const Image *)
size_t MagickSizeType
Definition: magick-type.h:128
MagickExport void * GetBlobStreamData(const Image *)
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:36
MagickExport StreamHandler GetBlobStreamHandler(const Image *)
Definition: blob.c:1810
Definition: blob.h:30
MagickExport void ImagesToCustomStream(const ImageInfo *, Image *, ExceptionInfo *)
MagickExport MagickBooleanType FileToImage(Image *, const char *, ExceptionInfo *)
MapMode
Definition: blob.h:27
MagickExport void SetCustomStreamTeller(CustomStreamInfo *, CustomStreamTeller)
MagickExport void * ImagesToBlob(const ImageInfo *, Image *, size_t *, ExceptionInfo *)
MagickOffsetType(* CustomStreamTeller)(void *)
Definition: blob.h:42
MagickExport void * ImageToBlob(const ImageInfo *, Image *, size_t *, ExceptionInfo *)
MagickExport void SetCustomStreamWriter(CustomStreamInfo *, CustomStreamHandler)
Definition: blob.c:5037
MagickOffsetType(* CustomStreamSeeker)(const MagickOffsetType, const int, void *)
Definition: blob.h:39
#define MagickExport
size_t(* StreamHandler)(const Image *, const void *, const size_t)
Definition: stream.h:31
MagickExport void DestroyBlob(Image *)