Extracting co-ordinates from Images

Rufe0's Avatar, Join Date: Jul 2007
Newbie Member
I need to extract the co-ordinates of pixels colour=black from an image file, a bitmap would be simplest I assume. Anyway I've tried to parse the bitmap into text so I can read it that way but I can't get what I need. I believe once I can get the information out of the file I can use info here http://en.wikipedia.org/wiki/Bitmap to work out which bits are which. Has anyone done this sort of thing before, can someone help me out here?

PS using C# but prefer VB if I can get anyway with it.
Thnx Rufe0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Sure you can. Obviously, you should be looking to MSDN, not Wikipedia. They have a ton of stuff, including predefined structures and API functions, for dealing with .bmp files.
Rufe0's Avatar, Join Date: Jul 2007
Newbie Member
Finding it hard to find any useful information on there. One useful nuget I found so far on this site http://msdn2.microsoft.com/en-us/lib....getpixel.aspx a way to find the colour of a pixel at x,y but that means your going to have to find the total pixel size then go through every single pixel one by one to find the ones your looking for.

For my aplication I will be using black and white images with only a couple of lines on but may be 1000x1000 pixels or more in size. If I could change the bitmap to a text string then I could just look through a string maybe a houndred charators long and find all the '0' charactors.