Question Related Pixel Colors Of BMP/Jpeg, After Getting It Into The Handle
Posted on 2001-07-20
I have done a quite bit of programing with bmp's/jpegs using win32 sdk in VC++. Opening the files mixing two images, writing text over it, saving them back etc. types of manipulations I have done, after opening file in HDC handle.
Now I require one more feature for my Image-Related win32 application, for which as far as I am concerned I am not able to work out Any Algorithm(s) Or Any Concept(s), and I need your Help. Here it is ::
After the Bitmap/Jpeg is opened and shown to the user, the user can click on any point on it. I want to get the color of that pixel, no problem I will get it.
Now what I want more is, I have to Trace all those Pixels All-Around this very particular PIXEL, moving in any direction from it HAVING THE SAME COLOR.
The search should stop in any direction when a pixel of different color is found.
Basically, what I have to do is to make the AREA black in the Bitmap, where a user pin-points and all the surrounding pxiels having the same pixel-color as the pin-pointed pixel color.
How to do that, please help me as soon as possible.