I've made a really basic drawing program in Python with Pygame. The program has a square window, in which you draw. How could I save the area inside the window as an image?
Asked
Active
Viewed 53 times
0
-
https://www.pygame.org/docs/ref/image.html#pygame.image.save – chickity china chinese chicken Sep 30 '17 at 06:37
1 Answers
0
As downshift commented, use pygame.image.save
win = pygame.display.set_mode(...)
# your stuff
pygame.image.save(win, "screenshot.jpg")

TRiNE
- 5,020
- 1
- 29
- 42