PHP签名图像生成器



基本上我所要做的就是在签名的背景上包含一个图像,尽管每次我尝试做一些事情时,我都会得到一个错误说:

资源ID 4

如果你对我有任何帮助,我将非常感激。

<?php 
header("Content-type: image/png"); 
$image = imagecreatefrompng("../imgs/bisig1.png");
$other = imagecreatefrompng("../imgs/avatar.png");
//imagecolorallocate($image, R, G, B) in HEX values
$font_black = imagecolorallocate($image, 2, 1, 8);
$font_blue = imagecolorallocate($image, 25, 0, 255);
$List = "name.txt";
$string = "Account Name";
$string2 = "<img src='$other'>";
//($image, fontsize, rightindent, downindent, data, txtcolour)
imagestring($image, 3, 12, 3, "T17", $font_blue);
imagestring($image, 1, 86, 6, "SOTW", $font_black);
imagestring($image, 1, 110, 6, $string, $font_black);  
imagestring($image, 4, 110, 50, $other, $font_blue); 
imagepng($image); 
imagedestroy($image); 
imagepng($other); 
imagedestroy($other); 
?>

GD不是HTML ($string2 = "<img src='$other'>";),它不会工作顺便说一句,你可能不会得到任何"资源ID 4"错误,因为你的mime类型是png。

最新更新