From 3d5a891ae6d3de7bac290b70b8f9992a636504aa Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Wed, 21 Aug 2019 15:23:24 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-19464=20=E3=80=90=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E3=80=91TAB=E4=B8=8B=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=BC=8F=E5=9B=BE=E6=A0=87=E4=BC=98=E5=8C=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/web/CustomIconPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 35ff2afba..bc21d4c73 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -452,10 +452,10 @@ public class CustomIconPane extends BasicPane { String path = jf.getSelectedFile().getAbsolutePath(); // 图片存储有最大值48*48限制,没有超过最大值时,按原图大小存储,超过最大值后,压缩至最大值存储 Image image = BaseUtils.readImage(path); - BufferedImage bufferedImage = CoreGraphHelper.createBufferedImage(image.getWidth(null) >= 48 ? IconManager.DEFAULT_ICONWIDTH + 32 : image.getWidth(null), - image.getHeight(null) >= 48 ? IconManager.DEFAULT_ICONHEIGHT + 32 : image.getHeight(null), BufferedImage.TYPE_INT_ARGB); + BufferedImage bufferedImage = CoreGraphHelper.createBufferedImage(image.getWidth(null) >= 48 ? IconManager.MAXSTORAGE_ICONWIDTH : image.getWidth(null), + image.getHeight(null) >= 48 ? IconManager.MAXSTORAGE_ICONHEIGHT : image.getHeight(null), BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = bufferedImage.createGraphics(); - g2d.drawImage(image, 0, 0, image.getWidth(null) >= 48 ? IconManager.DEFAULT_ICONWIDTH + 32 : image.getWidth(null), image.getHeight(null) >= 48 ? IconManager.DEFAULT_ICONHEIGHT + 32 : image.getHeight(null), null); + g2d.drawImage(image, 0, 0, image.getWidth(null) >= 48 ? IconManager.MAXSTORAGE_ICONWIDTH : image.getWidth(null), image.getHeight(null) >= 48 ? IconManager.MAXSTORAGE_ICONHEIGHT : image.getHeight(null), null); bufferedImage.flush(); g2d.dispose(); iconImage = bufferedImage;