Receiving error but cannot debug: ArrayIndexOutOfBoundsException

This you could do in setup ()

Here you make a new image img1 maybe you can copy it into imgNew and then load img1

Then you have 2 different images

Then you show one or the other depending on your boolean

1 Like