Images can be saved from ImagXpress® to a memory buffer:
-
Set the SaveToBuffer property to specify that image data should be set to a memory buffer.
-
Set the file format type with the SaveFileType property.
-
Call the SaveFile method.
-
Get the handle to the compressed image from the SaveBufferHandle property and do any processing/storing of that compressed image.
- Call the DeleteSaveBuffer method to free the memory that holds the compressed image.
C++ Example | Copy Code |
---|---|
// This code demonstrates how to save an image to a memory buffer ImagXpress1.SaveToBuffer = True; ImagXpress1.SaveFileType = FT_JPEG; ImagXpress1.SaveFile( ); HGLOBAL hJpegImage = ImagXpress1.SaveBufferHandle; // Do something with the image in memory ImagXpress1.DeleteSaveBuffer( ); |