/* Bug? * - Copy to an image loaded with loadImage * - from an image loaded with requestImage * - does nothing? */ PImage bild; PImage next; String[] namen = new String[2]; namen[0] = "A" namen[1] = "B"; int c = 0; boolean bildShown = false; void setup() { frameRate(1); size(320, 240); println("Copy 2 does not fail, when /bild/ is placed on stage whith /image/ every time"); bild = requestImage("AB.png?Cpy2"); image(bild, 0, 0); } void draw() { String name = namen[c%2]; if (bild == null || next == null) { print("#"); } else if (bild.width == 0 || next.width == 0) { print("W"); } else if (bild.width == -1 || next.width == -1) { print("F"); } else if (bildShown == false && bild.width > 0) { image(bild, 0, 0); bildShown = true; print("S"); } else if (bildShown == true && next.width > 0) { bild.copy(next, 0, 0, next.width, next.height, 0, 0, width, height); image(bild, 0, 0); print("L"); } else { print("X"); } if (c % 5 == 4) { next = requestImage(name + ".png?Cpy2=" + c); print(" " + name); } c++; }