Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

save screenshot of screen in pygame

rect = pygame.Rect(25, 25, 100, 50)
sub = screen.subsurface(rect)
pygame.image.save(sub, "screenshot.jpg")
#The saved portion of the screen will be the rect portion
Comment

PREVIOUS NEXT
Code Example
Python :: create custom exception python 
Python :: Adding labels to histogram bars in matplotlib 
Python :: insert row in any position pandas dataframe 
Python :: merge all mp4 video files into one file python 
Python :: reading doc in python 
Python :: python script that executes at time 
Python :: infinity python 
Python :: python declare variables from dictionary 
Python :: rotating circular queue in python 
Python :: How to get the first and last values from the dataframe column using a function 
Python :: how to make a loading gif in pyqt5 
Python :: pandas iteration 
Python :: python logging to syslog linux 
Python :: try with multiple except python 
Python :: python get dictionary keys as list 
Python :: creating an entry widget for input in tkinter 
Python :: xpath start-with python 
Python :: get local ip 
Python :: how to reset username and password in django admin 
Python :: django group with permission 
Python :: remove multiple elements from a list in python 
Python :: logging 
Python :: python numpy delete element from array 
Python :: pytohn reset all dictionary values to 0 
Python :: how to make a leaderboard in python 
Python :: pandas dataframe get first n rows 
Python :: PY | websocket - server 
Python :: Filter with List Comprehension 
Python :: python array looping 
Python :: django queryset limit 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =