PyAutoGUI and Image Detection on different Monitor Resolutions
Hello,
I am writing an automation script to detect an image on the screen and do some automatic mouse movements and such. This program works smoothly on my own computer (because all my saved screengrab images are from my own monitor). However, when I test the program out on other computers, they will only work if I go through and manually redo the screengrabs for each image (my main monitor is 2560x1440, and laptop I test on is 1920x1080). Setting the confidence level of locateImage is not that consistent for me as well as resizing the screenshots do not work since it reduces clarity.
I was wondering if anyone has a solution to my woes?
Posted Jul 19, 2020, 2:37 AM UTC
11
Maybe you could try Pillows resize() func.
so you should get the resized img in prop to the original size of the mainscreen
and sorry english is not my native language.