So, wenns sowas schon gibt hier meine Frage:
Da mein Pixelbot nen hohen ram bedarf hat suche ich ne alternative pixelsearch.
So siehts bisher aus:
PHP Code:
Dim bmp As Bitmap
Dim g As Graphics
Dim rect As Rectangle
Dim c As Color
PHP Code:
bmp = New Bitmap(1280, 965 - 65)
g = Graphics.FromImage(bmp)
rect = New Rectangle(0, 0, bmp.Width, bmp.Height)
c = Color.FromArgb(255, 252, 229)
und dann im search timer:
PHP Code:
g.CopyFromScreen(New Point(0, 65), New Point(0, 0), New Size(1280, 965))
Dim bmpdata As System.Drawing.Imaging.BitmapData = bmp.LockBits(rect, Imaging.ImageLockMode.ReadOnly, bmp.PixelFormat)
Dim pixel(rect.Width * rect.Height - 1) As Integer
Runtime.InteropServices.Marshal.Copy(bmpdata.Scan0, pixel, 0, pixel.Length)
For x As Integer = 0 To rect.Width - 1
If x + 3 < rect.Width Then
x = x + 3
Else
Timer2.Start()
x = 0
End If
For y As Integer = 0 To rect.Height - 1
If box = True Then
If pixel(y * rect.Width + x) = Farbe Then
collect(New Point(x + 2, y + 50))
Threading.Thread.Sleep(1250)
End If
End If
Next
Next
bmp.UnlockBits(bmpdata)
So grob in etwa. kann sein das beim kopieren nun fehler gekomm sind
Hat da wer ne bessere möglichkeit?