Copy code The code is as follows:
/*
* Created on 2010-10-27
* BY QQ542900563
* Copyrights Reserved 2000-2020
* This example demonstrates how to generate image watermarks
*/
//Load two images respectively
$im=imagecreatefromjpeg( "liu.jpg");
$img2=imagecreatefrompng("m.png");
//Get the length and width of each and calculate the position
$im_WH=getimagesize("liu.jpg ");
$im_W=$im_WH[0];
$im_H=$im_WH[1];
$img2_WH=getimagesize("m.png");
$img2_W =$img2_WH[0];
$img2_H=$img2_WH[1];
//Define the storage location
$NewX=$im_W-$img2_W;
$NewY=$ im_H-$img2_H;
//Filling
imagecopy($im,$img2,$NewX,$NewY,0,0,$img2_W,$img2_H);
header( "Content-type:image/jpeg");
imagejpeg($im);
?>
http://www.bkjia.com/PHPjc/325917.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325917.htmlTechArticleCopy the code as follows: ?php /* * Created on 2010-10-27 * BY QQ542900563 * Copyrights Reserved 2000 -2020 * This example demonstrates how to generate image watermarks*/ //Load two images respectively...