View Single Post
  #3 (permalink)  
Old 07-11-2007, 08:09 PM
elcapi elcapi is offline
Member
 
Join Date: Jul 2007
Location: Mexico City
Posts: 2
elcapi is on a distinguished road
Hi,

thanks a lot for the tip.

Now I can insert text with the Graphics2D object and save it with the ImageIO class

Code:
Graphics2D g2 = img.createGraphics(); g2.setColor(Color.black); g2.setFont(font); g2.drawString(text, 80,1440); File outputfile = new File(f"imagewithtext.png"); ImageIO.write(img, "png", outputfile);
Reply With Quote