Ich hab dir mal schnell was zusammengebastelt. Vieleicht hilft dir das.
Option Explicit
Private Declare Function GetPixel Lib "gdi32.dll" _
(ByVal hdc As Long, _
ByVal x As Long, _
ByVal y As Long) As Long
Private Sub Command1_Click()
Dim x As Integer
Dim y As Integer
Dim black As Long
Dim white As Long
For x = 0 To Picture1.Height
For y = 0 To Picture1.Width
If GetPixel(Picture1.hdc, x, y) = RGB(0, 0, 0) Then
black = black + 1
ElseIf GetPixel(Picture1.hdc, x, y) = RGB(255, 255, 255) Then
white = white + 1
End If
Next
Next
Text1.Text = Str(black)
Text2.Text = Str(white)
End Sub
Private Sub Form_Load()
Picture1.ScaleMode = vbPixels
End Sub