I have a vb net program to take a binary value in the image. This syntax produces
111110
on textbox3.text. I want no spaces at textbox3.text
1 1 1 1 1 0
Dim x, y As Integer
Dim gambar As New Bitmap(PictureBox7.Image)
Dim gray, vektor, biner As Integer
'biner
'With gambar
For x = 0 To gambar.Width - 1
For y = 0 To gambar.Height - 1
gray = (CInt(gambar.GetPixel(x, y).R) + _
gambar.GetPixel(x, y).G + _
gambar.GetPixel(x, y).B) / 3
gambar.SetPixel(x, y, Color.FromArgb(gray, gray, gray))
If gray > 128 Then
biner = 255
Else
biner = 0
End If
gambar.SetPixel(x, y, Color.FromArgb(biner, biner, biner))
'ttup proses grayscale
If (biner = 0) Then
vektor = 0
End If
If (biner = 255) Then
vektor = 1
End If
'TextBox2.Text = pixel_putihblkg2
TextBox3.SelectedText = vektor.ToString
Next y
PictureBox7.Refresh()
PictureBox7.Image = gambar
Next x
PictureBox7.SizeMode = PictureBoxSizeMode.StretchImage
Catch exc As Exception
End Try