This is the basic example of ImageTTFTEXT
Code: Select all
<?php
header("Content-type: image/jpeg");
$im = imagecreate(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, 150, 25, 25);
// Replace path by your own font path
imagettftext($im, 20, 0, 10, 20, $red, "/path/arial.ttf",
"Testing... Omega: Ω");
imagejpeg($im);
imagedestroy($im);
?>Code: Select all
<?php
header("Content-type: image/jpeg");
$im = imagecreate(400, 30);
$color = "150, 25, 25";
$white = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, $color);
// Replace path by your own font path
imagettftext($im, 20, 0, 10, 20, $red, "/path/arial.ttf",
"Testing... Omega: Ω");
imagejpeg($im);
imagedestroy($im);
?>Any way to do this?
Thanks.