[GDIP] How do I replace part of a bitmap with black pixels

Get help with using AutoHotkey and its commands and hotkeys
kyuuuri
Posts: 201
Joined: 09 Jan 2016, 19:20

[GDIP] How do I replace part of a bitmap with black pixels

01 May 2019, 13:45

Hello. Let's say I have this screenshot
Image
And I want it to ignore a portion of the image like this:
Image

What can I do to achieve that?
I've been thinking about replacing that portion of the image with black pixels
So my code would be something like:

Code: Select all

#include Gdip_All.ahk
Gdip_Startup()
Screen:=Gdip_BitmapFromScreen()
;Here do some stuff to replace that part of the image with a black square
;Do imagesearch
or if there is any possible way to do this:

Code: Select all

#include Gdip_All.ahk
Gdip_Startup()
Screen:=Gdip_BitmapFromScreen()
;Do imagesearch ignoring that exact square
So my questions are:
Is there a way to use GDIP imagesearch and ignore an square that it's somewhere near the middle of the image?
If not, then how could I replace that square of pixels with black pixels so it never finds something there?

Thanks in advance.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot] and 155 guests