virtual L_INT LBitmapBase::ColorResBitmapCallBack(pBitmap, pBuffer, nLines)
Handles the converted image data that the LBitmapBase::ColorRes function has written to a buffer.
The pointer to the bitmap handle referencing the bitmap that contains the image information.
A pointer to a buffer containing one or more lines of output image data that the calling function has already converted.
The number of lines in the pBuffer buffer.
Value | Meaning |
---|---|
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).
Win32, x64.
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;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document