By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

ID'ing color in a bitmap

P: n/a
I import a bitmap into a .net. The bitmap is made up of black and
white pixels. Is there a way to test a single point on the bitmap and
discover if it is in fact black or write? I basically want to test
areas pixel by pixel.

Apr 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
pmclinn wrote:
I import a bitmap into a .net. The bitmap is made up of black and
white pixels. Is there a way to test a single point on the bitmap and
discover if it is in fact black or write? I basically want to test
areas pixel by pixel.


You can use the Bitmap.GetPixel() class which returns a Color object.
You can use this color object to look at the RGB values. Depending on
the bitmap this may mean that the R, G & B values are either 0 or 255
but more than likely they will be like close to 0 & 255.

hope this helps.
Chris
Apr 4 '06 #2

P: n/a
"pmclinn" <pm*****@gmail.com> schrieb:
I import a bitmap into a .net. The bitmap is made up of black and
white pixels. Is there a way to test a single point on the bitmap and
discover if it is in fact black or write? I basically want to test
areas pixel by pixel.


'Bitmap.GetPixel'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Apr 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.