Color Detection Auto-Trigger

With anti-cheat services such as EAC, it can often be very difficult to not only write hacking software which bypasses their protection, but to continuously do so by keeping up with their updates. One way around this is a more holistic approach, image processing. This small program is not really image-processing, but more of a color tracking tool. As you can see in the image below, the word "Tracking" means that wherever your crosshair is looking is where the color is being tracked.

As an example, say your aiming your crosshair at a window where you expect an enemy to appear. Start by tracking the color of the wall through the window (simply by pressing a keybind). When an enemy appears in the window, they will appear in front of the wall which means there will be a huge color difference. This change in color is when we should shoot. The game however has a day/night system, so its important to continuously update the color of what we are tracking and to only shoot when we detect a large change (defined by some threshold). Unfortunately the limitation to this is when it's completely night and changes in color dont reach the difference threshold necessary to shoot.

This system is completely external, so the graphics aren't drawn through the game's rendering system. Instead a transparent overlay is created on top of the game window and Direct2D draws onto this surface. Directly drawing using GDI will result in flickering and high CPU usage, so it's worth using DirectX or OpenGL.