Location: PHPKode > scripts > text2image > text2image/example.php
<?
// Requirements:
//  GD (2+) library for image manipulation
//  for function CreateImageTrueColor - use GD 2.0+
//
// working sample
// http://80.235.107.98:89/Complete_Scripts/PHP/text2image/

	require_once("class.txt2img.php");

	$data = array('text' => 'Viva! Text on Image',  // text
				  'image' => 'bw.jpg',              // input image
                  'type' => 'png',                  // output image type - default jpeg
                  'fontsize' => 5,                  // fontsize - default 3
                  'color' => 'FFFFFF',              // text color - default #000000
                  'margin' => 5,                    // text margin in px  - default 2
                  'x' => 'center',                    // left, center, right - default center
                  'y' => 'center');                    // top, center, bottom - default center

	$picObj = new txt2img( $data );
 
    $picObj->render();

?>
Return current item: text2image