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

PHP uses imagecopy() to splice pictures

WBOY
Release: 2016-07-25 08:44:30
Original
1450 people have browsed it
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


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template