/*
 * HwMain is a template program for use with the image processing homework assignments.
 * 
 */

import java.awt.*;

public class HwMain {

	/**
	 * Entry point for the program
	 * @param args
	 */
	public static void main(String[] args) {

		try
		{						
			// Read a file and create a SimpleImage out of it
			SimpleImage img = new SimpleImage("cody.jpg");
			Color[][] pixels = img.getPixelArray();

			Color pixel;
			int r,g,b;
			
			
			// iterate through all the pixels
			// PUT YOUR CODE HERE
			
			// Let's create a brand new output image
			SimpleImage output = new SimpleImage(img.width(), img.height());
			
			// and set the pixels to be the values from our pixel array
			output.setPixels(pixels);
			output.save("testoutput.jpg"); 
			
			
		}
		catch(Exception e){
			e.printStackTrace();
		}
	}	
	
	
	
	
}
