HI,
I made some experiments using FeatherAlphaBlendBitmap() and tested the ff. code.
RedirectIO(OpenPicFiles, NULL, NULL, NULL, NULL, (L_VOID *)filename) ;
Ret = FileInfo(filename, &fileinfo, sizeof(FILEINFO), 0, NULL);
Ret = InitBitmap(&hLeadBitmap, sizeof(BITMAPHANDLE), fileinfo.Width, fileinfo.Height, fileinfo.BitsPerPixel);
Ret = LoadBitmap(filename, &hLeadBitmap, sizeof(BITMAPHANDLE), hLeadBitmap.BitsPerPixel, hLeadBitmap.Order, NULL, NULL);
// debugging hLeadBitmap.Flags.Transparency, always returns 0
RedirectIO(NULL, NULL, NULL, NULL, NULL, NULL) ;
if( Ret == SUCCESS && fileinfo.Flags & FILEINFO_HAS_ALPHA ){ // check to make sure that it has alpha channels
Ret = GetBitmapAlpha(&hLeadBitmap, &hLeadAlpha, sizeof(BITMAPHANDLE));
memset( &hLeadBmpPlusAlpha, 0, sizeof( hLeadBmpPlusAlpha ) ) ;
hLeadBmpPlusAlpha.uStructSize = sizeof( hLeadBmpPlusAlpha ) ;
Ret = FeatherAlphaBlendBitmap(&hLeadBmpPlusAlpha, 0, 0, hLeadAlpha.Width, hLeadAlpha.Height,&hLeadBitmap, 0, 0, &hLeadAlpha, 0, 0);
} // if
w_DispModeType = GetDisplayMode() ;
SetDisplayMode(DISPLAYMODE_FIXEDPALETTE|DISPLAYMODE_RESAMPLE|DISPLAYMODE_BICUBIC, DISPLAYMODE_FIXEDPALETTE|DISPLAYMODE_BICUBIC);
hpalPaint = CreatePaintPalette(dc.GetSafeHdc(), &hLeadBitmap);
if (hpalPaint)
{
SelectPalette (dc.GetSafeHdc(), hpalPaint, FALSE);
RealizePalette (dc.GetSafeHdc());
}
PaintDCEffect(dc.GetSafeHdc(), &hLeadBitmapNULL, NULL, &DrawRect, PaintRect, SRCCOPY, 0);
SetDisplayMode(DISPLAYMODE_FIXEDPALETTE|DISPLAYMODE_BICUBIC|w_DispModeType, w_DispModeType) ;
The above code however returns ERROR_NO_BITMAP at FeatherAlphaBlendBitmap(). Also, the sample program on your online documentation (http://www.leadtools.com/help/leadtools/v15/main/api/dllsteps/tuttransparency.htm) has no parameter for nXMaskShift and nYMaskShift os I passed 0.