2 Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
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.
16 MagickCore Binary Large OBjects private methods.
18 #ifndef MAGICKCORE_BLOB_PRIVATE_H
19 #define MAGICKCORE_BLOB_PRIVATE_H
21 #include "MagickCore/image.h"
22 #include "MagickCore/stream.h"
23 #include "MagickCore/nt-base-private.h"
25 #if defined(__cplusplus) || defined(c_plusplus)
29 #define MagickMinBlobExtent 32767L
30 #if defined(MAGICKCORE_HAVE_FSEEKO)
59 extern MagickExport BlobInfo
60 *CloneBlobInfo(const BlobInfo *),
61 *ReferenceBlob(BlobInfo *);
63 extern MagickExport char
64 *ReadBlobString(Image *,char *);
66 extern MagickExport const struct stat
67 *GetBlobProperties(const Image *);
69 extern MagickExport const void
70 *ReadBlobStream(Image *,const size_t,void *,ssize_t *);
72 extern MagickExport double
73 ReadBlobDouble(Image *);
75 extern MagickExport float
76 ReadBlobFloat(Image *);
78 extern MagickExport int
79 EOFBlob(const Image *),
80 ErrorBlob(const Image *),
81 ReadBlobByte(Image *);
83 extern MagickExport MagickBooleanType
85 DiscardBlobBytes(Image *,const MagickSizeType),
86 OpenBlob(const ImageInfo *,Image *,const BlobMode,ExceptionInfo *),
87 SetBlobExtent(Image *,const MagickSizeType),
88 UnmapBlob(void *,const size_t);
90 extern MagickExport MagickOffsetType
91 SeekBlob(Image *,const MagickOffsetType,const int),
92 TellBlob(const Image *);
94 extern MagickExport MagickSizeType
95 ReadBlobLongLong(Image *),
96 ReadBlobMSBLongLong(Image *);
98 extern MagickExport signed int
99 ReadBlobLSBSignedLong(Image *),
100 ReadBlobMSBSignedLong(Image *),
101 ReadBlobSignedLong(Image *);
103 extern MagickExport signed short
104 ReadBlobLSBSignedShort(Image *),
105 ReadBlobMSBSignedShort(Image *),
106 ReadBlobSignedShort(Image *);
108 extern MagickExport ssize_t
109 ReadBlob(Image *,const size_t,void *),
110 WriteBlob(Image *,const size_t,const void *),
111 WriteBlobByte(Image *,const unsigned char),
112 WriteBlobFloat(Image *,const float),
113 WriteBlobLong(Image *,const unsigned int),
114 WriteBlobLongLong(Image *,const MagickSizeType),
115 WriteBlobShort(Image *,const unsigned short),
116 WriteBlobSignedLong(Image *,const signed int),
117 WriteBlobLSBLong(Image *,const unsigned int),
118 WriteBlobLSBShort(Image *,const unsigned short),
119 WriteBlobLSBSignedLong(Image *,const signed int),
120 WriteBlobLSBSignedShort(Image *,const signed short),
121 WriteBlobMSBLong(Image *,const unsigned int),
122 WriteBlobMSBShort(Image *,const unsigned short),
123 WriteBlobMSBSignedShort(Image *,const signed short),
124 WriteBlobString(Image *,const char *);
126 extern MagickExport unsigned int
127 ReadBlobLong(Image *),
128 ReadBlobLSBLong(Image *),
129 ReadBlobMSBLong(Image *);
131 extern MagickExport unsigned short
132 ReadBlobShort(Image *),
133 ReadBlobLSBShort(Image *),
134 ReadBlobMSBShort(Image *);
136 extern MagickExport void
137 AttachBlob(BlobInfo *,const void *,const size_t),
138 AttachCustomStream(BlobInfo *,CustomStreamInfo *),
139 *DetachBlob(BlobInfo *),
140 DisassociateBlob(Image *),
141 GetBlobInfo(BlobInfo *),
142 *MapBlob(int,const MapMode,const MagickOffsetType,const size_t),
143 MSBOrderLong(unsigned char *,const size_t),
144 MSBOrderShort(unsigned char *,const size_t);
146 #if defined(__cplusplus) || defined(c_plusplus)