ponty / pyscreenshot

Python screenshot library, replacement for the Pillow ImageGrab module on Linux.
BSD 2-Clause "Simplified" License
499 stars 89 forks source link

How to record screen instead of the desktop image? #84

Closed ssxcxS45XT closed 3 years ago

ssxcxS45XT commented 3 years ago

I use the following command on Mac OS X 10.15.6. But I just record the desktop of image, instead of a screenshot. Does anybody know how to take a screenshot? Thanks.

import pyscreenshot
im = pyscreenshot.grab()
im.save("fullscreen.png")
ponty commented 3 years ago

Use Pillow: https://pillow.readthedocs.io/en/latest/reference/ImageGrab.html

ssxcxS45XT commented 3 years ago

I found that this should be done on Mac OS X Catalina.

System Preferences -> Security & Privacy -> Screen Recording -> Terminal

https://github.com/BoboTiG/python-mss/issues/134#issuecomment-567543451