Re: ID'ing color in a bitmap
Tech-Archive recommends: Fix windows errors by optimizing your registry
- From: Chris <no@xxxxxxxx>
- Date: Tue, 04 Apr 2006 09:59:46 -0400
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
.
Relevant Pages
- =?iso-8859-1?Q?Re:_CopyFromScreen_Bitmap_als_Bild_speichern_und_Gr=F6=DFe?= =?iso-8859
... wenn du mit der Auflösung festlegst, dass in einem Zoll 96 Pixel darzustellen sind, dann belegen 200 Pixel etwa 55 mm. ... Dim bmp As Bitmap = New Bitmap ... g.DrawImage(bmp, 0, 0, breite, hoehe) ... Wie Du erkennen kannst ist die Linke Grafik nur noch halb so breit wie die Obere, ... (microsoft.public.de.german.entwickler.dotnet.vb) - Re: VB3 is making my head spin!
... > and displaying it pixel by pixel] tell me how. ... compressed bitmap from an original 24 but full colour bitmap that is held on disk as a standard ... It shows you how to load a full colour 24bit .bmp file from disk and count ... Dim z As Long, t1 As Long, t2 As Long ... (comp.lang.basic.visual.misc) - Re: PictureBox max width
... boxes at the same time. ... The maximum Width of a memory bitmap can be very much greater than the 16383 VB PictureBox limit. ... If your desired overall size is very much larger than this amount, and especially if you are going to run it on machines with limited memory, then you might instead wish to use DIBSections (which are a bit smaller because a full colour 24 bit DIB requires only three bytes per pixel) and which I believe can be paged to disk, although you will still run into problems with DIBSections if you ever get up to extremely large overall sizes. ... I'm afraid you're kidding yourself with the Frame Control, ... (microsoft.public.vb.general.discussion) - Re: How to fill a region
... It uses direct pixel access via LockBits and no unsafe code. ... BitmapData bmd) ... /// Fills a bitmap with color. ... Graphics g=Graphics.FromImage; ... (microsoft.public.dotnet.framework.drawing) - Re: Lineal skalieren
... Das Pixel auf dem Bildschirm ist auch ... Eine Bitmap ist zunächst nichts anderes als ein zweidimensionales ... Aber hat ein Pixel in diesem Array eine Fläche? ... Digitalisierung eines Bildes eine Methode ist, ... (microsoft.public.de.german.entwickler.dotnet.vb) |
|