P5js project as a png?

I made this sketch https://www.openprocessing.org/sketch/1049735 and I want to put it as my iPhone’s wallpaper. If I screenshot it will look very bad on my phone, Is there a way I can download the canvas as a png?

btw there is a lot of random code on there, it’s not important.

you can right click and use "save image as"

(the image I got)
now just crop it to fit and voila

1 Like

oh, thx again. Is there a way I can also save it as a video for the lock screen?

The way I create animations is by constantly saving the screen and compiling it in the “movie maker” tool in processing which returns .mte file (something like this) and then I use openShot video editor to change it to .mp4 file.

Ok thx. I’ll look into it.

Hello @olaf000olaf,

I added this to end of your code:

function keyTyped() {
  if (key === 's') {
    save('heart.png');
  }
}

Reference:
https://p5js.org/reference/#/p5.Image/save

It saved the image to the download folder:

:)

1 Like