1.安装配置
前提已经开启gd
<?php
header("Content-type:image/jpeg");
$im = imagecreatefromjpeg('./linux.jpg');
$textColor = imagecolorallocate($im, 255, 55, 55);
$fnt = 'C:\Windows\Fonts\simfang.ttf';
$motto = iconv('utf-8', 'utf-8', '长白山天池');
imagettftext($im, 80, 0, 100, 340, $textColor, $fnt, $motto);
imagejpeg($im);
imagedestroy($im);
?>