I'm new to Python and trying to figure out how to take a screenshot of just a specific region with pyautogui. Here's what I have:
import pyautogui
IM = pyautogui.screenshot(region=(20, 20, 500, 500))
IM.save('screen.png')
The region parameter does not work and it screenshots my entire screen every time. I am on MacOS. Thank you for your help!
Yep, this is a bug for macos, they just forgot to add logic for the crop (and also save)
I`m a novice (literally learning python only the second day, bc I can miss something, but i this can helps for ppls who find this response)
I could create a PR, but as I see, the library is completely abandoned
old lib code:
Fixed code: