|
|
Title | Perform a flood fill on an area with approximate uniform color in Visual Basic .NET |
Description | This example shows how to perform a flood fill on an area with approximate uniform color in Visual Basic .NET
|
Keywords | flood, flood fill, graphics, color, approximate color, Visual Basic .NET, VB.NET |
Categories | Algorithms, Graphics, VB.NET |
|
|
The example Flood fill areas using safe and unsafe methods in Visual Basic .NET shows how to flood an area with a color. For example, by starting at any point in a white irregular area, the program can fill the white pixels in the area with some other color.
Todd Morrow needed a method for flooding an area that is "approximately" the same color. For example, suppose you have photograph with a background that is mostly white. The previous method only works for pixels that are exactly white. Todd needed to convert pixels that are close to white into a transparent background color.
That's what this example does. When you click on an area on the example image, the program fills pixels within a given tolerance of the clicked pixel's color with a new color.
Thanks Todd for this excellent tool!
|
|
|
|
|
|
|
|
|