master
周文涛 2 years ago
parent 8c18316bb4
commit 7b7f6fc97a

@ -34,6 +34,7 @@ public class ImageUtils {
.scale(scale) //图片大小(长宽)压缩比例 从0-11表示原图 .scale(scale) //图片大小(长宽)压缩比例 从0-11表示原图
.outputQuality(quality) //图片质量压缩比例 从0-1越接近1质量越好 .outputQuality(quality) //图片质量压缩比例 从0-1越接近1质量越好
.toOutputStream(new FileOutputStream(outputImagePath)); .toOutputStream(new FileOutputStream(outputImagePath));
System.out.println("已压缩");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }

Loading…
Cancel
Save