public class ImageUtil {
public static void main(String[] args) throws IOException{
String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath();
Thumbnails.of(new File("C:\Users\Wu\Desktop\image\xiaohuangren.jpg"))
.size(200, 200).watermark(Positions.BOTTOM_RIGHT,ImageIO.read(new File(basePath+"/watermark")),0.25f).outputQuality(0.8f).toFile("/Users/Wu/Desktop/image/xiaohuangrenNew");
}
}
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程