<?php
 
/**
 
 * If it show "Fatal error: Call to undefined function: imagecreate()" then 
 
 * you have to install GD. To know detail about GD 
 
 * see that documentation : http://jp.php.net/imagecreate
 
 * 
 
 */
 
 
 
ini_set("display_errors",1);
 
 
require_once('TextToImage.class.php');
 
 
$_im = new TextToImage();
 
 
$str = "New life in programming.\nNext Line of Image.\nLine Number 3\n" .
 
        "This is line numbet 4\nLine number 5\nYou can write as you want.";
 
 
 
//kip the CENTURY.TTF file in same folder. Default justification is Center.
 
$_im->imagettfJustifytext($str,"CENTURY.TTF");            //
 
 
//$_im->imagettfJustifytext($str,"CENTURY.TTF", 0);        //Justify text to left.
 
//$_im->imagettfJustifytext($str,"CENTURY.TTF", 1);        //Justify text to right.
 
//$_im->imagettfJustifytext($str,"CENTURY.TTF", 2);        //Justify text to center.
 
 
 
//$_im->showAsJpg();            //Show picture as jpg.
 
//$_im->showAsPng();             //Show picture as png.
 
//$_im->saveAsPng("Image1");    //Save picture as png.
 
 
 
$_im->showAsGif();                 //Show picture as gif.
 
 
 
 
?>
 
 
 |