Outputting Text : imagettftext « Graphics Image « PHP






Outputting Text

 
<?php
    $image = imagecreate(400,300);
    $blue = imagecolorallocate($image, 0, 0, 255);
    $white = ImageColorAllocate($image, 255,255,255);

    $_GET['size'] = 44;
    $_GET['text'] = "Hello, world!";

    imagettftext($image, $_GET['size'], 15, 50, 200, $white,
            "ARIAL", $_GET['text']);
    header("content-type: image/png");
    imagepng($image);
    imagedestroy($image);
?>
  
  








Related examples in the same category

1.Using the imagettftext() Function
2.Writing a String with imageTTFtext()
3.Draw with form data