# Copy() bug, pixel bleeding lower half of the screen

**URL:** <https://discourse.processing.org/t/copy-bug-pixel-bleeding-lower-half-of-the-screen/35917>\
**Category:** Processing\
**Created:** [March 24, 2022, 10:58am UTC](https://discourse.processing.org/t/copy-bug-pixel-bleeding-lower-half-of-the-screen/35917 "2022-03-24T10:58:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [March 24, 2022, 10:57pm UTC](https://discourse.processing.org/t/copy-bug-pixel-bleeding-lower-half-of-the-screen/35917/2 "2022-03-24T22:57:17Z")

</div>

Hello @rroarrg,

Here is a related topic:

> [@A surprising glitch(?) in Processing Java](https://discourse.processing.org/t/a-surprising-glitch-in-processing-java/21204):
>
> Good morning all, So I had a simple idea. Make a ball rotate the center of canvas draw a rect over canvas with lots of opacity, so that image fades a bit every time copy a slightly smaller part of canvas and stretch it to fill whole canvas. It creates an effect that you are closing in. Here’s the p5.js program [p5.js Web Editor](https://editor.p5js.org/hartzaq/sketches/lEhw3akdY) I have used this copy screen & stretch method before and noticed it does something funny along x and y axis passing through origo or center of the screen. I thought i…

Try different renderers:

```auto
int a = 10;

void setup()
  {
  size(600, 600); //Default
  //size(600, 600, JAVA2D); //Default and same as size(600, 600);
  //size(600, 600, P2D);
  //size(600, 600, P3D);
  //size(600, 600, FX2D);
  
  //noSmooth(); // Try this
  
  // Curious:
  println(sketchRenderer());
  print(JAVA2D);
  }

void draw() 
  {
  copy(a, a, width-a*2, height-a*2, 0, 0, width, height); 
  circle(width/2, height/2, 100);
  //copy(a, a, width-2*a, height-2*a, 0, 0, width, height); 
  }

```

> [@rroarrg](#):
>
> I’m trying to find a logic behind but it feels like it’s just a bug.

I don’t have an answer to why this happens with JAVA2D.

References:  
[https://processing.org/reference/size\_.html](https://processing.org/reference/size_.html)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/copy-bug-pixel-bleeding-lower-half-of-the-screen/35917)._
