blob.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2019 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 
00027 typedef enum
00028 {
00029   ReadMode,
00030   WriteMode,
00031   IOMode,
00032   PersistMode
00033 } MapMode;
00034 
00035 typedef ssize_t
00036   (*CustomStreamHandler)(unsigned char *,const size_t,void *);
00037 
00038 typedef MagickOffsetType
00039   (*CustomStreamSeeker)(const MagickOffsetType,const int,void *);
00040 
00041 typedef MagickOffsetType
00042   (*CustomStreamTeller)(void *);
00043 
00044 typedef struct _CustomStreamInfo
00045   CustomStreamInfo;
00046 
00047 #include "MagickCore/image.h"
00048 #include "MagickCore/stream.h"
00049 
00050 extern MagickExport CustomStreamInfo
00051   *AcquireCustomStreamInfo(ExceptionInfo *),
00052   *DestroyCustomStreamInfo(CustomStreamInfo *);
00053 
00054 extern MagickExport FILE
00055   *GetBlobFileHandle(const Image *) magick_attribute((__pure__));
00056 
00057 extern MagickExport Image
00058   *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
00059   *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
00060   *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
00061 
00062 extern MagickExport MagickBooleanType
00063   BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
00064   FileToImage(Image *,const char *,ExceptionInfo *),
00065   GetBlobError(const Image *) magick_attribute((__pure__)),
00066   ImageToFile(Image *,char *,ExceptionInfo *),
00067   InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
00068     ExceptionInfo *),
00069   IsBlobExempt(const Image *) magick_attribute((__pure__)),
00070   IsBlobSeekable(const Image *) magick_attribute((__pure__)),
00071   IsBlobTemporary(const Image *) magick_attribute((__pure__));
00072 
00073 extern MagickExport MagickSizeType
00074   GetBlobSize(const Image *);
00075 
00076 extern MagickExport StreamHandler
00077   GetBlobStreamHandler(const Image *) magick_attribute((__pure__));
00078 
00079 extern MagickExport void
00080   *GetBlobStreamData(const Image *) magick_attribute((__pure__)),
00081   DestroyBlob(Image *),
00082   DuplicateBlob(Image *,const Image *),
00083   *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
00084   *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
00085   ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
00086   *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
00087   ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
00088   SetBlobExempt(Image *,const MagickBooleanType),
00089   SetCustomStreamData(CustomStreamInfo *,void *),
00090   SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
00091   SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
00092   SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
00093   SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
00094 
00095 #if defined(__cplusplus) || defined(c_plusplus)
00096 }
00097 #endif
00098 
00099 #endif

Generated on 12 Jun 2019 for MagickCore by  doxygen 1.6.1