ImageSearch 2020

Image Search 2020
Written in Golang and C++

ImageSearch 2020 is a robust image search offline library, for all your searching needs. Have major features to search your image on screen, on other image or from a specific window.

Highlighted features in 2020 version:

  • Optimize search speed
  • Optimize stability
  • Support transparent PNG format
  • Support multi operating system
  • Support any programming languages (AutoIt, Golang, Js, Java…)
  • Able to scale up easily with multi threads, multi processes through HTTP request

ImageSearch 2020 is written in C++ and Golang for maximizing the performance along with the concurrently processing, that brings a new wind to the field. ImageSearch 2020 use the Boyer-Moore-Horspool algorithm with some modification that promises the better speed than the other versions.

If you get interested in, don’t hesitate to try our beta version for testing the functionality and the compatibility of your operating system. Otherwise you could buy the paid version without any functional limitation for production using. Beside, source code is also available for sell, this is for you if you are a C++/golang developer and want to develop this library yourself.

Beta Version

0 VND

Completed
  • Search Image On Screen
  • Search Image From Window
  • Search Image From File
  • Daily token needed
  • No support
Paid Version

500.000 VND

Completed
  • Search Image On Screen
  • Search Image From Window
  • Search Image From File
  • Capture Window To File
  • Get Pixel From Window
  • Support JPG, PNG, BMP
  • Lifetime Update
Source Code

5.000.000 VND

Not available for now
  • Full source code
  • Setup instruction support
ImageSearch Documentation

Instruction using postman

URI: http://localhost:2020/searchImageFromWindow

Body Data:

{
  "SType": "handle",
  "SValue": "0x00000000000206D8",
  "Left": 0,
  "Top": 0,
  "Width": -1,
  "Height": -1,
  "SearchImage": "C:\\Users\\ADMIN\\Desktop\\icwt1.bmp",
  "Tolerance": 0.01,
  "PW": true,
  "CenterCoords": true,
  "BruteForce": true
}

Instruction using postman

URI: http://localhost:2020/searchImageOnScreen

Body Data:

{
  "Left": 0,
  "Top": 0,
  "Width": -1,
  "Height": -1,
  "SearchImage": "C:\\Users\\ADMIN\\Desktop\\t.bmp",
  "Tolerance": 0.01
}

 

Instruction using postman

URI: http://localhost:2020/searchImageFromFile

Body Data:

{
  "SearchImage": "C:\\Users\\ADMIN\\Desktop\\img2.png",
  "BaseImage": "C:\\Users\\ADMIN\\Desktop\\img3.png",
  "Tolerance": 0.01,
  "CenterCoords": false,
  "BruteForce": false
}

 

 

Instruction using postman

URI: http://localhost:2020/captureWindowToFile

Body Data:

{
  "SType": "handle",
  "SValue": "0x00000000000206D8",
  "Left": 0,
  "Top": 0,
  "Width": 200,
  "Height": 100,
  "PW": true,
  "FilePath": "C:\\Users\\ADMIN\\Desktop\\ga.bmp"
}

 

 

 

Instruction using postman

URIhttp://localhost:2020/getPixelFromWindow

Body Data:

{
  "SType": "handle",
  "SValue": "0x00000000000206D8",
  "X": 100,
  "Y": 100,
  "PW": true
}

 

 

 

 

ImageSearch Example

Search Image on Screen

#include "lib/WinHttp.au3"
#include "lib/Json.au3"

Dim $sReturned

;################### Params #######################
$Left = 0
$Top = 0
$Width = -1
$Height = -1
$SearchImage = "C:\\Users\\ADMIN\\Desktop\\img.bmp"
;##################################################

