Home  >  Article  >  Backend Development  >  PHP code to add watermark to pictures

PHP code to add watermark to pictures

WBOY
WBOYOriginal
2016-07-25 08:45:19715browse
PHP code to add watermark to pictures
  1. $source=imagecreatefromjpeg('E:/image/guide_pic.jpg');
  2. $thumb=imagecreatefromjpeg('E:/image/l.JPG') ;
  3. //Get the width, height, type of the image
  4. list($width,$height,$mine)=getimagesize('E:/image/guide_pic.jpg');
  5. imagecopymerge ($source,$thumb,$width -124,$height-150,0,0,88,73,70);
  6. //Generate image
  7. imagejpeg($source,'E:/image/logo.jpg');
  8. ?>
Copy Code

php


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