php uses imagecopy() to splice pictures
- header("Content-type: image/jpeg");
-
- $src_image[0] = imagecreatefromgif("./1.jpg");
- $ src_image[1] = imagecreatefromgif("./2.jpg");
-
- $dest = imagecreatetruecolor(100, 50);
-
- //php image splicing
- imagecopy($dest, $src_image[0], 0, 0 , 0, 0, 50, 50);
- imagecopy($dest, $src_image[1], 50, 0, 0, 0, 50, 50);
-
- imagejpeg($dest);
-
- ?>
Copy code
|