How do I make the background transparent

I’m very new so maybe this is super obvious
So I’m trying to set the background to transparent so I can export my images and use them as sprites in unity. When I’m using SaveFrame() it saves the frames as .PNG and I know that supports having pixels set as transparent.
I know I could use an external program like photoshop but that would take an insane amount of time with the number of frames I’m dealing with
any help appreciated

Tint() may or may not be helpful: https://processing.org/reference/tint_.html . Used for displaying images, may not work for creating transparent images.

if I a am not mistaken, the display window always has some background color.
you should try the PGaphics buffer.

you can draw into it as well as save it to an image file…

1 Like

Hello @Worm,

Take a look at these references for insight:

Save the PGraphics with:

:)