MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
blob-private.h
1/*
2 Copyright @ 1999 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 private methods.
17*/
18#ifndef MAGICKCORE_BLOB_PRIVATE_H
19#define MAGICKCORE_BLOB_PRIVATE_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 MagickMinBlobExtent 32767L
29#if defined(MAGICKCORE_HAVE_FSEEKO)
30# define fseek fseeko
31# define ftell ftello
32#endif
33#if defined(MAGICKCORE_WINDOWS_SUPPORT)
34#if !defined(__MINGW32__)
35# define stat _stat64
36#endif
37#endif
38
39typedef enum
40{
41 UndefinedBlobMode,
42 ReadBlobMode,
43 ReadBinaryBlobMode,
44 WriteBlobMode,
45 WriteBinaryBlobMode,
46 AppendBlobMode,
47 AppendBinaryBlobMode
48} BlobMode;
49
50typedef enum
51{
52 UndefinedStream,
53 FileStream,
54 StandardStream,
55 PipeStream,
56 ZipStream,
57 BZipStream,
58 FifoStream,
59 BlobStream,
60 CustomStream
61} StreamType;
62
63extern MagickExport BlobInfo
64 *CloneBlobInfo(const BlobInfo *),
65 *ReferenceBlob(BlobInfo *);
66
67extern MagickExport char
68 *ReadBlobString(Image *,char *);
69
70extern MagickExport const struct stat
71 *GetBlobProperties(const Image *);
72
73extern MagickExport const void
74 *ReadBlobStream(Image *,const size_t,void *magick_restrict ,ssize_t *)
75 magick_hot_spot;
76
77extern MagickExport double
78 ReadBlobDouble(Image *);
79
80extern MagickExport float
81 ReadBlobFloat(Image *);
82
83extern MagickExport int
84 EOFBlob(const Image *),
85 ErrorBlob(const Image *),
86 ReadBlobByte(Image *);
87
88extern MagickExport MagickBooleanType
89 CloseBlob(Image *),
90 DiscardBlobBytes(Image *,const MagickSizeType),
91 OpenBlob(const ImageInfo *,Image *,const BlobMode,ExceptionInfo *),
92 SetBlobExtent(Image *,const MagickSizeType),
93 UnmapBlob(void *,const size_t);
94
95extern MagickExport MagickOffsetType
96 SeekBlob(Image *,const MagickOffsetType,const int),
97 TellBlob(const Image *);
98
99extern MagickExport MagickSizeType
100 ReadBlobLongLong(Image *),
101 ReadBlobMSBLongLong(Image *);
102
103extern MagickExport signed int
104 ReadBlobLSBSignedLong(Image *),
105 ReadBlobMSBSignedLong(Image *),
106 ReadBlobSignedLong(Image *);
107
108extern MagickExport signed short
109 ReadBlobLSBSignedShort(Image *),
110 ReadBlobMSBSignedShort(Image *),
111 ReadBlobSignedShort(Image *);
112
113extern MagickExport ssize_t
114 ReadBlob(Image *,const size_t,void *),
115 WriteBlob(Image *,const size_t,const void *),
116 WriteBlobByte(Image *,const unsigned char),
117 WriteBlobFloat(Image *,const float),
118 WriteBlobLong(Image *,const unsigned int),
119 WriteBlobLongLong(Image *,const MagickSizeType),
120 WriteBlobShort(Image *,const unsigned short),
121 WriteBlobSignedLong(Image *,const signed int),
122 WriteBlobLSBLong(Image *,const unsigned int),
123 WriteBlobLSBShort(Image *,const unsigned short),
124 WriteBlobLSBSignedLong(Image *,const signed int),
125 WriteBlobLSBSignedShort(Image *,const signed short),
126 WriteBlobMSBLong(Image *,const unsigned int),
127 WriteBlobMSBShort(Image *,const unsigned short),
128 WriteBlobMSBSignedShort(Image *,const signed short),
129 WriteBlobString(Image *,const char *);
130
131extern MagickExport unsigned int
132 ReadBlobLong(Image *),
133 ReadBlobLSBLong(Image *),
134 ReadBlobMSBLong(Image *);
135
136extern MagickExport unsigned short
137 ReadBlobShort(Image *),
138 ReadBlobLSBShort(Image *),
139 ReadBlobMSBShort(Image *);
140
141extern MagickExport void
142 AttachBlob(BlobInfo *,const void *,const size_t),
143 AttachCustomStream(BlobInfo *,CustomStreamInfo *),
144 *DetachBlob(BlobInfo *),
145 DisassociateBlob(Image *),
146 GetBlobInfo(BlobInfo *),
147 *MapBlob(int,const MapMode,const MagickOffsetType,const size_t),
148 MSBOrderLong(unsigned char *,const size_t),
149 MSBOrderShort(unsigned char *,const size_t);
150
151#if defined(__cplusplus) || defined(c_plusplus)
152}
153#endif
154
155#endif