Home >Backend Development >PHP Tutorial >PHP uses imagecopy() to splice pictures

PHP uses imagecopy() to splice pictures

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 08:44:301493browse
php uses imagecopy() to splice pictures
  1. header("Content-type: image/jpeg");
  2. $src_image[0] = imagecreatefromgif("./1.jpg");
  3. $ src_image[1] = imagecreatefromgif("./2.jpg");
  4. $dest = imagecreatetruecolor(100, 50);
  5. //php image splicing
  6. imagecopy($dest, $src_image[0], 0, 0 , 0, 0, 50, 50);
  7. imagecopy($dest, $src_image[1], 50, 0, 0, 0, 50, 50);
  8. imagejpeg($dest);
  9. ?>
Copy code

php, imagecopy


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn