code: public Img scale(int width, int height, Color fixedColor) {
  		final BufferedImage srcImage = getValidSrcImg();
  		int srcHeight = srcImage.getHeight(null);
  		int srcWidth = srcImage.getWidth(null);
  		double heightRatio = NumberUtil.div(height, srcHeight);
  		double widthRatio = NumberUtil.div(width, srcWidth);
  		if (heightRatio == widthRatio) {
  			// 长宽都按照相同比例缩放时，返回缩放后的图片
  			return scale(width, height);
  		}
  
  		// 宽缩放比例小就按照宽缩放，否则按照高缩放
  		if (widthRatio < heightRatio) {
  			scale(width, (int) (srcHeight * widthRatio));
  		} else {
  			scale((int) (srcWidth * heightRatio), height);
  		}
  
  		if (null == fixedColor) {// 补白
  			fixedColor = Color.WHITE;
  		}
  		final BufferedImage image = new BufferedImage(width, height, getTypeInt());
  		Graphics2D g = image.createGraphics();
  
  		// 设置背景
  		g.setBackground(fixedColor);
  		g.clearRect(0, 0, width, height);
  
  		final BufferedImage itemp = this.targetImage;
  		final int itempHeight = itemp.getHeight();
  		final int itempWidth = itemp.getWidth();
  		// 在中间贴图
  		g.drawImage(itemp, (width - itempWidth) / 2, (height - itempHeight) / 2, itempWidth, itempHeight, fixedColor, null);
  
  		g.dispose();
  		this.targetImage = image;
  		return this;
  	}
docs: 缩放图像（按高度和宽度缩放）<br>
  缩放后默认为jpeg格式
  
  @param width 缩放后的宽度
  @param height 缩放后的高度
  @param fixedColor 比例不对时补充的颜色，不补充为<code>null</code>
  @return this