首页 > 其他 > 详细

简单图片加文字

时间:2018-05-15 13:08:47      阅读:186      评论:0      收藏:0      [点我收藏+]
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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!