#include <FreeImagePlus.h>
Inheritance diagram for fipMemoryIO:
fipMemoryIO is a class that allows you to load / save images from / to a memory stream.
Public Member Functions | |
fipMemoryIO (BYTE *data=NULL, DWORD size_in_bytes=0) | |
Constructor. | |
~fipMemoryIO () | |
Destructor. | |
BOOL | isValid () const |
Returns TRUE if the internal memory buffer is a valid buffer, returns FALSE otherwise. | |
FREE_IMAGE_FORMAT | getFileType () const |
Returns the buffer image format. | |
Memory IO routines | |
FIBITMAP * | load (FREE_IMAGE_FORMAT fif, int flags=0) const |
Loads a dib from a memory stream. | |
BOOL | save (FREE_IMAGE_FORMAT fif, FIBITMAP *dib, int flags=0) |
Saves a dib to a memory stream. | |
unsigned | read (void *buffer, unsigned size, unsigned count) const |
Reads data from a memory stream. | |
unsigned | write (const void *buffer, unsigned size, unsigned count) |
Writes data to a memory stream. | |
long | tell () const |
Gets the current position of a memory pointer. | |
BOOL | seek (long offset, int origin) |
Moves the memory pointer to a specified location. | |
BOOL | acquire (BYTE **data, DWORD *size_in_bytes) |
Provides a direct buffer access to a memory stream. | |
Protected Attributes | |
FIMEMORY * | _hmem |
Pointer to a memory stream. |
|
Constructor.
Wrap a memory buffer containing image data.
|
|
Destructor. Free any allocated memory
|
|
Provides a direct buffer access to a memory stream.
|
|
Returns the buffer image format.
|
|
Returns TRUE if the internal memory buffer is a valid buffer, returns FALSE otherwise.
Implements fipObject. |
|
Loads a dib from a memory stream.
|
|
Reads data from a memory stream.
|
|
Saves a dib to a memory stream.
|
|
Moves the memory pointer to a specified location.
|
|
Gets the current position of a memory pointer.
|
|
Writes data to a memory stream.
|
|
Pointer to a memory stream.
|