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
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?