3

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!

HurpaDerpa
  • 130
  • 1
  • 13

1 Answers1

2

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

HurpaDerpa
  • 130
  • 1
  • 13