php使用imagecopy()拼接图片

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

php使用imagecopy()拼接图片
<?php
header("Content-type: image/jpeg");
 
$src_image[0] = imagecreatefromgif("./1.jpg");
$src_image[1] = imagecreatefromgif("./2.jpg");
 
$dest = imagecreatetruecolor(100, 50);
 
//php图片拼接
imagecopy($dest, $src_image[0], 0, 0, 0, 0, 50, 50);
imagecopy($dest, $src_image[1], 50, 0, 0, 0, 50, 50);
 
imagejpeg($dest);
 
?>