Is it possible to convert string text that is inside an EditText
box into a Bitmap? In other words, is there any way to convert string text into a Bitmap that means the text will display as an image?
Below is my Code:
class TextToImage extends Activity {
protected void onCreate(Bundle savedInstanceState) {
//create String object to be converted to image
String sampleText = "SAMPLE TEXT";
String fileName = "Image";
//create a File Object
File newFile = new File("./" + fileName + ".jpeg");
//create the font you wish to use
Font font = new Font("Tahoma", Font.PLAIN, 11);
//create the FontRenderContext object which helps us to measure the text
FontRenderContext frc = new FontRenderContext(null, true, true);
}
}