소스 검색

小修改

xiaoshushu 4 년 전
부모
커밋
0673589fd1
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ImageCompressUtil.java

+ 6 - 6
ruoyi-common/src/main/java/com/ruoyi/common/utils/ImageCompressUtil.java

@@ -36,17 +36,17 @@ public class ImageCompressUtil {
                 h1 = (int) (h - h * 0.35);
             }
             if (w < 1000 && w > 300) {
-                w1 = (int) (w - w * 0.45);
-                h1 = (int) (h - h * 0.45);
+                w1 = (int) (w - w * 0.55);
+                h1 = (int) (h - h * 0.55);
             }
             if (w < 1600 && w > 1000) {
-                w1 = (int) (w - w * 0.65);
-                h1 = (int) (h - h * 0.65);
-            }
-            if (w < 2500 && w > 1600) {
                 w1 = (int) (w - w * 0.75);
                 h1 = (int) (h - h * 0.75);
             }
+            if (w < 2500 && w > 1600) {
+                w1 = (int) (w - w * 0.85);
+                h1 = (int) (h - h * 0.85);
+            }
             if (w > 2500) {
                 w1 = (int) (w - w * 0.9);
                 h1 = (int) (h - h * 0.9);