MagickCore  7.0.6
blob.c File Reference
Include dependency graph for blob.c:

Go to the source code of this file.

Data Structures

union  FileInfo
 
struct  _BlobInfo
 
struct  _CustomStreamInfo
 

Macros

#define MagickMaxBlobExtent   (8*8192)
 
#define MAP_FAILED   ((void *) -1)
 

Typedefs

typedef union FileInfo FileInfo
 

Functions

static int SyncBlob (Image *)
 
MagickExport CustomStreamInfoAcquireCustomStreamInfo (ExceptionInfo *magick_unused(exception))
 
MagickExport void AttachBlob (BlobInfo *blob_info, const void *blob, const size_t length)
 
MagickExport MagickBooleanType BlobToFile (char *filename, const void *blob, const size_t length, ExceptionInfo *exception)
 
MagickExport ImageBlobToImage (const ImageInfo *image_info, const void *blob, const size_t length, ExceptionInfo *exception)
 
MagickExport BlobInfoCloneBlobInfo (const BlobInfo *blob_info)
 
MagickExport MagickBooleanType CloseBlob (Image *image)
 
MagickExport void DestroyBlob (Image *image)
 
MagickExport CustomStreamInfoDestroyCustomStreamInfo (CustomStreamInfo *custom_stream)
 
MagickExport void * DetachBlob (BlobInfo *blob_info)
 
MagickExport void DisassociateBlob (Image *image)
 
MagickExport MagickBooleanType DiscardBlobBytes (Image *image, const MagickSizeType length)
 
MagickExport void DuplicateBlob (Image *image, const Image *duplicate)
 
MagickExport int EOFBlob (const Image *image)
 
MagickExport void * FileToBlob (const char *filename, const size_t extent, size_t *length, ExceptionInfo *exception)
 
static ssize_t WriteBlobStream (Image *image, const size_t length, const void *data)
 
MagickExport MagickBooleanType FileToImage (Image *image, const char *filename, ExceptionInfo *exception)
 
MagickExport MagickBooleanType GetBlobError (const Image *image)
 
MagickExport FILE * GetBlobFileHandle (const Image *image)
 
MagickExport void GetBlobInfo (BlobInfo *blob_info)
 
MagickExport const struct stat * GetBlobProperties (const Image *image)
 
MagickExport MagickSizeType GetBlobSize (const Image *image)
 
MagickExport void * GetBlobStreamData (const Image *image)
 
MagickExport StreamHandler GetBlobStreamHandler (const Image *image)
 
MagickExport void * ImageToBlob (const ImageInfo *image_info, Image *image, size_t *length, ExceptionInfo *exception)
 
MagickExport void ImageToCustomStream (const ImageInfo *image_info, Image *image, ExceptionInfo *exception)
 
MagickExport MagickBooleanType ImageToFile (Image *image, char *filename, ExceptionInfo *exception)
 
MagickExport void * ImagesToBlob (const ImageInfo *image_info, Image *images, size_t *length, ExceptionInfo *exception)
 
MagickExport void ImagesToCustomStream (const ImageInfo *image_info, Image *images, ExceptionInfo *exception)
 
MagickExport MagickBooleanType InjectImageBlob (const ImageInfo *image_info, Image *image, Image *inject_image, const char *format, ExceptionInfo *exception)
 
MagickExport MagickBooleanType IsBlobExempt (const Image *image)
 
MagickExport MagickBooleanType IsBlobSeekable (const Image *image)
 
MagickExport MagickBooleanType IsBlobTemporary (const Image *image)
 
MagickExport void * MapBlob (int file, const MapMode mode, const MagickOffsetType offset, const size_t length)
 
MagickExport void MSBOrderLong (unsigned char *buffer, const size_t length)
 
MagickExport void MSBOrderShort (unsigned char *p, const size_t length)
 
static MagickBooleanType SetStreamBuffering (const ImageInfo *image_info, Image *image)
 
MagickExport MagickBooleanType OpenBlob (const ImageInfo *image_info, Image *image, const BlobMode mode, ExceptionInfo *exception)
 
static size_t PingStream (const Image *magick_unused(image), const void *magick_unused(pixels), const size_t columns)
 
MagickExport ImagePingBlob (const ImageInfo *image_info, const void *blob, const size_t length, ExceptionInfo *exception)
 
