Page 2 of 2

Re: windows capture, image search and colors search

Posted: 10 May 2022, 04:43
by thqby
thqby wrote:
09 Feb 2022, 06:18
The param variation of findPic and findAllPic is equal to the transparent_color << 32 | variation.
For example

Code: Select all

variation := 0xffffffff << 32 | 0 ; it will ignore the white in the image

variation := 0xff000000 << 32 | 0x050505 ; it will ignore the black in the image, and allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of each pixel's color
@frifix

Re: windows capture, image search and colors search

Posted: 10 May 2022, 05:19
by frifix
@thqby
Thank you, now it works. I have misunderstood the variation parameter.

Re: windows capture, image search and colors search

Posted: 16 May 2022, 23:11
by arcticir
If I want to save the picture in JPG format, do I still need to use GDIP for conversion?

Re: windows capture, image search and colors search

Posted: 26 Sep 2022, 02:41
by ddt442
Is possible to have an example for finding multi colors's coordinate?

Re: windows capture, image search and colors search

Posted: 26 Sep 2022, 19:00
by thqby
@ddt442

It's already in the example.

Re: windows capture, image search and colors search

Posted: 07 Oct 2023, 12:38
by super64
Great features. Awesome and practical.
I have created a software that blurs a part of a window.

Can you please add the ability to apply a Gaussian blur to the WGC capture image to the dll?
I want to apply a blur of about 2px-10px.
Right now I use stretchblt scaling to blur.
Blurring a 1500x1500px image at 60fps is very CPU intensive.

I tried gdip but it did not improve.

Re: windows capture, image search and colors search

Posted: 07 Oct 2023, 14:51
by Feather
I tried capturing fullscreen with DXGI and found no performance advantage over gid. Am I missing some parameter?

7680*2160
dxcp 380ms:
bb := dxcp.captureAndSave()

gdi 220ms:
dc := DllCall("GetDC", "UInt", 0, "Cdecl UPtr")
...
DllCall("GDI32\BitBlt", "UInt", ...)

Re: windows capture, image search and colors search

Posted: 07 Oct 2023, 23:13
by thqby
Most image related algorithms require a lot of computation, and different algorithms have different performance.
Not performing calculations can significantly improve performance when the image has not changed.
The BitmapBuffer object has tick property that can be used to distinguish whether to update or not.

Re: windows capture, image search and colors search

Posted: 07 Oct 2023, 23:26
by thqby
DXGI is not an instant screenshot method. It only returns image data when the target changes within a specified time, otherwise it will return a timeout error. This method can avoid processing duplicate images in continuous screenshots.

Re: windows capture, image search and colors search

Posted: 11 Oct 2023, 12:50
by Feather
I'm experiencing a problem. With multiple monitors, WGC only captures the first screen.

Re: windows capture, image search and colors search

Posted: 11 Oct 2023, 21:27
by thqby
WGC(hwnd_or_monitor_or_index)
You need to specify the monitor index.

Re: windows capture, image search and colors search

Posted: 27 Feb 2024, 16:13
by yfjuu6
thqby wrote:
11 Oct 2023, 21:27
when I run the script color.ahk those errors appear.
Does anyone know what the problem is ?

Re: windows capture, image search and colors search

Posted: 27 Feb 2024, 22:39
by thqby
Perhaps the vc2015 runtime is not installed.