public void saveImage(BufferedImage image,File file){
		try 
		{
			BufferedImage bi = (BufferedImage) image;
			File outputfile =new File(file.getAbsolutePath()+".png") ;// add .png 

			ImageIO.write(bi, "png", outputfile); //write iage in png format
		} catch (IOException e) {
			System.out.println("could not save image");
		}
	}