blob.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore Binary Large OBjects methods.
00017 */
00018 #ifndef MAGICKCORE_BLOB_H
00019 #define MAGICKCORE_BLOB_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #define MagickMaxBufferExtent  81920
00026 #define MagickMinBufferExtent  16384
00027 
00028 typedef enum
00029 {
00030   ReadMode,
00031   WriteMode,
00032   IOMode,
00033   PersistMode
00034 } MapMode;
00035 
00036 typedef ssize_t
00037   (*CustomStreamHandler)(unsigned char *,const size_t,void *);
00038 
00039 typedef MagickOffsetType
00040   (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
00041 
00042 typedef MagickOffsetType
00043   (*CustomStreamTeller)(void *);
00044 
00045 typedef struct _CustomStreamInfo
00046   CustomStreamInfo;
00047 
00048 #include "MagickCore/image.h"
00049 #include "MagickCore/stream.h"
00050 
00051 extern MagickExport CustomStreamInfo
00052   *AcquireCustomStreamInfo(ExceptionInfo *),
00053   *DestroyCustomStreamInfo(CustomStreamInfo *);
00054 
00055 extern MagickExport FILE
00056   *GetBlobFileHandle(const Image *) magick_attribute((__pure__));
00057 
00058 extern MagickExport Image
00059   *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
00060   *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
00061   *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
00062 
00063 extern MagickExport MagickBooleanType
00064   BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
00065   FileToImage(Image *,const char *,ExceptionInfo *),
00066   GetBlobError(const Image *) magick_attribute((__pure__)),
00067   ImageToFile(Image *,char *,ExceptionInfo *),
00068   InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
00069     ExceptionInfo *),
00070   IsBlobExempt(const Image *) magick_attribute((__pure__)),
00071   IsBlobSeekable(const Image *) magick_attribute((__pure__)),
00072   IsBlobTemporary(const Image *) magick_attribute((__pure__));
00073 
00074 extern MagickExport MagickSizeType
00075   GetBlobSize(const Image *);
00076 
00077 extern MagickExport StreamHandler
00078   GetBlobStreamHandler(const Image *) magick_attribute((__pure__));
00079 
00080 extern MagickExport void
00081   *GetBlobStreamData(const Image *) magick_attribute((__pure__)),
00082   DestroyBlob(Image *),
00083   DuplicateBlob(Image *,const Image *),
00084   *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
00085   *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
00086   ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
00087   *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
00088   ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
00089   SetBlobExempt(Image *,const MagickBooleanType),
00090   SetCustomStreamData(CustomStreamInfo *,void *),
00091   SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
00092   SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
00093   SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
00094   SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
00095 
00096 #if defined(__cplusplus) || defined(c_plusplus)
00097 }
00098 #endif
00099 
00100 #endif

Generated on 9 Jun 2020 for MagickCore by  doxygen 1.6.1