This function is called by ImageGear to provide to your application each raster as it is obtained from the file.
Copy Code
|
|
---|---|
typedef AT_ERRCOUNT (ACCUAPI LPFNIG_RASTER_SET) (
LPVOID lpPrivate,
const LPAT_PIXEL lpRast,
AT_PIXPOS cyPos,
DWORD cRasterSize
);
|
Name | Type | Description |
---|---|---|
lpPrivate | LPVOID | Far pointer to private data area. |
lpRast | const LPAT_PIXEL | Far pointer to first byte of raster that ImageGear is providing on this call. |
cyPos | AT_PIXPOS | The raster's Y position in the image (0 = top line of image). |
dwRasterSize | DWORD | Number of bytes in the raster. |
Return an error count.
All pixel formats supported by ImageGear for C and C++.
Load Callback
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MyRasterSet (LPVOID lpPrivate, LPAT_PIXEL lpRast, AT_PIXPOS lYpos, DWORD dwBytes ) { /* Can use the above information to create a raster or rasters in image bitmap of DIB that was created by LPFNIG_DIB_CREATE callback. */ ... return IG_error_check(); } |
This is one of the two types of callback function supplied in calls to IG_load_FD_CB() or IG_load_mem_CB() functions. The line's position in the image is identified by cyPos. The lines may not be in order.
lpRast is a pointer to the start of the raster, and dwRasterSize is the number of bytes in the line. You should not attempt to change the data at lpRast. In general, your application will use this data (along with its knowledge of the width of the image it is creating, any compression scheme, etc.) to create the appropriate raster for the image bitmap of the DIB your application is creating.
See also callback type LPFNIG_DIB_CREATE.
You should check the ImageGear error count (AT_ERRCOUNT) after each raster is read. If you need to terminate the load, you can place an error on the stack yourself, using IG_error_set(). See the description for that function.