Available in LEADTOOLS Vector Imaging toolkits. |
L_VecSaveMemory
#include "lvkrn.h"
L_LVKRN_API L_INT L_VecSaveMemory(phHandle, pVector, nFormat, puSize, pSaveOptions)
L_HANDLE * phHandle; |
/* pointer to a memory handle */ |
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
L_INT nFormat; |
/* output file format */ |
L_UINT32 *puSize; |
/* pointer to the size of the memory handle */ |
pSAVEFILEOPTION pSAVEFILEOPTION pSaveOptions |
/* pointer to optional extended save options */ |
Saves a vector image to a file in memory. The output can be in any of the supported compressed or uncompressed file formats.
Parameter |
Description |
phHandle |
Pointer to the memory handle. Set this to NULL. This function uses the handle to allocate the memory. It unlocks the memory upon completion of the save. |
pVector |
Pointer to a vector handle that references the vector image to be saved. |
nFormat |
Output file format. For valid values, refer to Formats of Output Files Formats of Output Files. |
|
For possible values, refer to Compression Quality Factors Compression Quality Factors. |
puSize |
Pointer to a variable to be updated with the size of the saved file. |
pSaveOptions |
Pointer to optional extended save options. Reserved for future use. Pass NULL. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To use this function, do the following:
1. |
Declare a memory handle. You can then pass its address in this function, which will allocate the memory, save the vector handle, and unlock the memory. |
2. |
Declare a long integer (L_UINT32) variable for the file-size. You can then pass its address in this function, which will update its value with the size of the file. |
3. |
Call this function, to save the vector handle in the specified memory handle. |
This function cannot be used in combination with L_RedirectIO L_RedirectIO.
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
Example
For an example, refer to L_VecLoadMemory.