pygame take screenshot of window code example
Example 1: how to take a screenshot of the pygame window and paste it
pygame.image.save(screen,"screenshot.jpg")
Example 2: how to take a screenshot of the pygame window and paste it
rect = pygame.Rect(25, 25, 100, 50)
sub = screen.subsurface(rect)
pygame.image.save(sub, "screenshot.jpg")