Second episode that deals with loading images. We review how to use loadImage() and then use image() to show a full image in the screen. Then we learn about copy(), which allows us to show only one part of a loaded image, and at the same time stretch or resize that part. copy() takes 9 parameters, our record :) The first parameter is the variable that holds the loaded image. Then there are two series of 4 parameters which are similar to the ones used when drawing a rectangle: x, y, width and height. The first 4 parameters refer to the loaded image: which part of that image do you want to display? The second 4 parameters refer to the display: in which area do you want to show the image area selected by the first 4 parameters?
All parameteres can be animated. Just replace a fixed value by a variable, and change that variable over time.