I am loading an image from a bitmap file into a picture box. I would like to convert the image from color to black and white.
I need to perform the conversion on the picturebox picture after the bitmap has been loaded.
This is my current approach, which is not working.
'Paint pixels black if they are not white
Dim Cnt1 As Byte
Dim Cnt2 As Byte
Dim Point As POINTAPI
For Cnt1 = 0 To 7 'Step 5
For Cnt2 = 0 To 10 ' Step 5
'Draw a pixel
If Not GetPixel(Picture1.hdc, Cnt1, Cnt2) = vbWhite Then
SetPixel Picture1.hdc, Cnt1, Cnt2, vbBlack
Any ideas or other approaches would be appreciated.