using ImageTTFText in a page
| From: | Ross | Date: | Mon, 23 Apr 2007 17:50:28 +0000 |
| Subject: | using ImageTTFText in a page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-253536@lists.php.net to get a copy of this message | ||
This script work on it's own but fails when emeded in another php file. All
I want to do is create a function and call it passing a text parameter. Also
is it possbile to output the image to a file insert the url into a <img>
tag?
<?php
header("Content-type: image/png");
$im = imagecreate (800, 30);
$black = ImageColorAllocate ($im, 255, 255, 255);
$blue = ImageColorAllocate ($im, 75, 104, 177);
ImageTTFText ($im, 20, 0, 10, 20, $blue, "Font - TrueType - Square 721
BT.ttf",
"BLUEFLY");
ImageGif ($im);
ImageDestroy ($im);
?>