int IMGHEIGHT; int IMGWIDTH; int diff; int steps; PImage[] images = new PImage[2]; float[] weight=new float [2]; void setup() { IMGHEIGHT=600; IMGWIDTH=600; frameRate(100); images[0] = loadImage("1mosaic1.jpg"); images[1] = loadImage("1.jpg"); steps=50; weight[0]=0; weight[1]=steps; diff=1; size(IMGWIDTH,IMGHEIGHT); //noLoop(); } void draw() { weight[0]=weight[0]+diff; if (weight[0]>steps){ diff=diff*-1; } if (weight[0]<0){ diff=diff*-1; } weight[1]=steps-weight[0]; int cols; int rows; int sub; int i; float r; float g; float b; float sumR; float sumG; float sumB; float totalWeight; loadPixels(); for (rows=0;rows