Selaa lähdekoodia

图片压缩大小修改

zengjiebin 7 vuotta sitten
vanhempi
commit
91bb3fc4e1

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/upfile/UpFileUtils.java

@@ -66,8 +66,8 @@ public class UpFileUtils {
             File file;
             if ((file = new File(photos.get(index))).exists()) {
                 File newFile = new CompressHelper.Builder(SheepApp.getInstance())
-                        .setMaxWidth(2000)  // 默认最大宽度为720
-                        .setMaxHeight(2000) // 默认最大高度为960
+                        .setMaxWidth(1080)  // 默认最大宽度为720
+                        .setMaxHeight(1080) // 默认最大高度为960
                         .setQuality(80)    // 默认压缩质量为80
                         .setCompressFormat(Bitmap.CompressFormat.PNG) // 设置默认压缩为png格式
                         .build().compressToFile(file);