public static BufferedImage makeImageSquare(BufferedImage image){
  int max=0;
  max=CommonUtil.max(image.getWidth(),image.getHeight());
  return cropImage(image,max,max);
}

public static BufferedImage makeImageSquare ( BufferedImage image ) { int max = 0 ; max = CommonUtil . max ( image . getWidth ( ) , image . getHeight ( ) ) ; return cropImage ( image , max , max ) ; }
method to pad an image such that it becomes perfect square . the padding uses black color
