PImage toto; void setup() { size(400, 400); toto = createImage(20, 20, RGB); noSmooth(); } void draw() { background(255, 0, 0); for(int i = 0; i < toto.width*toto.height; i++) { toto.pixels[i] = color(int(random(255))); } toto.updatePixels(); image(toto, 0, 0, 400, 400); if (frameCount <10) { save(str(frameCount)+".png"); } }