L_INT LBitmap::FastMagicWand(MagicWnd, nTolerance, nXposition, nYposition, pObjectInfo, uFlags = 0)
Performs the fast magic wand operation and obtains the region through OBJECTINFO structure depending on color value at nXposition and nYposition
A fast magic wand handle, initialized by calling the LBitmap::StartFastMagicWandEngine function.
The tolerance value sets the stopping upper and lower color boundaries.
X-coordinate of the point. The point's color is used to find the region.
Y-coordinate of the point. The point's color is used to find the region.
Pointer to OBJECTINFO structure to be updated with the obtained region.
Reserved for future use. Must be 0.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function can only be called after the LBitmap::StartFastMagicWandEngine has been called. The MAGICWANDHANDLE structure passed must be the same as the one passed to LBitmap::StartFastMagicWandEngine function.
This function is used when it is needed to select many regions over one image, especially large images as it performs faster.
This function supports 1, 8, and 24-bit images.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
L_INT x, y, tolerance;
x = 50;
y = 50;
tolerance = 15;
nRet = LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("sample5.cmp")), 0,ORDER_BGR);
nRet = LeadBitmap.StartFastMagicWandEngine(&MagicWnd, 0);
nRet = LeadBitmap.FastMagicWand(MagicWnd, tolerance, x, y, &ObjectInfo, 0);
nRet = LeadBitmap.EndFastMagicWandEngine(MagicWnd, 0);
nRet = LeadBitmap.DeleteObjectInfo(&ObjectInfo, 0);
if(nRet != SUCCESS)
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries