推荐
java学习就去人工博客https://www.gzcx.net
常规的写法
graphics.drawImage(originalBufferedImage, rectangle.x,
rectangle.y,
rectangle.width, rectangle.height, null);
优化的写法
graphics.drawImage(
originalBufferedImage.getScaledInstance(rectangle.width,
rectangle.height, Image.SCALE_SMOOTH),
rectangle.x, rectangle.y, null);
更多精彩,敬请关注, 程序员导航网 https://nav.gzcx.net/
![](https://i-blog.csdnimg.cn/blog_migrate/2d146959271e4e7d66b13956c22c9f2c.png)