I'm a beginner to Processing and am creating a simple program that allows the user to overlay simple filters (such as black & white, invert etc.) onto an image.
I have created the code and have made it work for one image, but either:
A. The code allows the user to select any of the filters randomly, and the image only shows that filter but the code only works with that specific image.
or
B. The filters 'pile up' on top of each other so that they cannot be 'reset' but have the code work with any image.
(I apologise if that doesn't make sense, this is all very new to me!).
I have posted the code below, currently set up for B.
How do I allow the user to (like in A) select any filter and view the results but also allow for multiple images to be used?
Thanks,
Niall
NB: The image can be replaced with any example you may have, it shouldn't effect the GUI elements etc.
----
PImage img;
int dimension;
void setup(){
img = loadImage("Prince of Cats.jpg");
dimension = img.width*img.height;