Converting text to image in java awt - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Converting text to image in java awt

elizaselizas Posts: 15Member
This tip describes how text can be converted to image using Java awt..

Step1: Create a String which we will convert to image
Step2: Create a BufferedImage
Step3: Create get the height and width of the String
Step4: call the createGraphics(), which draws the BufferedImage object to Graphics2D object
Step6: set the font color, backgroung color etc as required

Sign In or Register to comment.