I'm evaluating "GdPicture ToolKit Pro Edition" and I’m trying to remove some black pixels on a black & white picture in order to clean it. I try to read a 1 pixel width vertical line, count the number of black pixels on that line and if this number is smaller than 5, I want to replace all the black pixels on that line with white pixels. I'm using the following code:
- Code: Select all
Dim numero As Long
Dim culoare As Long
Dim i, j As Integer
culoare = Imaging1.argb(255, 0, 0, 0)
For j = 1 To 150
Call Imaging1.SetROI(j, 0, 1, 40)
numero = 0
For i = 1 To 40
culoare = Imaging1.PixelGetColor(j, i)
If culoare <> -1 Then numero = numero + 1
Next i
If numero< 5 Then Call Imaging1.AdjustRGB(255, 255, 255)
Next j
DrawPreview
The problem is that on the picture apears 3 vertical large black lines and i can't figure why.
First time, i try to use countcolor() and also i had this problem with huge black lines.
Can anyone help me?
Thank you in advance!
