you can set the transparency of images by using tint() before calling image(). could be somthing like that:
PImage imgs; int nbr_of_images, img_no; float transitionFrames = 50; // number of frames for transition int displayFrames = 250; // number of frames each image shall be displayed float fadeValue = 0;
The variable img_no is the index of the current background image. The next image to appear is the next one in order the array, or the first one if we're at the end, which is the (img_no + 1) %nbr_of_image image in the array. I suggest you define a nextImageIndex variable which will track what the index in the arrayt of the next image to fade in is. When that image becomes the background one, set no_img to that index, and randomly pick a new nextImageIndex between 0 and nbr_of_images.
We'll teach you how, but we won't just do it for you. Try it yourself.