code: private static Rectangle calcRotatedSize(int width, int height, int degree) {
  		if (degree >= 90) {
  			if (degree / 90 % 2 == 1) {
  				int temp = height;
  				height = width;
  				width = temp;
  			}
  			degree = degree % 90;
  		}
  		double r = Math.sqrt(height * height + width * width) / 2;
  		double len = 2 * Math.sin(Math.toRadians(degree) / 2) * r;
  		double angel_alpha = (Math.PI - Math.toRadians(degree)) / 2;
  		double angel_dalta_width = Math.atan((double) height / width);
  		double angel_dalta_height = Math.atan((double) width / height);
  		int len_dalta_width = (int) (len * Math.cos(Math.PI - angel_alpha - angel_dalta_width));
  		int len_dalta_height = (int) (len * Math.cos(Math.PI - angel_alpha - angel_dalta_height));
  		int des_width = width + len_dalta_width * 2;
  		int des_height = height + len_dalta_height * 2;
  
  		return new Rectangle(des_width, des_height);
  	}
docs: 计算旋转后的图片尺寸
  
  @param width 宽度
  @param height 高度
  @param degree 旋转角度
  @return 计算后目标尺寸
  @since 4.1.20