public static BufferedImage getImage(InputStream input) {
    	BufferedImage image;
		try {
			image = ImageIO.read(input);
			
			input.close();
			
	    	return image;
		} catch (IOException e) {
			System.out.println("Error getting the image");
			System.exit(1);
			e.printStackTrace();
		}
    	return null;
    }