MagickExport ssize_t ReadBlob (Image *image, const size_t length, void *data)
 
MagickExport int ReadBlobByte (Image *image)
 
MagickExport double ReadBlobDouble (Image *image)
 
MagickExport float ReadBlobFloat (Image *image)
 
MagickExport unsigned int ReadBlobLong (Image *image)
 
MagickExport MagickSizeType ReadBlobLongLong (Image *image)
 
MagickExport unsigned short ReadBlobShort (Image *image)
 
MagickExport unsigned int ReadBlobLSBLong (Image *image)
 
MagickExport signed int ReadBlobLSBSignedLong (Image *image)
 
MagickExport unsigned short ReadBlobLSBShort (Image *image)
 
MagickExport signed short ReadBlobLSBSignedShort (Image *image)
 
MagickExport unsigned int ReadBlobMSBLong (Image *image)
 
MagickExport MagickSizeType ReadBlobMSBLongLong (Image *image)
 
MagickExport unsigned short ReadBlobMSBShort (Image *image)
 
MagickExport signed int ReadBlobMSBSignedLong (Image *image)
 
MagickExport signed short ReadBlobMSBSignedShort (Image *image)
 
MagickExport signed int ReadBlobSignedLong (Image *image)
 
MagickExport signed short ReadBlobSignedShort (Image *image)
 
MagickExport const void * ReadBlobStream (Image *image, const size_t length, void *data, ssize_t *count)
 
MagickExport char * ReadBlobString (Image *image, char *string)
 
MagickExport BlobInfoReferenceBlob (BlobInfo *blob)
 
MagickExport MagickOffsetType SeekBlob (Image *image, const MagickOffsetType offset, const int whence)
 
MagickExport void SetBlobExempt (Image *image, const MagickBooleanType exempt)
 
MagickExport MagickBooleanType SetBlobExtent (Image *image, const MagickSizeType extent)
 
MagickExport void SetCustomStreamData (CustomStreamInfo *custom_stream, void *data)
 
MagickExport void SetCustomStreamReader (CustomStreamInfo *custom_stream, CustomStreamHandler reader)
 
MagickExport void SetCustomStreamSeeker (CustomStreamInfo *custom_stream, CustomStreamSeeker seeker)
 
MagickExport void SetCustomStreamTeller (CustomStreamInfo *custom_stream, CustomStreamTeller teller)
 
MagickExport void SetCustomStreamWriter (CustomStreamInfo *custom_stream, CustomStreamHandler writer)
 
MagickExport MagickOffsetType TellBlob (const Image *image)
 
MagickExport MagickBooleanType UnmapBlob (void *map, const size_t length)
 
MagickExport ImageCustomStreamToImage (const ImageInfo *image_info, ExceptionInfo *exception)
 
MagickExport ssize_t WriteBlob (Image *image, const size_t length, const void *data)
 
MagickExport ssize_t WriteBlobByte (Image *image, const unsigned char value)
 
MagickExport ssize_t WriteBlobFloat (Image *image, const float value)
 
MagickExport ssize_t WriteBlobLong (Image *image, const unsigned int value)
 
MagickExport ssize_t WriteBlobShort (Image *image, const unsigned short value)
 
MagickExport ssize_t WriteBlobLSBLong (Image *image, const unsigned int value)
 
MagickExport ssize_t WriteBlobLSBShort (Image *image, const unsigned short value)
 
MagickExport ssize_t WriteBlobLSBSignedLong (Image *image, const signed int value)
 
MagickExport ssize_t WriteBlobLSBSignedShort (Image *image, const signed short value)
 
MagickExport ssize_t WriteBlobMSBLong (Image *image, const unsigned int value)
 
MagickExport ssize_t WriteBlobMSBLongLong (Image *image, const MagickSizeType value)
 
MagickExport ssize_t WriteBlobMSBSignedLong (Image *image, const signed int value)
 
MagickExport ssize_t WriteBlobMSBSignedShort (Image *image, const signed short value)
 
MagickExport ssize_t WriteBlobMSBShort (Image *image, const unsigned short value)
 
MagickExport ssize_t WriteBlobString (Image *image, const char *string)
 

Macro Definition Documentation

◆ MagickMaxBlobExtent

#define MagickMaxBlobExtent   (8*8192)

Definition at line 82 of file blob.c.

