# Problem with transparent png

**URL:** https://discourse.processing.org/t/problem-with-transparent-png/21930
**Category:** Beginners
**Created:** [June 16, 2020, 9:23pm UTC](https://discourse.processing.org/t/problem-with-transparent-png/21930 "2020-06-16T21:23:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MartinGo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/martingo/32/9546_2.png) [@MartinGo](https://discourse.processing.org/u/MartinGo)
#### Post date: [June 16, 2020, 9:23pm UTC](https://discourse.processing.org/t/problem-with-transparent-png/21930/1 "2020-06-16T21:23:29Z")

</div>

Hi, I’m trying to draw something with “image” wich in other programs (like Photoshop or others) looks with soft borders but when I draw it inside Processing it looks with jagged edges. What is wrong?

![example](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/01e929fd0b0a26eb642231d116eb0ab4e8565b20.png)

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [June 16, 2020, 9:41pm UTC](https://discourse.processing.org/t/problem-with-transparent-png/21930/2 "2020-06-16T21:41:46Z")

</div>

I believe it id because you are not clearing the sketch in each draw loop.

Do something like this:

```auto
void draw(){
  background(150,150,150); //gray
  ... {now draw your figures}
}

```

If this does not solve your issue, please share your code.

Kf

---

<div class="post-metadata">

### Author: ![debxyz](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@debxyz](https://discourse.processing.org/u/debxyz)
#### Post date: [June 16, 2020, 10:08pm UTC](https://discourse.processing.org/t/problem-with-transparent-png/21930/3 "2020-06-16T22:08:18Z")

</div>

Not sure if this is the issue, because no code to refer to, but **did you try the smooth() function?**  
🤓

---

<div class="post-metadata">

### Author: ![MartinGo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/martingo/32/9546_2.png) [@MartinGo](https://discourse.processing.org/u/MartinGo)
#### Post date: [June 16, 2020, 11:02pm UTC](https://discourse.processing.org/t/problem-with-transparent-png/21930/4 "2020-06-16T23:02:22Z")

</div>

kfrajer: Thank you very much!!! That was the problem. I drew the background and everything worked perfectly!

debxyz: My problem was I wasn’t drawing the background I tried smooth 2,4,8 and nothing happened, thanks for the answer anyway 🙂
