code: public BufferedImage squareScaling(String imageFilename) throws IOException {
  		// read the image
  		BufferedImage image;
  		try { // first try reading with the default class
  			image = ImageIO.read(new File(imageFilename));
  		} catch (IllegalArgumentException e) { // if it fails retry with the corrected class
  			// This exception is probably because of a grayscale jpeg image.
  			System.out.println("Exception: " + e.getMessage() + " | Image: " + imageFilename);
  			image = ImageIOGreyScale.read(new File(imageFilename));
  		}
  		return squareScaling(image);
  	}
docs: Same as {@link #squareScaling(BufferedImage)} but takes the imageFileName instead of a
  {@code BufferedImage}.
  
  @param imageFilename
  @return
  @throws IOException