; Start Image Search 2020 Server
$ImageSearch2020Path = StringLeft(@ScriptDir,StringInStr(@ScriptDir,"\",0,-1)-1) & '\ImageSearch 2020.exe'
$IS = Run($ImageSearch2020Path, @ScriptDir, @SW_HIDE)

; Wait until it's available
While 1
    StdoutRead($IS)
    If @error Then ExitLoop
WEnd

Local $hTimer = TimerInit()
; POST data (WinHTTP)
$sAdditionalData = '{"Left":' & $Left & ',"Top":' & $Top & ',"Width":' & $Width & ',"Height":' & $Height & ',"SearchImage":"' & $SearchImage & '"}'
$hOpen = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0")
$hConnect = _WinHttpConnect($hOpen, "http://localhost:2020")
$hRequest = _WinHttpOpenRequest($hConnect, "POST", "/searchImageOnScreen")
_WinHttpSendRequest($hRequest, "Content-Type: application/json", $sAdditionalData)
_WinHttpReceiveResponse($hRequest)
If _WinHttpQueryDataAvailable($hRequest) Then
  Do
    $sReturned &= _WinHttpReadData($hRequest)
  Until @error
EndIf

; Decode json
$message = Json_Decode($sReturned)
If @error Then
  MsgBox(0,'Error', 'There was something wrong!')
  ProcessClose($IS)
  Exit
Endif

; Check error
$coords = Json_Get($message, '.Coords[0]')

; Display result
MsgBox(0,'Result', 'X: ' & Json_Get($coords, '.Fx') & @CRLF _
         & 'Y: ' & Json_Get($coords, '.Fy') & @CRLF _
         & 'Width: ' & Json_Get($message, '.Iw') & @CRLF _
         & 'Height: ' & Json_Get($message, '.Ih') & @CRLF _
         & 'Time: ' & Round(TimerDiff($hTimer)) & 'ms')

; Close handles
_WinHttpCloseHandle($hRequest)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)

; Destroy Image Search 2020 Server
ProcessClose($IS)


Full source code: Autoit.zip

Search Image on Window

using System.Net;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;

namespace SearchImageFromWindow
{

    class Program
    {
        static void Main(string[] args)
        {
            // Start Image Search 2020 server first
            // ...................................

            // WebClient
            using (WebClient client = new WebClient())
            { 
                try
                {
                    var watch = System.Diagnostics.Stopwatch.StartNew();

                    string Class = "title";
                    string Title = "League of Legends";
                    float Left = 0;
                    float Top = 0;
                    float Width = -1;
                    float Height = -1;
                    string SearchImage = "C:\\\\Users\\\\ADMIN\\\\Desktop\\\\lol.bmp";

                    string response = client.UploadString(
                        "http://localhost:2020/searchImageFromWindow",
                        "POST",
                        "{" + $"\n\t\"SType\": \"{Class}\",\n\t\"SValue\": \"{Title}\",\n\t\"Left\": {Left},\n\t\"Top\": {Top},\n\t\"Width\": {Width},\n\t\"Height\": {Height},\n\t\"SearchImage\": \"{SearchImage}\"\n" + "}"
                    );

                    watch.Stop();

                    try
                    {
                        string pattern = @"{\""Coords\"":\[{\""Fx\"":(\d+),\""Fy\"":(\d+)}\].\""Iw\"":(\d+).\""Ih\"":(\d+)}";
                        Match m = Regex.Matches(response, pattern)[0];

                        MessageBox.Show(
                            "X: " + m.Groups[1].Value + "\n" +
                            "Y: " + m.Groups[2].Value + "\n" +
                            "Width: " + m.Groups[3].Value + "\n" +
                            "Height: " + m.Groups[4].Value + "\n" +
                            "Time: " + watch.ElapsedMilliseconds + "ms");
                    } catch 
                    {
                        MessageBox.Show("There was something wrong!");
                    }

                    
                }
                catch (WebException ex)
                {
                    MessageBox.Show(new StreamReader(ex.Response.GetResponseStream()).ReadToEnd());
                }

            }
        }
    }
}

Full source code: C#.zip

Search Image from File

var request = require("request");
var options = {
  method: "POST",
  url: "http://localhost:2020/searchImageFromFile",
  body: JSON.stringify({
    SearchImage: "C:\\Users\\ADMIN\\Desktop\\img2.png",
    BaseImage: "C:\\Users\\ADMIN\\Desktop\\img3.png",
  }),
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

 

ImageSearch Discussion
Join our Discord community or leave a message below:
>