# PImage Draw transparent .jpg keeps overwriting the newest mouseY, don't know how to fix

**URL:** <https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092>\
**Category:** Beginners\
**Created:** [October 26, 2021, 2:02pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092 "2021-10-26T14:02:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lott](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lott/32/14837_2.png) [@Lott](https://discourse.processing.org/u/Lott)\
**Post date:** [October 26, 2021, 2:02pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092/1 "2021-10-26T14:02:34Z")

</div>

Hi!!

Just started using Processing and I’m having a hard time with my transparent jpg… I have a code for interactive mouseY but because the background is transparant you can see the previous mouse movement (what I don’t want visible). It must be an easy fix but I don’t know how. Pls help me

```auto
PImage a;
PImage b;

void setup(){
  size (100, 100);
  background (255);
  a = loadImage ("boven-01.png");
  b = loadImage ("onder-01.png");
    
}

void draw(){
  image (a,0,0,100,mouseY);
  image (b,0,mouseX,100,height-mouseY);
}

```

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 26, 2021, 2:40pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092/2 "2021-10-26T14:40:38Z")

</div>

> [@Lott](#):
>
> ` background (255);`

repeat this at start of draw() ?

---

<div class="post-metadata">

**Author:** ![Lott](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lott/32/14837_2.png) [@Lott](https://discourse.processing.org/u/Lott)\
**Post date:** [October 26, 2021, 3:49pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092/3 "2021-10-26T15:49:21Z")

</div>

Thank you so much! works perfectly 🙂

---

<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:** [October 26, 2021, 9:49pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092/4 "2021-10-26T21:49:28Z")

</div>

Hello @Lott,

> [@Lott](#):
>
> Thank you so much! works perfectly

Lots of resources here:

> **[Welcome to Processing!](https://processing.org/)**
>
> Processing is a flexible software sketchbook and a language for learning how to code. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology…

Some discussion here about how background is used:  
[https://processing.org/tutorials/overview](https://processing.org/tutorials/overview)

Reference:  
[https://processing.org/reference/background\_.html](https://processing.org/reference/background_.html)

`:)`
