Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #screenshot #screen #pygame
ADD COMMENT
Topic
Name
4+4 =