Commit 400c6a76 authored by 周健威's avatar 周健威

修改代码

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