lundi 30 mars 2015

Pyscreenshot returns black screen

Trying to take a screenshot with pyscreengrab, following their documentation. However, it only returns black boxes for me. I've seen a couple other people comment with the same issue but haven't seen any resolution. Happens when using show() or grab_to_file(), as well as with fullscreen or bounding box.


Code:



import pyscreenshot as ImageGrab

#testing save functionality
ImageGrab.grab_to_file('testImage.png')

#testing show functionality
im = ImageGrab.grab()
im.show()


OSX 10.10.2


Python 2.7.6


The only alternative I know of is using the os.system(screencapture) method. If that is a better route to go I can do that, but I would like to know why pyscreenshot isn't working. I also don't know if there are performance advantages/disadvantages to using pyscreenshot vs os.system repeatedly.


Aucun commentaire:

Enregistrer un commentaire