Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitlePerform a flood fill on an area with approximate uniform color in Visual Basic .NET
DescriptionThis example shows how to perform a flood fill on an area with approximate uniform color in Visual Basic .NET
Keywordsflood, flood fill, graphics, color, approximate color, Visual Basic .NET, VB.NET
CategoriesAlgorithms, 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!

 
 
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated