|
@@ -139,8 +139,9 @@ public class CosTask {
|
|
|
|
|
|
// 压缩图片
|
|
|
// 压缩图片
|
|
|
- if (pWidth > 750) {
|
|
|
- float scale = 750f / pWidth;
|
|
|
+ // 压缩图片
|
|
|
+ if (pWidth > 500) {
|
|
|
+ float scale = 500f / pWidth;
|
|
|
if ("image/png".equals(contentType)) {
|
|
|
Thumbnails.of(outFilePath).scale(scale).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
@@ -150,7 +151,7 @@ public class CosTask {
|
|
|
}
|
|
|
}else {
|
|
|
if ("image/png".equals(contentType)) {
|
|
|
- Thumbnails.of(outFilePath).scale(1f).outputQuality(0.8)
|
|
|
+ Thumbnails.of(outFilePath).scale(0.7).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
|
.toFile(outFilePath);
|
|
|
} else {
|