This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, August 24, 2010 8:40:51 PM(UTC)
Groups: Registered
Posts: 3
I am using Leadtools 15 API.I am trying to create a mask from the selected region(ROI) of the image.Can I get some example code for this
#2
Posted
:
Wednesday, August 25, 2010 3:10:54 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Did you try to use L_SetBitmapRgnFromMask? Did you face problems? If yes, please give me more details about it.
Here's a sample code from our help file:
L_INT SetBitmapRgnFromMaskExample(pBITMAPHANDLE pBitmap)
{
L_INT nRet;
BITMAPHANDLE MaskBitmap; /* Bitmap handle that holds the mask bitmap */
nRet = L_LoadBitmap (TEXT("C:\\Program Files\\LEAD Technologies\\LEADTOOLS 15\\Images\\MASK.TIF"), &MaskBitmap, sizeof(BITMAPHANDLE), 1, ORDER_BGR, NULL, NULL );
if(nRet != SUCCESS)
return nRet;
nRet = L_SetBitmapRgnFromMask ( pBitmap, NULL, &MaskBitmap, L_RGN_SET );
if(nRet != SUCCESS)
{
if(MaskBitmap.Flags.Allocated)
L_FreeBitmap(&MaskBitmap);
return nRet;
}
if(MaskBitmap.Flags.Allocated)
L_FreeBitmap(&MaskBitmap);
return SUCCESS;
}
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.