LEADTOOLS Support
Imaging
Imaging SDK Questions
Invalid Structure Size using LBitmapRgn::CreateMaskFromBitmapRgn()
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, September 26, 2005 12:36:22 AM(UTC)
Groups: Registered
Posts: 5
Hi,
I get a "Invalid structure size" error message whenever I try using the LBitmapRgn::CreateMaskFromBitmapRgn() function. First of all I tried using it with just the LBitmapBase parameter but found that the documentation is out of date, there is now another size parameter. However, even when copying the online example (below) it still returns an error.
LBitmapRgn lBmpRgn;
LBitmapBase lBmpMask;
lBmpRgn.SetBitmap(destbmp->lBitmap); // this is the LBitmap in my image
L_UINT uCombineMode = lBmpRgn.GetRgnCombineMode();
uCombineMode |= L_RGN_OR;
lBmpRgn.SetRgnCombineMode(uCombineMode);
lBmpRgn.SetRgnColor(RGB(0,0,0));
// create mask region from bitmap
lBmpRgn.CreateMaskFromBitmapRgn(&lBmpMask, sizeof(lBmpMask));
Any ideas?
Thanks,
Dave.
#2
Posted
:
Thursday, September 29, 2005 5:31:38 PM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
The size you need to pass is that of the LEAD Bitmap Handle structure, which is sizeof(BITMAPHANDLE)
Edited by user Monday, December 5, 2016 4:36:39 PM(UTC)
| Reason: Not specified
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK Questions
Invalid Structure Size using LBitmapRgn::CreateMaskFromBitmapRgn()
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.