Is there a way I can take a screenshot of the right half of my pygame window?
I\'m making a game using pygame and I need to take a snapshot of the screen but not the
This didn't exactly work on my system with Python 3.7.4. Here is a version which worked:
rect = pygame.Rect(25, 25, 100, 50) sub = screen.subsurface(rect) screenshot = pygame.Surface((100, 50)) screenshot.blit(sub, (0,0)) pygame.image.save(screenshot, "screenshot.jpg")