优化缩略图查看接口

This commit is contained in:
季圣华
2023-07-07 00:33:42 +08:00
parent 6a50552cbd
commit edb972ffaa
3 changed files with 10 additions and 38 deletions

View File

@@ -293,8 +293,8 @@ public class SystemConfigService {
return linkUrl + filePath + "/" + imgPath;
}
public BufferedImage getImageMini(File file, int w) throws Exception {
BufferedImage img = ImageIO.read(file);
public BufferedImage getImageMini(InputStream inputStream, int w) throws Exception {
BufferedImage img = ImageIO.read(inputStream);
//获取图片的长和宽
int width = img.getWidth();
int height = img.getHeight();