LBitmapBase::ColorResBitmapCallBack
#include "ltwrappr.h"
virtual L_INT LBitmapBase::ColorResBitmapCallBack(pBitmap, pBuffer, nLines)
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle */ |
/* pointer to the buffer that contains the processed bitmap data */ | |
L_INT nLines; |
/* number of lines in the buffer */ |
Handles the converted image data that the LBitmapBase::ColorRes function has written to a buffer.
Parameter |
Description |
pBitmap |
The pointer to the bitmap handle referencing the bitmap that contains the image information. |
pBuffer |
A pointer to a buffer containing one or more lines of output image data that the calling function has already converted. |
nLines |
The number of lines in the pBuffer buffer. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function is called for the color resolution operation only if the callback functions are enabled. You can override this function to do your own processing. If you return an error code then the operation will be terminated. This function will be called only if you enabled the callback functions using LBase::EnableCallBack(TRUE).
Required DLLs and Libraries
LTDIS 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
Elements: |
LBitmapBase::ColorRes, LBase::EnableCallBack, LBase::IsCallBackEnabled, Class Members |
Example
class MyBitmap : public LBitmapBase
{
protected:
virtual L_INT ColorResBitmapCallBack (pBITMAPHANDLE pBitmap, L_UCHAR L_FAR * pBuffer, L_INT nLines);
};
L_INT MyBitmap::ColorResBitmapCallBack(pBITMAPHANDLE pBitmap, L_UCHAR L_FAR * pBuffer, L_INT nLines)
{
::MessageBox(0,TEXT("Color Res"),TEXT("Color Res"),MB_OK);
return(SUCCESS);
}
L_VOID TestFunction()
{
MyBitmap Bitmap ;
Bitmap.Load(TEXT("image1.cmp"),24);
if(Bitmap.IsCallBackEnabled()==FALSE)
Bitmap.EnableCallBack(TRUE);
Bitmap.ColorRes(8,CRF_FIXEDPALETTE|CRF_FLOYDSTEINDITHERING); //this will call ColorResCallBack()
}