3

How does one take a screenshot of the current window using the Python Arcade library?

I have built a simulator using the Python Arcade library and would like to take a screenshot of the window programmatically when interesting events occur. Is this possible?

Alderven
  • 7,569
  • 5
  • 26
  • 38

1 Answers1

3
arcade.draw_commands.get_image(x=0, y=0, width=None, height=None)

Get an image from the screen. You can save the image like:

image = get_image()
image.save('screenshot.png', 'PNG')

Source

Paul Vincent Craven
  • 2,027
  • 3
  • 19
  • 24
moritzg
  • 4,266
  • 3
  • 37
  • 62