src/main/java/me/codeboy/common/base/io/CBImage.java
public BufferedImage scale(double scaleW, double scaleH) {
        width = (int) (width * scaleW);
        height = (int) (height * scaleH);

        BufferedImage newImage = new BufferedImage(width, height,
                image.getType());
        Graphics g = newImage.getGraphics();
        g.drawImage(image, 0, 0, width, height, null);
        g.dispose();
        image = newImage;
        return image;
    }
public BufferedImage scale(double scaleW, double scaleH) {
        width = (int) (width * scaleW);
        height = (int) (height * scaleH);

        BufferedImage newImage = new BufferedImage(width, height,
                image.getType());
        Graphics g = newImage.getGraphics();
        g.drawImage(image, 0, 0, width, height, null);
        g.dispose();
        image = newImage;
        return image;
    }
缩放图片

@param scaleW 水平缩放比例
@param scaleH 垂直缩放比例
@return bufferedImage