And to correct one mistake in the code that was kindly pointed out but is
here just a typo:
> $bg=imagecolorallocate($img, 255, 255, 255);
> $font_color=imageallocatecolor($img, 0, 0, 0);
Should be:
$bg=imagecolorallocate($img, 255, 255, 255);
$font_color=imagecolorallocate($img, 0, 0, 0);
Full
Hello,
I want to display TTF text in a png image. I use the following type of
code:
$font="luxisr";
$font_size=16;
$img=imagecreate($width, $height);
$bg=imagecolorallocate($img, 255, 255, 255);
$font_color=imageallocatecolor($img, 0, 0, 0);
imagettftext($img, $font_size, 0, $x, $y, $font_color,
2 matches
Mail list logo