Skip to content

Commit

Permalink
♻️ refactor/#198 : QR 로고 제거
Browse files Browse the repository at this point in the history
Signed-off-by: EunJiJung <[email protected]>
  • Loading branch information
bianbbc87 committed Dec 6, 2024
1 parent 056c06c commit 8e505c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/com/daon/onjung/core/utility/QrUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public byte[] generateQrCodeImageByte(String id) {
bgGraphics.dispose();

// 로고 이미지 로드
BufferedImage logoImage = ImageIO.read(new URL(logo_img_url));
// BufferedImage logoImage = ImageIO.read(new URL(logo_img_url));

// 배경 이미지 위에 QR 코드 합성
BufferedImage combinedImage = new BufferedImage(qrSize, qrSize, BufferedImage.TYPE_INT_ARGB);
Expand All @@ -94,11 +94,11 @@ public byte[] generateQrCodeImageByte(String id) {
g.drawImage(qrCodeImage, qrX, qrY, null);

// QR 코드 중앙에 로고 삽입
int logoWidth = qrCodeImage.getWidth() / 4; // QR 코드 크기의 1/4 크기로 로고 설정
int logoHeight = qrCodeImage.getHeight() / 4;
int logoX = qrX + (qrCodeImage.getWidth() - logoWidth) / 2; // QR 코드 중앙에 배치
int logoY = qrY + (qrCodeImage.getHeight() - logoHeight) / 2;
g.drawImage(logoImage, logoX, logoY, logoWidth, logoHeight, null);
// int logoWidth = qrCodeImage.getWidth() / 4; // QR 코드 크기의 1/4 크기로 로고 설정
// int logoHeight = qrCodeImage.getHeight() / 4;
// int logoX = qrX + (qrCodeImage.getWidth() - logoWidth) / 2; // QR 코드 중앙에 배치
// int logoY = qrY + (qrCodeImage.getHeight() - logoHeight) / 2;
// g.drawImage(logoImage, logoX, logoY, logoWidth, logoHeight, null);

// 리소스 해제
g.dispose();
Expand Down

0 comments on commit 8e505c8

Please sign in to comment.