Commit 539d5c33 authored by cuijun's avatar cuijun

文件压缩500图片格式

parent 02ffc850
......@@ -158,9 +158,9 @@ public class UploadService {
double scaleFactor = 1.0;
if (originalWidth > originalHeight) {
scaleFactor = (double) 250 / originalWidth;
scaleFactor = (double) 500 / originalWidth;
} else {
scaleFactor = (double) 250 / originalHeight;
scaleFactor = (double) 500 / originalHeight;
}
int newWidth = (int) (originalWidth * scaleFactor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment