PImage img; int[] hueArray; int [] brightArray; int[] satArray; int imageWidth; int imageHeight; void setup() { size(600,600); frameRate(15); colorMode(HSB,255); background(0,0,0); smooth(); noFill(); //amelie.jpg, cac.jpg, food.jpg, night.jpg, lime.jpg, toronto.jpg,vaneyck.jpg img = loadImage("src/food.jpg"); imageWidth = 600; imageHeight = 400; //setUpArrays(); drawHue(); } void draw() { //save image if (keyPressed) { if (key == 'S' || key == 's') { String time = "savedImages/savedimage-"+month()+day()+year()+"_"+hour()+minute()+second()+"_"+millis()+".png"; // save(time); } } background(0); drawHue(); } void drawHue() { hueArray = new int[imageWidth]; for (int i=0;i