This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, July 10, 2007 5:00:02 AM(UTC)
Groups: Registered
Posts: 51
Hi,
I'm trying to use AddMagicWandToRegion with LT15 and VB.NET, but I've some problem. When I run the command the region I get is the whole image.
I do like this:
I pick the pixel color at mouse click
then I define the lower and upper limit, using a percentage of tollerance like toller = 2%
midcolor is the color of the pixel clicked by the mouse
Dim lower As New RasterColor(midcolor.R * (1 - (toller / 100)), midcolor.G * (1 - (toller / 100)), midcolor.B * (1 - (toller / 100)))
Dim upper As New RasterColor(midcolor.R * (1 + (toller / 100)), midcolor.G * (1 + (toller / 100)), midcolor.B * (1 + (toller / 100)))
Image.AddMagicWandToRegion(ptw.X, ptw.Y, lower, upper, RasterRegionCombineMode.Set)
Where I mistake?
#2
Posted
:
Tuesday, July 10, 2007 10:42:05 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
The region of the AddMagicWandToRegion depends on the following factors:
- The color found at point (x,y) in the image.
- The lowerToleranceColor color.
- The upperToleranceColor color.
- The image itself.
I checked the function on my side and didn't notice the problem.
Can you please send me a sample testing project that shows the problem, so that I can check it? Also, please provide me with the image that you use.
Note: If you want to send any file, please put it in a ZIP or RAR file.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
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.