int SaveToMemory( SMemoryImage** MemoryBuffer, int ImageType );
|MemoryBuffer||Pointer to the SMemoryImage structure pointer. The SaveToMemory method stores the pointer to output memory location to that SMemoryImage structure pointer.|
|ImageType||Can be one of the following values:|
The return value is TRUE if SaveToMemory method succeeded. The return value is FALSE if SaveToMemory method failed.
The SaveToMemory method compress current objectís image to a memory. The memory storage is allocated by the SaveToMemory method and pointer to it copied to location given by MemoryBuffer parameter. Use C++ delete operator to release it when it is no longer needed. When SaveToMemory method fails, the location given by MemoryBuffer pointer does not contain the allocated memory itís value is undefined.
The LoadFromMemory and SaveToMemory methods can be efficiently used when for example different file storage structure is required to store image data (for example for storing several images into single file), or for other purposes.
The LoadFromMemory and SaveTo Memory methods have nothing common with Windows API DIB functions such as CreateDIBSection, etc. Their purpose is to compress an image into memory, and decompress and load an image from memory into the CRasterImage object.
CRasterImage class methods
|© 2001 Solid Graphics, All rights reserved.|
|To view this site, we require use of either Netscape Navigator 4.0 or higher or Internet Explorer 4.0 or higher.|