can anybody give me code of getting RGB value form an image
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
hiiii i want that somebody give me code to get the RGB values from an image and show in edit boxes. its a bit urgent plz regards tahir
-
hiiii i want that somebody give me code to get the RGB values from an image and show in edit boxes. its a bit urgent plz regards tahir
What you can do is use the Bitmap class GetPixel method to get the Color of that pixel, then use the Color class R, G, and B properties to get the values you want.
Dim MyImage As New Bitmap("C:\testimage.jpg")
Dim pixelColor As Color = MyImage.GetPixel(0,0)
Dim r As Byte = pixelColor.R
Dim b As Byte = pixelColor.B
Dim g As Byte = pixelColor.GRageInTheMachine9532