CRasterImage::SaveToMemory![]()
int SaveToMemory( SMemoryImage** MemoryBuffer, int ImageType );
Parameters
| 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: | ||||||||
|
Return Value
The return value is TRUE if SaveToMemory method succeeded. The return value is FALSE if SaveToMemory method failed.
Remarks
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.
Note
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.
See Also
![]()
| © 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. |