The code below works as expected but the text does not come out BLACK but a semi transparent grey. If I repeat the line
ImageTTFText($im, 54, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "fonts/TIMES.TTF", $text);
several times then everything is fine.
What have I got wrong
Thanks
Brian
<?
Header("Content-type: image/png");
$bombo = imagecreatefrompng ("grafics/bombolog.png");
$dx = 162; //abs($size[2]-$size[0]);
$dy = 84; //abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$white = ImageColorAllocate($im, 255,255,255);
$black = ImageColorAllocate($im, 0,0,0);
$blue = ImageColorAllocate($im,0x2c,0x6D,0xAF );
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
Imagefilledrectangle ($im, 20, 10, 40, 80, $black);
ImageTTFText($im, 54, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "fonts/TIMES.TTF", $text);
ImageCopy ($im, $bombo, 0, 0, 0, 0, 18, 28);
//ImageCopy ($im, $bombo, 18, 28, 0, 0, 18, 28);
ImagePNG($im);
//ImageDestroy($im);
?>