0
我只想在图像上显示另一个图像。PHP GD图书馆 - 显示图像
我写的信息,我想显示他的头像。
它被写入HTML元素。我如何告诉服务器这是一个图像?
<?php
header('Content-Type: image/png');
$jpg_image = imagecreatefrompng('sign/sign.png');
$white = imagecolorallocate($jpg_image, 255, 255, 255);
$font_path = 'sign/font.ttf';
$posts = "424";
$followers = "2424";
$following = "41241241";
$image = "<img src='https://scontent.cdninstagram.com/t51.2885-19/s320x320/14719833_310540259320655_1605122788543168512_a.jpg'>";
$image2 = imagejpeg($image);
imagettftext($jpg_image, 50, 0, 170, 240, $white, $font_path, $posts);
imagettftext($jpg_image, 50, 0, 800, 240, $white, $font_path, $followers);
imagejpeg($jpg_image, 0, 1130, 240, $image, $white);
imagettftext($jpg_image, 50, 0, 1630, 240, $white, $font_path, $following);
imagepng($jpg_image);
imagedestroy($jpg_image);
?>