Answer the question
In order to leave comments, you need to log in
How to specify the coordinates for creating screenshots in Python and the PIL library?
I have a code
from PIL import ImageGrab
screen = ImageGrab.grab()
screen.save('screenshot.png','PNG')
Answer the question
In order to leave comments, you need to log in
import pyscreenshot as ImageGrab
# fullscreen
im=ImageGrab.grab()
im.show()
# part of the screen
im=ImageGrab.grab(bbox=(10,10,500,500))
im.show()
# to file
ImageGrab.grab_to_file('im.png')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question