Text over image, showing only Black
Posted: Fri Aug 15, 2008 9:00 pm
I'm trying to write some WHITE text over an image I created, I'm not sure what I'm doing wrong, I've got the text and where I want it, but it alwats shows in Black color.
I've tried
and it is always showing BLACK, so if somene can tell me my mistake I would really appreciate it.
This should show the text Kriptokool in colors, but it is always Black regardless of what I use in ImageColorAllocate
Thanks
I've tried
Code: Select all
$black = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 255, 0, 255);
$black = ImageColorAllocate($im, 0, 0, 0);
Code: Select all
<?php
header("Content-Type: image/jpeg");
$im = ImageCreateFromGif("trophybanner.gif");
$black = ImageColorAllocate($im, 255, 255, 255);
$start_x = 110;
$start_y = 35;
Imagettftext($im, 15, 0, $start_x, $start_y, $white, 'verdana.ttf', "Kriptokool");
Imagejpeg($im, '', 100);
ImageDestroy($im);
?>
Thanks