修改bug

This commit is contained in:
周鹏 committed 2026-09-13 14:42:47 +08:00
1 parent 329c96f733
commit 727ae14b7f
1 file changed
+3 -5
@@ -160,10 +160,8 @@ public class PosterPicGen {
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
}
private void drawUserAvatar(BufferedImage avatar) {
if (avatar == null) {
return;
}
private void drawUserAvatar(BufferedImage avatar) throws IOException{
BufferedImage logoAvater = ImageIO.read(ResourceUtil.getResource("image/logo.png"));
graphics.setColor(Color.WHITE);
graphics.fill(new RoundRectangle2D.Double(
AVATAR_X - AVATAR_CLEAR_MARGIN,
@@ -172,7 +170,7 @@ public class PosterPicGen {
AVATAR_SIZE + AVATAR_CLEAR_MARGIN * 2.0,
(AVATAR_CORNER_RADIUS + AVATAR_CLEAR_MARGIN) * 2.0,
(AVATAR_CORNER_RADIUS + AVATAR_CLEAR_MARGIN) * 2.0));
drawAvatar(avatar, AVATAR_X, AVATAR_Y, AVATAR_SIZE,
drawAvatar(logoAvater, AVATAR_X, AVATAR_Y, AVATAR_SIZE,
new RoundRectangle2D.Double(0, 0, AVATAR_SIZE, AVATAR_SIZE,
AVATAR_CORNER_RADIUS * 2.0, AVATAR_CORNER_RADIUS * 2.0));
}