# Help with code pastebin link is https://pastebin.com/fr4Gs5YH

**URL:** <https://discourse.processing.org/t/help-with-code-pastebin-link-is-https-pastebin-com-fr4gs5yh/8798>\
**Category:** Coding Questions\
**Created:** [February 28, 2019, 12:31pm UTC](https://discourse.processing.org/t/help-with-code-pastebin-link-is-https-pastebin-com-fr4gs5yh/8798 "2019-02-28T12:31:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DumboWumbo](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DumboWumbo](https://discourse.processing.org/u/DumboWumbo)\
**Post date:** [February 28, 2019, 12:31pm UTC](https://discourse.processing.org/t/help-with-code-pastebin-link-is-https-pastebin-com-fr4gs5yh/8798/1 "2019-02-28T12:31:16Z")

</div>

Hello i recently madea some code in order to “distort” the image but the original image continues to be put on top of tge scrambled image and i do not know what is wrong.(paste bin link [https://pastebin.com/fr4Gs5YH](https://pastebin.com/fr4Gs5YH)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 3, 2019, 12:23am UTC](https://discourse.processing.org/t/help-with-code-pastebin-link-is-https-pastebin-com-fr4gs5yh/8798/2 "2019-03-03T00:23:44Z")

</div>

Well, the image is always drawn (at the end of your draw loop). If you want it to disappear, maybe use an “if” around the image? Check if a button has been pushed, for example.

Also, this code has some odd things in it. For example, you call `redraw()` inside of draw for no reason. You can get rid of that – it won’t do anything. You also call img.loadPixels and loadPixels in different cases – you then call img.updatePixels, but not updatePixels. I feel like it might make sense to just go through slowly and carefully and check what the code says.

Did you write most of this code, or just alter it?
