Skip to content

Commit

Permalink
Implemented save_frame
Browse files Browse the repository at this point in the history
save_frame was unexpectedly removed after merging #164.
  • Loading branch information
arihantparsoya committed May 15, 2020
1 parent 63dac5b commit acafa3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions p5/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,3 +614,9 @@ def load_pixels():
image(builtins.pixels, (0, 0))

builtins.pixels = None

def save_frame(filename=None):
if filename:
p5.sketch.screenshot(filename)
else:
p5.sketch.screenshot("Screen.png")

0 comments on commit acafa3c

Please sign in to comment.