Referenced by AttachBlob(), GetBlobInfo(), ImagesToBlob(), and ImageToBlob().

◆ MAP_FAILED

#define MAP_FAILED   ((void *) -1)

Definition at line 87 of file blob.c.

Referenced by MapBlob().

Typedef Documentation

◆ FileInfo

typedef union FileInfo FileInfo

Function Documentation

◆ AcquireCustomStreamInfo()

◆ AttachBlob()

◆ BlobToFile()

MagickExport MagickBooleanType BlobToFile ( char *  filename,
const void *  blob,
const size_t  length,
ExceptionInfo exception 
)

◆ BlobToImage()

◆ CloneBlobInfo()

◆ CloseBlob()

◆ CustomStreamToImage()

◆ DestroyBlob()

◆ DestroyCustomStreamInfo()

◆ DetachBlob()

◆ DisassociateBlob()

◆ DiscardBlobBytes()

MagickExport MagickBooleanType DiscardBlobBytes ( Image image,
const MagickSizeType  length 
)

◆ DuplicateBlob()

MagickExport void DuplicateBlob ( Image image,
const Image duplicate 
)

◆ EOFBlob()

◆ FileToBlob()

◆ FileToImage()

◆ GetBlobError()

◆ GetBlobFileHandle()

MagickExport FILE* GetBlobFileHandle ( const Image image)

◆ GetBlobInfo()

◆ GetBlobProperties()

MagickExport const struct stat* GetBlobProperties ( const Image image)

◆ GetBlobSize()

◆ GetBlobStreamData()

MagickExport void* GetBlobStreamData ( const Image image)

Definition at line 1563 of file blob.c.

References _Image::blob, _BlobInfo::data, MagickCoreSignature, and _Image::signature.

Referenced by RenderHoughLines().

◆ GetBlobStreamHandler()

◆ ImagesToBlob()

◆ ImagesToCustomStream()

◆ ImageToBlob()

◆ ImageToCustomStream()

◆ ImageToFile()

◆ InjectImageBlob()

◆ IsBlobExempt()

◆ IsBlobSeekable()

◆ IsBlobTemporary()

◆ MapBlob()

MagickExport void* MapBlob ( int  file,
const MapMode  mode,
const MagickOffsetType  offset,
const size_t  length 
)

Definition at line 2585 of file blob.c.

References IOMode, MAP_FAILED, ReadMode, and WriteMode.

Referenced by FileToBlob(), OpenBlob(), and SetBlobExtent().

◆ MSBOrderLong()

MagickExport void MSBOrderLong ( unsigned char *  buffer,
const size_t  length 
)

Definition at line 2673 of file blob.c.

◆ MSBOrderShort()

MagickExport void MSBOrderShort ( unsigned char *  p,
const size_t  length 
)

Definition at line 2723 of file blob.c.

◆ OpenBlob()

MagickExport MagickBooleanType OpenBlob ( const ImageInfo image_info,
Image image,
const BlobMode  mode,
ExceptionInfo exception 
)

Definition at line 2795 of file blob.c.

References AcquireExceptionInfo(), AcquireMagickResource(), _ImageInfo::adjoin, AppendBinaryBlobMode, AppendBlobMode, AttachBlob(), _Image::blob, _ImageInfo::blob, BlobError, BlobEvent, BZipStream, CopyMagickString(), _BlobInfo::custom_stream, _ImageInfo::custom_stream, CustomStream, _ImageInfo::debug, DestroyExceptionInfo(), DestroyString(), DetachBlob(), _BlobInfo::exempt, ExtensionPath, FifoStream, FileInfo::file, _ImageInfo::file, _BlobInfo::file_info, _Image::filename, _ImageInfo::filename, FileStream, fopen_utf8(), FormatLocaleString(), GetBlobSize(), GetMagickBlobSupport(), GetMagickInfo(), GetMagickModule, GetNextImageInList(), GetPathAttributes(), GetPathComponent(), GetPreviousImageInList(), InterpretImageFilename(), IsRightsAuthorized(), _ImageInfo::length, LocaleCompare(), LocaleNCompare(), LogMagickEvent(), _ImageInfo::magick, MagickCoreSignature, MagickFalse, MagickMaxBufferExtent, MagickPathExtent, MagickTrue, MapBlob(), _BlobInfo::mapped, MapResource, PathPolicyDomain, PipeStream, PolicyError, popen_utf8(), _BlobInfo::properties, ReadBinaryBlobMode, ReadBlobMode, ReadMode, ReadPolicyRights, RelinquishMagickResource(), ResetMagickMemory(), RootPath, SanitizeString(), _Image::scene, SetStreamBuffering(), _Image::signature, _ImageInfo::signature, _BlobInfo::size, StandardStream, _BlobInfo::status, _BlobInfo::stream, _ImageInfo::stream, StringToLong(), _BlobInfo::synchronize, _ImageInfo::synchronize, ThrowFileException, ThrowMagickException(), TraceEvent, _BlobInfo::type, UndefinedStream, WriteBinaryBlobMode, WriteBlobMode, WritePolicyRights, and ZipStream.

