-
|
I'd like to allow ImageSearchAll function to have tolerance(variation) in each pixel comparison, but do not know how to get the Base64 encoded code to DllCall in Autohotkey. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Use McodeForGCC. The ImageSearch you're editing happens to be outdated. This one is currrent (it's a comment in ImagePut.ahk). The difference between the two versions is that this one essentially does a parallel pixel search of 2 pixels, where the first is the top left, and the 2nd pixel is specified by an (x, y) coordinate. This approach minimizes time spent in the subimage loop. I never got around to optimizing the above code using SSE2 128-bit wide intrinsics. If you browse through the current approach for PixelSearch, you can see just how much work is needed. Feel free to make a pull request even for an unoptimized version. |
Beta Was this translation helpful? Give feedback.
-
|
Oops, I guess the patch I showed in the post seems to only compare the alpha value, 😆 |
Beta Was this translation helpful? Give feedback.
Use McodeForGCC.
https://github.com/joedf/MCode4GCC
You may need to enable SSE2 flags to compile for x86.
The ImageSearch you're editing happens to be outdated. This one is currrent (it's a comment in ImagePut.ahk).
https://godbolt.org/z/cKxrrT4ss
The difference between the two versions is that this one essentially does a parallel pixel search of 2 pixels, where the first is the top left, and the 2nd pixel is specified by an (x, y) coordinate. This approach minimizes time spent in the subimage loop.
I never got around to optimizing the above code using SSE2 128-bit wide intrinsics. If you browse through the current approach for PixelSearch, you can see just how much work is needed.
Feel f…