I want it to be known that I'm working from scratch here and haven't researched any ideas on how existing code has been written. That said I'm assuming you download the image as a .jpeg and then scan for the darkest pixel. Once the darkest pixel is found add/subtract a random value from the found coordinates and send them in the post data?
I wouldn't add or subtract anything. But yup. Also feel free to skip like every other pixel for speed reasons.
This is MY old code in VB6. Apparently, I used the LIGHTEST pixel.
Public Sub iOCR(iPicture As PictureBox)
On Error Resume Next
Dim iDark As Long
Dim iCur As Long
Dim Q As Double
iPicture.Cls
Q = GetTickCount
iDark = 9999999
For i = 15 To iPicture.ScaleHeight - 15 Step lngY
For o = 15 To iPicture.ScaleWidth - 15 Step lngX
iCur = GetPixel(iPicture.hDC, o, i)
If iCur < 0 Then GoTo huh:
If iCur < iDark Then
iDark = iCur
x = o
y = i
End If
huh:
Next
MyDoEvents
Next
Corners iPicture, x, y
Q = GetTickCount - Q
lblOCRTime.Caption = Q & " ms"
End Sub
Edited by Icey Defeat, 28 March 2012 - 11:42 AM.