Making my way through the Working with images recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how to:
- use the loadImage function to load an image from my data folder into my Sketch
- declare a boolean (pixelMode) for the if test
- use the image function to display the new images (dimensions specified in copWidth and copyHeight and areas specified by the pixel-swapping if test) in the window.
I also learned about the get and set methods and how they can be used to define a region and change the colour of the loaded image. Rad!