1/*
2  Copyright 1999-2016 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    http://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#include "MagickCore/image.h"
22#include "MagickCore/stream.h"
23
24#if defined(__cplusplus) || defined(c_plusplus)
25extern "C" {
26#endif
27
28#define MagickMaxBufferExtent  81920
29
30typedef enum
31{
32  ReadMode,
33  WriteMode,
34  IOMode
35} MapMode;
36
37extern MagickExport FILE
38  *GetBlobFileHandle(const Image *);
39
40extern MagickExport Image
41  *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
42  *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *);
43
44extern MagickExport MagickBooleanType
45  BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
46  FileToImage(Image *,const char *,ExceptionInfo *),
47  GetBlobError(const Image *),
48  ImageToFile(Image *,char *,ExceptionInfo *),
49  InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
50    ExceptionInfo *),
51  IsBlobExempt(const Image *),
52  IsBlobSeekable(const Image *),
53  IsBlobTemporary(const Image *);
54
55extern MagickExport MagickSizeType
56  GetBlobSize(const Image *);
57
58extern MagickExport StreamHandler
59  GetBlobStreamHandler(const Image *);
60
61extern MagickExport void
62  *GetBlobStreamData(const Image *),
63  DestroyBlob(Image *),
64  DuplicateBlob(Image *,const Image *),
65  *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
66  *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
67  *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
68  SetBlobExempt(Image *,const MagickBooleanType);
69
70#if defined(__cplusplus) || defined(c_plusplus)
71}
72#endif
73
74#endif
75