473,661 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ID'ing color in a bitmap

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
2 1004
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
"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.GetPixe l'.

--
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6053
by: ivan_oj28 | last post by:
Hi, I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on screen if so desired. I was thinking on using asterisk (asterisk.org) for this with appropriate 2FXO/2FXS card but I do not know if this is just overkill (asterisk for this). Do you know of any other solution/way of getting the caller id and...
2
1412
by: RWC | last post by:
Hello, I have a page connected to an SQL table. The page loops through, creating a row for each record, displaying in image, the ID of which is set to the record id. When I click a button to change the image, I'd like to refer to the ID on the main page, but change the image on the main page. Any idea how to do this? Example is as follows
12
2698
by: Russell E. Owen | last post by:
I have several situations in my code where I want a unique identifier for a method of some object (I think this is called a bound method). I want this id to be both unique to that method and also stable (so I can regenerate it later if necessary). I thought the id function was the obvious choice, but it doesn't seem to work. The id of two different methods of the same object seems to be the same, and it may not be stable either. For...
7
7834
by: Jack Hagouel | last post by:
I have the following code: <li onMouseOver='myid = (typeof event.target != "undefined")? event.target:event.srcElement.id' id=li15> I'm trying to assign the value of the element's id to the variable 'myid' whenever the mouse goes over this element. But myid remains undefined. What am I doing wrong? Is there a better way to write this code? Thank you.
4
1704
by: Neil Stevens | last post by:
Hi, Merry Christmas to you all. I have a problem with server controls, i am writing a C# ASP.NET web project and i am creating custom server controls for some of the more common element. One example is a NavigationMenu control or a Login control. The problem is that when the page renders, say, the Login control, the ID of the username field is changed from
2
1933
by: RN | last post by:
I am dynamically adding a number of HTML buttons to a page... <input type="submit" name="alwaysthesame" id="different1" value="alwaysthesame"> <input type="submit" name="alwaysthesame" id="different2" value="alwaysthesame"> <input type="submit" name="alwaysthesame" id="different3" value="alwaysthesame"> I want them all to have the same name NAME attribute and the same VALUE
11
1941
by: Neo Geshel | last post by:
I have an Access DB, from which I am going to pull images. Each image has an associated ID, but the ID's are not necessarily sequential (some images may have been deleted, leaving gaps in the list of ID's). I am looking to be able to call an ID and its Image from the database, but also have returned the previous ID and the next ID, even when those actual ID's are not necessarily +1 and -1 to the ID being called. For example, I want to...
2
1397
by: Peter Oliphant | last post by:
Sometimes it's hard to get straight when passing or storing or returning an instance of a class whether you are still dealing with the original object or a copy. For example, the '=' operator used on pointers to two instance of a class can be overloaded to return the pointer to the target instance or a pointer to a copy of the target instance. When passing an instance of a class it can be done so the method will manipulate the instance...
3
1137
by: Stuart McGraw | last post by:
The following was cut and pasted exactly (except for the # lines which I added after the fact) from an interactive python session in a Window 2000 cmd.exe window. Can somebody please explain to me what the heck is going on?!?! Python 2.4.2 (#67, Sep 28 2005, 12:41:11) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class A:
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.