Commit 7449f7b4 authored by 周健威's avatar 周健威

修改代码

parent be7d65f1
......@@ -88,10 +88,10 @@ public class UploadService {
//缩略
BufferedImage bufferedImage = ImgUtil.read(file.getInputStream());
Float scale = 800f / bufferedImage.getHeight();
Float scale = 320f / bufferedImage.getHeight();
Image newImage = ImgUtil.scale(bufferedImage, scale);
//加水印
Image newImage2 = ImgUtil.pressText(newImage, "人民星云", Color.WHITE, null, 0, 0, 0.2f);
Image newImage2 = ImgUtil.pressText(newImage, "人民星云", Color.WHITE, null, 0, 0, 1.0f);
//将文件写入指定位置
ImgUtil.write(newImage2, new File(filePath));
......
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