Saving images


Saving images is super easy, and works right out of the box even if you don't change a thing in the example.

The lines we're eyeballing right now are as follows:

save(name + ext) # Use this to save your file with a random name     
noLoop() # Prevents pixels from being sorted, copied or pasted more than once

As you can see, the 'save' function is rendering whatever's in the image buffer (aka what you can see on your screen) to disk. This means that if you set your image size to 1000 x 1000 pixels, that's what you'll get on output.

The current configuration saves as a random number for rapid prototyping. 

You can change this to something like save("MyPicture.jpg"), but be warned that it's going to rewrite the file MyPicture.jpg each time you run the sketch, hence the random-number scheme I've got set up for starters :)

Get Image Destroyer

Buy Now$9.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.