◆ PingBlob()

◆ PingStream()

static size_t PingStream ( const Image magick_unusedimage,
const void *  magick_unusedpixels,
const size_t  columns 
)
static

Definition at line 3153 of file blob.c.

References magick_unreferenced.

Referenced by PingBlob().

◆ ReadBlob()

◆ ReadBlobByte()

MagickExport int ReadBlobByte ( Image image)

Definition at line 3415 of file blob.c.

References MagickCoreSignature, ReadBlobStream(), and _Image::signature.

◆ ReadBlobDouble()

MagickExport double ReadBlobDouble ( Image image)

Definition at line 3457 of file blob.c.

References ReadBlobLongLong().

◆ ReadBlobFloat()

MagickExport float ReadBlobFloat ( Image image)

Definition at line 3496 of file blob.c.

References ReadBlobLong().

◆ ReadBlobLong()

MagickExport unsigned int ReadBlobLong ( Image image)

◆ ReadBlobLongLong()

MagickExport MagickSizeType ReadBlobLongLong ( Image image)

◆ ReadBlobLSBLong()

MagickExport unsigned int ReadBlobLSBLong ( Image image)

Definition at line 3713 of file blob.c.

References MagickCoreSignature, ReadBlobStream(), and _Image::signature.

Referenced by ReadBlobLSBSignedLong().

◆ ReadBlobLSBShort()

MagickExport unsigned short ReadBlobLSBShort ( Image image)

Definition at line 3801 of file blob.c.

References MagickCoreSignature, ReadBlobStream(), and _Image::signature.

Referenced by ReadBlobLSBSignedShort().

◆ ReadBlobLSBSignedLong()

MagickExport signed int ReadBlobLSBSignedLong ( Image image)

Definition at line 3763 of file blob.c.

References ReadBlobLSBLong().

◆ ReadBlobLSBSignedShort()

MagickExport signed short ReadBlobLSBSignedShort ( Image image)

Definition at line 3849 of file blob.c.

References ReadBlobLSBShort().

◆ ReadBlobMSBLong()

MagickExport unsigned int ReadBlobMSBLong ( Image image)

Definition at line 3887 of file blob.c.

References MagickCoreSignature, ReadBlobStream(), and _Image::signature.

Referenced by ReadBlobMSBSignedLong().

◆ ReadBlobMSBLongLong()

MagickExport MagickSizeType ReadBlobMSBLongLong ( Image image)

Definition at line 3937 of file blob.c.

References MagickCoreSignature, MagickULLConstant, ReadBlobStream(), and _Image::signature.

◆ ReadBlobMSBShort()

MagickExport unsigned short ReadBlobMSBShort ( Image image)

Definition at line 3991 of file blob.c.

References MagickCoreSignature, ReadBlobStream(), and _Image::signature.

Referenced by ReadBlobMSBSignedShort().

◆ ReadBlobMSBSignedLong()

MagickExport signed int ReadBlobMSBSignedLong ( Image image)

Definition at line 4039 of file blob.c.

References ReadBlobMSBLong().

◆ ReadBlobMSBSignedShort()

MagickExport signed short ReadBlobMSBSignedShort ( Image image)

Definition at line 4077 of file blob.c.

References ReadBlobMSBShort().

◆ ReadBlobShort()

MagickExport unsigned short ReadBlobShort ( Image image)

Definition at line 3659 of file blob.c.

References _Image::endian, LSBEndian, MagickCoreSignature, ReadBlobStream(), and _Image::signature.

Referenced by ReadBlobSignedShort().

◆ ReadBlobSignedLong()

