0
votes

I am trying to take a screenshot with 'ImageGrab' from 'PIL' but when I want to save the pic I get an error message:

IOError: [Errno 13] Permission denied: 'C:\pic123a.jpg'

The code:

screen_img = ImageGrab.grab()
screen_img.save('C:\\screen.jpg')

Does anyone know how to fix this? Thanks!

1

1 Answers

0
votes

For security reasons, Windows will require elevated privileges in order to write to some locations.
I do not suggest to change this. Instead, get the file written to another folder (and set the permissions to that folder accordingly)