# How do I make the background transparent

**URL:** https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187
**Category:** Beginners
**Created:** [June 11, 2023, 3:55pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187 "2023-06-11T15:55:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Worm](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Worm](https://discourse.processing.org/u/Worm)
#### Post date: [June 11, 2023, 3:55pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187/1 "2023-06-11T15:55:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [June 11, 2023, 4:07pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187/2 "2023-06-11T16:07:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Hyperion65](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hyperion65/32/10569_2.png) [@Hyperion65](https://discourse.processing.org/u/Hyperion65)
#### Post date: [June 11, 2023, 4:13pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187/3 "2023-06-11T16:13:12Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 11, 2023, 7:30pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187/4 "2023-06-11T19:30:18Z")

</div>

Hello @Worm,

Take a look at these references for insight:

- [Render Techniques / Processing.org](https://processing.org/tutorials/rendering) \< See the Combine Surfaces section
- [PGraphics / Reference / Processing.org](https://processing.org/reference/PGraphics.html)
- [background() / Reference / Processing.org](https://processing.org/reference/background_.html)
- [clear() / Reference / Processing.org](https://processing.org/reference/clear_.html)

Save the PGraphics with:

- [save() / Reference / Processing.org](https://processing.org/reference/PImage_save_.html)

`:)`
