is there anyway i can make this go faster?
Private Function strCoordinates(ImageURL As String, Referer As String) As String
Dim img() As Byte
Dim Pet As StdPicture
Dim ct As Integer
Dim ctx As Long
Dim cty As Long
Dim x As Long
Dim y As Long
Dim Value As Single
GetSource "GET", "captcha_show.phtml?" & ImageURL, "www.neopets.com", "http://www.neopets.com/haggle.phtml?" & Referer, strSession, ""
img = StrConv(strSource, vbFromUnicode)
Set Pet = ToJpg(img)
Set picPet.Picture = Pet
Value = 4900000
Do Until ct <> 0
For y = 0 To picPet.ScaleHeight - 1
For x = 0 To picPet.ScaleWidth - 1
If GetPixel(picPet.hdc, x, y) < Value Then
ct = ct + 1
ctx = ctx + x
cty = cty + y
End If
Next x
Next y
Value = Value + 500000
DoEvents
Loop
strCoordinates = "&x=" & Int(ctx / ct) & "&y=" & Int(cty / ct)
Set Pet = Nothing
End Function
thanks for any help