|
@@ -262,10 +262,10 @@ public class FileUploadController extends BaseApiController {
|
|
|
builder.toFile(outFilePath);
|
|
|
|
|
|
// 压缩图片
|
|
|
- if (pWidth > 750) {
|
|
|
- float scale = 750f / pWidth;
|
|
|
+ if (pWidth > 500) {
|
|
|
+ float scale = 500f / pWidth;
|
|
|
if ("image/png".equals(file.getContentType())) {
|
|
|
- Thumbnails.of(outFilePath).scale(scale).outputQuality(0.5)
|
|
|
+ Thumbnails.of(outFilePath).scale(scale).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
|
.toFile(outFilePath);
|
|
|
} else {
|
|
@@ -273,7 +273,7 @@ public class FileUploadController extends BaseApiController {
|
|
|
}
|
|
|
}else {
|
|
|
if ("image/png".equals(file.getContentType())) {
|
|
|
- Thumbnails.of(outFilePath).scale(1f).outputQuality(0.5)
|
|
|
+ Thumbnails.of(outFilePath).scale(0.7).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
|
.toFile(outFilePath);
|
|
|
} else {
|