Hallo Zusammen !
Ich habe folgendes Problem:
Ich habe vor, die Pixel eines Bildes einzulesen und in farbigen Text wiederzugeben.
Bisher bin ich allerdings nur soweit, dass der gesamte Text in Farbe des ersten Pixels [1;1] gefärbt wird:
Kann mir da jemand sagen, was ich falsch mache ?
Ich habe folgendes Problem:
Ich habe vor, die Pixel eines Bildes einzulesen und in farbigen Text wiederzugeben.
Bisher bin ich allerdings nur soweit, dass der gesamte Text in Farbe des ersten Pixels [1;1] gefärbt wird:
Visual Basic-Quellcode
- For h As Integer = 1 To pbImage.Image.Height
- For w As Integer = 1 To pbImage.Image.Width
- Dim b As Bitmap = pbImage.Image
- Dim c As New Color
- c = b.GetPixel(w - 1, h - 1)
- tbOut.Text = tbOut.Text + "##"
- tbOut.SelectionStart = tbOut.TextLength - 2
- tbOut.SelectionLength = 2
- tbOut.SelectionColor = c
- tbOut.SelectionStart = tbOut.TextLength
- tbOut.Update()
- ProgressBar1.Value = h
- Text = w.ToString + ":" + h.ToString + " " + c.ToString
- Next
- tbOut.Text = tbOut.Text + vbCrLf
- Next
Kann mir da jemand sagen, was ich falsch mache ?