public Point?[] SeatchImages(Bitmap[] _Searchfor, out string result, ImageSearchMethode imageSearchMethode, int toleranz = 0, bool jointhread = true) { var f = 0; var a = _Searchfor.Length; var dt = DateTime.Now; SeatchInBitmap = CaptureScreen(); _imageSearchMethode = imageSearchMethode; _toleranz = toleranz; _joinThread = jointhread; var Presults = new Point?[a]; var tmp = ctor; if (tmp == false) { ctor = true; } for (var i = 0; i < a; i++) { Seatch(); Presults[i] = _point; } ctor = tmp; result = $"Found {f} from {a} images. TimeSpan:{( DateTime.Now - dt )}"; return(Presults); }
public ImageSearch(Bitmap seatchForBitmap, Bitmap seatchInBitmap, ImageSearchMethode imageSearchMethode, bool joinThread = true, int toleranz = 10) { ctor = true; _seatchForBitmap = seatchForBitmap ?? throw new ArgumentNullException(nameof(seatchForBitmap)); _seatchInBitmap = seatchInBitmap ?? throw new ArgumentNullException(nameof(seatchInBitmap)); _imageSearchMethode = imageSearchMethode; _joinThread = joinThread; _toleranz = toleranz; }
public bool SeatchImage(Bitmap _Searchin, Bitmap _Searchfor, ImageSearchMethode imageSearchMethode, int toleranz = 0, bool jointhread = true) { _seatchForBitmap = _Searchfor; _seatchInBitmap = _Searchin; _imageSearchMethode = imageSearchMethode; _toleranz = toleranz; _joinThread = jointhread; var tmp = ctor; if (tmp == false) { ctor = true; } Seatch(); ctor = tmp; return(_found); }
public string SeatchImageWithInfo(Bitmap _Searchin, Bitmap _Searchfor, ImageSearchMethode imageSearchMethode, int toleranz = 0, bool jointhread = true) { _seatchForBitmap = _Searchfor; _seatchInBitmap = _Searchin; _imageSearchMethode = imageSearchMethode; _toleranz = toleranz; _joinThread = jointhread; var tmp = ctor; if (tmp == false) { ctor = true; } Seatch(); ctor = tmp; return($"Seatch returned: {_found}, X={_point.X}, Y={_point.Y}, TimeSpan={_timeSpan}"); }
public bool ImageIsOnScreen(Bitmap _Searchfor, ImageSearchMethode imageSearchMethode) { return(SeatchImage(CaptureScreen(), _Searchfor, imageSearchMethode)); }