修复linux地址路径截取

pull/1/head
lzCodeGarden 2 years ago
parent 99d9be6429
commit 15847e37d8

@ -19,7 +19,7 @@ public class ImageUtils {
if(newWidth==null){
newWidth=182;
}
String directoryPath = inputImagePath.substring(0, inputImagePath.lastIndexOf("\\") + 1);
String directoryPath = inputImagePath.substring(0, inputImagePath.lastIndexOf("/") + 1);
File inputFile = new File(inputImagePath);
String outputImagePath = directoryPath+ "thumbnail_" + inputFile.getName();
BufferedImage bufferedImage = Thumbnails.of(inputFile).scale(1).asBufferedImage();

Loading…
Cancel
Save