Put on form Picture Box control and button. Set property ScaleMode to 3-Pixel and post this code:
This code counts Black and Red pixels in PictureBox
Code: VB
Private Sub Command1_Click()
Dim arr(1000, 1000) As Integer
Dim i
Dim y
Dim iSumRed As Integer
Dim iSumBlack As Integer
iSumRed = 0
iSumBlack = 0
For i = 0 To Pict.Picture.Width
For y = 0 To Pict.Picture.Height
If Pict.Point(i, y) = vbRed Then
iSumRed = iSumRed + 1
End If
If Pict.Point(i, y) = vbBlack Then
iSumBlack = iSumBlack + 1
End If
Next
Next
Debug.Print "Black :" & iSumBlack
Debug.Print "Red :" & iSumRed
End Sub

