|
@@ -143,7 +143,7 @@ public class CosTask {
|
|
|
if (pWidth > 500) {
|
|
|
float scale = 500f / pWidth;
|
|
|
if ("image/png".equals(contentType)) {
|
|
|
- Thumbnails.of(outFilePath).scale(scale).outputQuality(0.8)
|
|
|
+ Thumbnails.of(outFilePath).scale(scale > 0.5 ? 0.5 : scale).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
|
.toFile(outFilePath);
|
|
|
} else {
|
|
@@ -151,7 +151,7 @@ public class CosTask {
|
|
|
}
|
|
|
}else {
|
|
|
if ("image/png".equals(contentType)) {
|
|
|
- Thumbnails.of(outFilePath).scale(0.7).outputQuality(0.8)
|
|
|
+ Thumbnails.of(outFilePath).scale(0.5).outputQuality(0.8)
|
|
|
.imageType(BufferedImage.TYPE_INT_ARGB).outputFormat("png")
|
|
|
.toFile(outFilePath);
|
|
|
} else {
|