いくつかの画像にテキストを書き込むためにphpでIMAGETTFTEXT関数を使用しています.今、画像にHTMLタグ、たとえばIMGタグを書きたいと思っています。私はそれを行う方法を知りません!私は助けてください. ここに私のコードがあります:
$font_file = 'times.ttf';
$font_size=15;
$image_file= 'new.jpg';
$image = imagecreatefromjpeg($image_file);
$font_color = imagecolorallocate($image, 0, 0, 0);
imagettftext($image, $font_size, 0, 55, 30, $font_color, $font_file, "fhfghfghfghfg ");
imagettftext($image, $font_size, 0, 600, 30, $font_color, $font_file, "aaaaaaa ");
Header("Content-type: image/jpg");
imagejpeg($image);
imagedestroy($image);