MagickExport signed int ReadBlobSignedLong ( Image image)

Definition at line 4115 of file blob.c.

References ReadBlobLong().

◆ ReadBlobSignedShort()

MagickExport signed short ReadBlobSignedShort ( Image image)

Definition at line 4153 of file blob.c.

References ReadBlobShort().

◆ ReadBlobStream()

◆ ReadBlobString()

MagickExport char* ReadBlobString ( Image image,
char *  string 
)

Definition at line 4256 of file blob.c.

References MagickCoreSignature, MagickPathExtent, ReadBlobStream(), and _Image::signature.

◆ ReferenceBlob()

◆ SeekBlob()

◆ SetBlobExempt()

MagickExport void SetBlobExempt ( Image image,
const MagickBooleanType  exempt 
)

◆ SetBlobExtent()

◆ SetCustomStreamData()

MagickExport void SetCustomStreamData ( CustomStreamInfo custom_stream,
void *  data 
)

◆ SetCustomStreamReader()

MagickExport void SetCustomStreamReader ( CustomStreamInfo custom_stream,
CustomStreamHandler  reader 
)

◆ SetCustomStreamSeeker()

MagickExport void SetCustomStreamSeeker ( CustomStreamInfo custom_stream,
CustomStreamSeeker  seeker 
)

◆ SetCustomStreamTeller()

MagickExport void SetCustomStreamTeller ( CustomStreamInfo custom_stream,
CustomStreamTeller  teller 
)

◆ SetCustomStreamWriter()

MagickExport void SetCustomStreamWriter ( CustomStreamInfo custom_stream,
CustomStreamHandler  writer 
)

◆ SetStreamBuffering()

static MagickBooleanType SetStreamBuffering ( const ImageInfo image_info,
Image image 
)
inlinestatic

◆ SyncBlob()

◆ TellBlob()

◆ UnmapBlob()

◆ WriteBlob()

◆ WriteBlobByte()

MagickExport ssize_t WriteBlobByte ( Image image,
const unsigned char  value 
)

Definition at line 5367 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobFloat()

MagickExport ssize_t WriteBlobFloat ( Image image,
const float  value 
)

Definition at line 5399 of file blob.c.

References WriteBlobLong().

◆ WriteBlobLong()

MagickExport ssize_t WriteBlobLong ( Image image,
const unsigned int  value 
)

Definition at line 5440 of file blob.c.

References _Image::endian, LSBEndian, MagickCoreSignature, _Image::signature, and WriteBlobStream().

Referenced by WriteBlobFloat().

◆ WriteBlobLSBLong()

MagickExport ssize_t WriteBlobLSBLong ( Image image,
const unsigned int  value 
)

Definition at line 5530 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobLSBShort()

MagickExport ssize_t WriteBlobLSBShort ( Image image,
const unsigned short  value 
)

Definition at line 5569 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobLSBSignedLong()

MagickExport ssize_t WriteBlobLSBSignedLong ( Image image,
const signed int  value 
)

Definition at line 5606 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobLSBSignedShort()

MagickExport ssize_t WriteBlobLSBSignedShort ( Image image,
const signed short  value 
)

Definition at line 5655 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobMSBLong()

MagickExport ssize_t WriteBlobMSBLong ( Image image,
const unsigned int  value 
)

Definition at line 5703 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobMSBLongLong()

MagickExport ssize_t WriteBlobMSBLongLong ( Image image,
const MagickSizeType  value 
)

Definition at line 5742 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobMSBShort()

MagickExport ssize_t WriteBlobMSBShort ( Image image,
const unsigned short  value 
)

Definition at line 5883 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobMSBSignedLong()

MagickExport ssize_t WriteBlobMSBSignedLong ( Image image,
const signed int  value 
)

Definition at line 5786 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobMSBSignedShort()

MagickExport ssize_t WriteBlobMSBSignedShort ( Image image,
const signed short  value 
)

Definition at line 5835 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().

◆ WriteBlobShort()

MagickExport ssize_t WriteBlobShort ( Image image,
const unsigned short  value 
)

◆ WriteBlobStream()

◆ WriteBlobString()

MagickExport ssize_t WriteBlobString ( Image image,
const char *  string 
)

Definition at line 5920 of file blob.c.

References MagickCoreSignature, _Image::signature, and WriteBlobStream().