virtual L_INT LBitmapBase::CreateAlphaBitmap(LBitmapSrc)
Creates an alpha bitmap from the alpha channel of another class object's bitmap.
The source class object from which to create the alpha bitmap.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Call this function to create an alpha bitmap from the alpha channel of another class object's bitmap.
Note: The LBitmapSrc parameter is passed by reference, and is a required parameter.
Win32, x64.
The following function checks if an image has a useful alpha channel bitmap.
L_INT LBitmapBase__CreateAlphaBitmapExample(L_TCHAR* pszImageFile)
{
L_INT nRet;
LBitmapBase Bitmap, AlphaBitmap;
LBitmapRgn Region;
L_SIZE_T uArea;
nRet =Bitmap.Load(pszImageFile, 0, ORDER_BGR);
if(nRet !=SUCCESS)
return nRet;
nRet =AlphaBitmap.CreateAlphaBitmap(Bitmap);
if(nRet !=SUCCESS)
return nRet;
Region.SetBitmap(&AlphaBitmap);
Region.SetRgnCombineMode(L_RGN_SETNOT);
Region.SetRgnColor(RGB(0, 0, 0) /* Black */);
Region.GetRgnArea(&uArea);
if (uArea != 0)
MessageBox(NULL, TEXT("The image has a useful alpha bitmap."), TEXT("Test"), MB_OK);
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
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.