修复图片操作未调用flush导致资源未释放问题

This commit is contained in:
Looly
2024-03-28 22:26:22 +08:00
parent 436b9199ef
commit 0358c3bde1
3 changed files with 51 additions and 43 deletions

View File

@@ -86,6 +86,7 @@ public class QrImage extends BufferedImage {
imgWidth = logoImg.getWidth(null) * imgHeight / logoImg.getHeight(null);
}
// 原图片上直接绘制水印
Img.from(this).pressImage(//
Img.from(logoImg).round(config.imgRound).getImg(), // 圆角
new Rectangle(imgWidth, imgHeight), // 位置