Image Text
| From: | b2 | Date: | Tue, 21 Sep 2004 12:08:49 +0000 |
| Subject: | Image Text | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197460@lists.php.net to get a copy of this message | ||
Hi
I'm trying to create images with a bit of text pasted on top
using the code bolow
My problem is that the text color either are lost (lighter colors) or print
in a different color
it seems that it's mix the text color and the background color
Is there away around this
<?
$im1="backgroundimage.jpg";
Header("Content-type: image/jpeg");
$src=@ImageCreateFromJPEG("$im1");
$red = ImageColorAllocate($src,255,0,0);
$blue = ImageColorAllocate($src,0,0,255);
$text1='Line 1';
$text2='Line 2';
imagettftext($src, 5, 0, 0, 4, $blue, "arial.ttf", $text1);
imagettftext($src, 5, 0, 0, 26, $red, "arial.ttf", $text2);
imagejpeg ($src);
?>
also
where can I find different fonts that I can use in
imageloadfont ()
thanks