#include "ltwrappr.h"
virtual L_INT LBitmapBase::ColorResBitmapCallBack(pBitmap, pBuffer, nLines)
pBITMAPHANDLE pBitmap; |
pointer to the bitmap handle |
L_UCHAR * pBuffer; |
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. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
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. |
Win32, x64.
Functions: |
LBitmapBase::ColorRes, LBase::EnableCallBack, LBase::IsCallBackEnabled, Class Members |
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
class ColorResBitmap : public LBitmapBase
{
protected:
virtual L_INT ColorResBitmapCallBack (pBITMAPHANDLE pBitmap, L_UCHAR * pBuffer, L_INT nLines);
};
L_INT ColorResBitmap::ColorResBitmapCallBack(pBITMAPHANDLE pBitmap, L_UCHAR * pBuffer, L_INT nLines)
{
UNREFERENCED_PARAMETER(nLines);
UNREFERENCED_PARAMETER(pBuffer);
UNREFERENCED_PARAMETER(pBitmap);
::MessageBox(0,TEXT("Color Res"),TEXT("Color Res"),MB_OK);
return(SUCCESS);
}
L_INT LBitmapBase__ColorResBitmapCallBackExample()
{
L_INT nRet;
ColorResBitmap Bitmap ;
nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")),24);
if(nRet !=SUCCESS)
return nRet;
if(Bitmap.IsCallBackEnabled()==FALSE)
Bitmap.EnableCallBack(TRUE);
//this will call ColorResCallBack()
nRet =Bitmap.ColorRes(8,CRF_FIXEDPALETTE|CRF_FLOYDSTEINDITHERING);
if(nRet !=SUCCESS)
return nRet;
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.