Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python saving a screentshot with PIL

#python 3
from PIL import ImageGrab 
snapshot = ImageGrab.grab()
save_path = "C:UsersYourUserDesktopMySnapshot.jpg" #dont forget to write the name and the extension of the file in the end
snapshot.save(save_path)
Comment

python windows take screenshot pil

import PIL.ImageGrab

im = PIL.ImageGrab.grab()
im.show()
Comment

PREVIOUS NEXT
Code Example
Python :: view point cloud open3d 
Python :: identify prime numbers python 
Python :: how to change the window colour in pygame 
Python :: python namedtuple 
Python :: export sklearn.metrics.classification_report as csv 
Python :: how to average in python with loop 
Python :: How to find majority element in a sequence of values using Boyer-Moore vote algorithm? 
Python :: how to stop running code in python 
Python :: save image url to png python 
Python :: reset index 
Python :: mode code python 
Python :: static dir in django python 
Python :: mirror 2d numpy array 
Python :: python display map 
Python :: remove duplicate row in df 
Python :: one line input in python 
Python :: ball bounce in pygame 
Python :: get all files within multiple directories python 
Python :: python little endian to big endian 
Python :: python count lines in string 
Python :: how to run commands in repl.ot 
Python :: rangoli in python 
Python :: display entire row pandas 
Python :: sklearn accuracy 
Python :: extend stack python 
Python :: pandas filter rows by value in list 
Python :: python blowfish 
Python :: how to read a pkl file in python 
Python :: download kaggle dataset in colab 
Python :: plot horizontal line in python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =