1
这是可能创建一个GIF图像与各种文字字体,风格,格式和对齐在PHP中的背景图像?如何使用不同的文本格式在php中使用背景图像创建gif图像?
比如我有一个像
背景图像和图像这是我想要插入背景图片是
和输出GIF图像看起来应该像
我试过这个代码
<?php
// Create a new image instance
$im = imagecreatetruecolor(300, 250);
$img = imagecreatefrompng('back.png');
// Make the background white
imagefilledrectangle($im, 0, 0, 300, 250, 0xEFEFEF);
// Draw a text string on the image
imagestring($im, 20,20, 40, 'Heading1', 0x000000);
imagecopymerge($img, $im, 0, 0, 0, 0, 300, 250, 70);
// Output the image to browser
header('Content-Type: image/gif');
imagegif($img,'test.gif');
imagedestroy($im);
?>
但不幸的是,它不会提供所需的输出,我想添加更多的内容到背景图像,如我在输出图像中所示。