Glossary Item Box
This function is used to begin exporting an image to a memory block.
|
Parameter |
Type |
Description |
|
lpszExt |
LPCSTR |
Points to a string which identifies the extension of the file type to use for writing this image (i.e., TIF). |
|
lpDIB |
LPBITMAPINFO |
Points to a BITMAPINFO struct which defines the image. |
|
hOptBlk |
HANDLE |
Handle to an option block for this image. If this is NULL, ImageMan will assume logical defaults. |
|
lpInfo |
LPXINFO |
Points to an XINFO struct defining the export procedure for this image. |
|
hMemBlk |
HPSTR |
Globally Allocated memory block to write the image into. If this is NULL, a memory block will be allocated. |
|
dwUsed |
DWORD |
Offset of first byte to begin writing image into in hMemBlk. |
Return Value
The return value is the handle to use when referencing this export job in future ImageMan functions; it is NULL if an error occurred.
Comments
This is the function which initiates the export of an image to a memory buffer. Before calling this function, you should create an OptBlk with the desired options (or leave this NULL), Fill in the XINFO struct pointed to by lpInfo with the desired values, and determine the type of file you will be exporting.
ImageMan will resize hMemBlk as needed during the export process, so it is important that hMemBlk be a globally allocated memory block which can be resized.
Note
If ImageMan is forced to reallocated hMemBlk, the value for hMemBlk could potentially be altered. It is therefore amazingly important that your application pay attention to the memory block returned from ImgXEndWriteMem, as that will be the new handle value. The original handle value will no longer be valid!
Copyright 2008 Data Techniques, Inc. All Rights Reserved