0

ImageGrab not working,

I believe I have installed the PIL for Image Library. I am trying to get a screenshot and save the .png image into the same folder as the script. Heres the Error Code I keep getting when I run it: Traceback (most recent call last): File "C:\Users\steph\Desktop\Screen\quickGrab.py", line 11, in <module> screenGrab() File "C:\Users\steph\Desktop\Screen\quickGrab.py", line 6, in screenGrab im = ImageGrab.Grab() AttributeError: module 'PIL.ImageGrab' has no attribute 'Grab' Here's the code I'm using: from PIL import ImageGrab import os import time def screenGrab(): im = ImageGrab.Grab() im.save(os.getcwd() + "\\full_snap_" + str( int(time.time())) + ".png", "PNG") if __name__ == '__main__' : screenGrab()

8th Jun 2019, 1:16 AM
cody stephens
cody stephens - avatar
1 Odpowiedź
0
Use Matlab for img Processing.
10th Jun 2019, 6:34 AM
Mehran