There is an error in the following code.
At first all three loops are executed, but in the second run of the outer loop the middle loop in line 6 isnt executed.
The error message is:
Exception in thread "Animation Thread" java.lang.NullPointerException
at processing.Main.getColor(Main.java:87)
at processing.Main.setup(Main.java:46)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
private int[] getColor(PImage[] pics) {
long[] color = new long[pics.length];
int[] c = {0};
for(int i = 0; i < pics.length; i++) { //Schleife geht einzelne Bilder durch
println("i = " + i);
for(int x = 0; x < pics[i].width; x++) { //2 Schleifen für die beiden Bildachsen