code: public static void saveImage(Image image, File file){
  		// get file ending
  		int dotIndex = file.getName().lastIndexOf('.');
  		if(dotIndex >= 0){
  			String ending = file.getName().substring(dotIndex+1, file.getName().length());
  			saveImage(image, file, ending);
  		} else {
  			throw new ImageSaverException("could not detect file format from file name. Missing dot. " + file.getName());
  		}
  	}
docs: Saves Image using {@link #saveImage(Image, File, String)}. The file
  format is extracted from the files name.
  @param image to be saved
  @param file to save image to
  @throws ImageSaverException if an IOException occured during
  the process, the filename does not contain a dot to get the filetype
  or no appropriate writer could be found for specified format.
  @since 1.0