How can I use ImageGrab.grab())
in a specific manner to capture the selected window rather than the whole screen or boundary box?
For a better understanding, I am currently using this line below, which basically captures the given boundary box:
screen = np.array(ImageGrab.grab(bbox=(0,40,800,640)))
Thanks!
After finding out of a package, called win32gui I have successfully solved this issue. Please refer to this link: Get window position & size with python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With