简单图片加文字

File file =new File("E:\IDEA\scripttest\src\main\resources\timg.jpg");
BufferedImage image = ImageIO.read(file);
Graphics graphics =image.getGraphics();
graphics.setFont(new Font("",Font.BOLD,250));
graphics.setColor(Color.red);
graphics.drawString("hello world!",300,300);
File file2 =new File("copy.jpg");
ImageIO.write(image,"JPEG",file2);
原文地址:https://www.cnblogs.com/shanshen/p/9040416.html