MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
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 void AttachCustomStream (BlobInfo *blob_info, CustomStreamInfo *custom_stream)
 
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)
 
static void ThrowBlobException (BlobInfo *blob_info)
 
MagickExport MagickBooleanType CloseBlob (Image *image)
 
MagickExport ImageCustomStreamToImage (const ImageInfo *image_info, ExceptionInfo *exception)
 
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 int ErrorBlob (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 *magick_restrict 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, const BlobInfo *blob_info)
 
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 magick_hot_spot const void * ReadBlobStream (Image *image, const size_t length, void *magick_restrict 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 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 WriteBlobLongLong (Image *image, const MagickSizeType value)
 
MagickExport ssize_t WriteBlobShort (Image *image, const unsigned short value)
 
MagickExport ssize_t WriteBlobSignedLong (Image *image, const signed int 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 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 85 of file blob.c.

◆ MAP_FAILED

#define MAP_FAILED   ((void *) -1)

Definition at line 90 of file blob.c.

Typedef Documentation

◆ FileInfo

typedef union FileInfo FileInfo

Function Documentation

◆ AcquireCustomStreamInfo()

MagickExport CustomStreamInfo * AcquireCustomStreamInfo ( ExceptionInfo magick_unusedexception)

◆ AttachBlob()

◆ AttachCustomStream()

◆ 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()

◆ EOFBlob()

◆ ErrorBlob()

◆ 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 1952 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 3004 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 3091 of file blob.c.

◆ MSBOrderShort()

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

Definition at line 3141 of file blob.c.

◆ OpenBlob()

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

◆ PingBlob()

◆ PingStream()

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

Definition at line 3577 of file blob.c.

References magick_unreferenced.

Referenced by PingBlob().

◆ ReadBlob()

◆ ReadBlobByte()

◆ ReadBlobDouble()

MagickExport double ReadBlobDouble ( Image image)

Definition at line 4024 of file blob.c.

References ReadBlobLongLong().

◆ ReadBlobFloat()

MagickExport float ReadBlobFloat ( Image image)

Definition at line 4063 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 4280 of file blob.c.

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

Referenced by ReadBlobLSBSignedLong().

◆ ReadBlobLSBShort()

MagickExport unsigned short ReadBlobLSBShort ( Image image)

Definition at line 4368 of file blob.c.

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

Referenced by ReadBlobLSBSignedShort().

◆ ReadBlobLSBSignedLong()

MagickExport signed int ReadBlobLSBSignedLong ( Image image)

Definition at line 4330 of file blob.c.

References ReadBlobLSBLong().

◆ ReadBlobLSBSignedShort()

MagickExport signed short ReadBlobLSBSignedShort ( Image image)

Definition at line 4416 of file blob.c.

References ReadBlobLSBShort().

◆ ReadBlobMSBLong()

MagickExport unsigned int ReadBlobMSBLong ( Image image)

Definition at line 4454 of file blob.c.

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

Referenced by ReadBlobMSBSignedLong().

◆ ReadBlobMSBLongLong()

MagickExport MagickSizeType ReadBlobMSBLongLong ( Image image)

Definition at line 4504 of file blob.c.

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

◆ ReadBlobMSBShort()

MagickExport unsigned short ReadBlobMSBShort ( Image image)

Definition at line 4558 of file blob.c.

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

Referenced by ReadBlobMSBSignedShort().

◆ ReadBlobMSBSignedLong()

MagickExport signed int ReadBlobMSBSignedLong ( Image image)

Definition at line 4606 of file blob.c.

References ReadBlobMSBLong().

◆ ReadBlobMSBSignedShort()

MagickExport signed short ReadBlobMSBSignedShort ( Image image)

Definition at line 4644 of file blob.c.

References ReadBlobMSBShort().

◆ ReadBlobShort()

MagickExport unsigned short ReadBlobShort ( Image image)

Definition at line 4226 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 4682 of file blob.c.

References ReadBlobLong().

◆ ReadBlobSignedShort()

MagickExport signed short ReadBlobSignedShort ( Image image)

Definition at line 4720 of file blob.c.

References ReadBlobShort().

◆ ReadBlobStream()

◆ ReadBlobString()

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

Definition at line 4828 of file blob.c.

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

◆ ReferenceBlob()

◆ SeekBlob()

◆ SetBlobExempt()

◆ 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,
const BlobInfo blob_info 
)
inlinestatic

◆ SyncBlob()

◆ TellBlob()

◆ ThrowBlobException()

static void ThrowBlobException ( BlobInfo blob_info)
inlinestatic

Definition at line 593 of file blob.c.

References _BlobInfo::error_number, MagickFalse, MagickTrue, and _BlobInfo::status.

Referenced by CloseBlob(), ReadBlob(), WriteBlob(), and WriteBlobByte().

◆ UnmapBlob()

◆ WriteBlob()

◆ WriteBlobByte()

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

◆ WriteBlobFloat()

MagickExport ssize_t WriteBlobFloat ( Image image,
const float  value 
)

Definition at line 5900 of file blob.c.

References WriteBlobLong().

◆ WriteBlobLong()

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

Definition at line 5941 of file blob.c.

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

Referenced by WriteBlobFloat().

◆ WriteBlobLongLong()

MagickExport ssize_t WriteBlobLongLong ( Image image,
const MagickSizeType  value 
)

◆ WriteBlobLSBLong()

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

Definition at line 6143 of file blob.c.

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

◆ WriteBlobLSBShort()

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

Definition at line 6182 of file blob.c.

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

◆ WriteBlobLSBSignedLong()

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

Definition at line 6219 of file blob.c.

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

◆ WriteBlobLSBSignedShort()

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

Definition at line 6268 of file blob.c.

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

◆ WriteBlobMSBLong()

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

Definition at line 6316 of file blob.c.

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

◆ WriteBlobMSBShort()

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

Definition at line 6403 of file blob.c.

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

◆ WriteBlobMSBSignedShort()

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

Definition at line 6355 of file blob.c.

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

◆ WriteBlobShort()

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

◆ WriteBlobSignedLong()

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

◆ WriteBlobStream()

◆ WriteBlobString()

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

Definition at line 6440 of file blob.c.

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