think in these way: the eyes have the blue color, the backcolor is blue. so how can i change the backcolor without change the image\eye?
(these is just an exemple for trying explain)

Recommended Answers

All 2 Replies

FloodFill is the algorithm you are looking for. The idea is simple. As long as there is a border around the iris of the eye, you can floodfill the background and it will not affec the iris. However, if there is no border around the iris, then this will fail because it will consider the iris part of the background.

In other words, if the blue part of the eye touches the blue part of the background, the flood fill MIGHT not work unless they are different shades.

The other option is to use a "Mask".

commented: thanks +3

i belive that i understand what you mean. now i must understand how use DIB's. isn't easy :(
can i do mask using the BitBlt()?(with same image)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.