php使用imagecopy()拼接图片
时间:2021-07-01 10:21:17
帮助过:5人阅读
php使用imagecopy()拼接图片 - 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);
-
- ?>
|
php, imagecopy