blob: 15b3b578e9aadb724767d6b9ea4ba35fda3c23e5 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy7e41fe82010-12-04 23:12:08 +00002 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 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#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include "magick/image.h"
26#include "magick/stream.h"
27
28#define MagickMaxBufferExtent 0x3c005L
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 *),
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 *),
cristyc1af14f2010-09-16 20:01:21 +000053 IsBlobTemporary(const Image *);
cristy3ed852e2009-09-05 21:47:34 +000054
55extern MagickExport MagickSizeType
56 GetBlobSize(const Image *);
57
58extern MagickExport StreamHandler
59 GetBlobStreamHandler(const Image *);
60
61extern MagickExport unsigned char
62 *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
63 *GetBlobStreamData(const Image *),
64 *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
65 *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *);
66
67extern MagickExport void
68 DestroyBlob(Image *),
69 DuplicateBlob(Image *,const Image *),
70 SetBlobExempt(Image *,const MagickBooleanType);
71
72#if defined(__cplusplus) || defined(c_plusplus)
73}
74#endif
75
76#endif