
actually i need in vb.net that category is not available so that i selected as java.first i need to store the pixels in 2d array .from that i need to convert all the pixel values into hexadecimal how it can be done in for loop and to convert that hex to bin for all the pixels please`Dim xmax As Integer Dim ymax As Integer Dim x As Integer Dim y As Integer Dim bm As New Bitmap(TextBox1.Text)
h = bm.Height
w = bm.Width
Dim g As Graphics = Me.CreateGraphics()
Dim bm1 As New Bitmap(bm)
xmax = bm.Width - 1
ymax = bm.Height - 1
Dim bmcolor As Color
For y = 0 To ymax
For x = 0 To xmax
bmcolor = bm.GetPixel(x, y)
bm1.SetPixel(x, y, Color.FromArgb(bmcolor.R, bmcolor.G, bmcolor.B))
Next x
Next y
Dim g1 As String = Hex(bmcolor.G)
Dim b1 As String = Hex(bmcolor.B)
Dim r1 As String = Hex(bmcolor.R)
Dim col5 As String
col5 = r1 & g1 & b1
MsgBox(col5)
PictureBox2.Image = bm
bin = Convert.ToString(Convert.ToInt32(col5, 16), 2)
MsgBox(bin)` i need coding immediately help me
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.