Copy a location from the copied source picture to the target picture, not resizing
Imagecopy (target picture canvas, copy source canvas, upper left corner of target canvas x, y, upper left corner of source canvas x, y, copy picture width, height);
Allow resizing
imagecopyresampled (target picture canvas, copy source canvas, upper left corner of target canvas x, y, upper left corner of source canvas x, y, width of target canvas, height, width of copy source picture, height);
You can set the transparency
Imagecopy (target picture canvas, copy source canvas, upper left corner of target canvas x, y, upper left corner of source canvas x, y, copy picture width, height, transparency 0-100);
<?php//Large picture cloth $im1=imagecreatefromjpeg ('./001.jpg ');//Small Picture cloth $im2=imagecreatefromjpeg ('./01.jpg ');//Copy the small image onto the larger image// Cannot resize Imagecopy ($im 1, $im 2,1000,0,0,0,329,220),//Can be resized imagecopyresampled ($im 1, $im 2,1000,220,0,0,329* 2,440,329,220);//adjust transparent figure imagecopymerge ($im 1, $im 2,500,0,0,0,329,220,40);//Output header (' content-type:image/jpeg; '); Imagejpeg ($im 1);//Destroy Canvas Imagedestroy ($im 1); Imagedestroy ($im 2);? >
GD Library copy image to do watermark