Home > Backend Development > PHP Tutorial > A super simple php image watermark code_PHP tutorial

A super simple php image watermark code_PHP tutorial

WBOY
Release: 2016-07-13 10:45:40
Original
909 people have browsed it

A super simple php tutorial picture watermark code
To add a watermark to an image in PHP, you can use imagecreatefromjpeg, imagecreatefrompng, imagecopymerge, imagejpeg. As long as you set the original image and the watermark image, see an example below.
*/

header("content-type: image/jpeg");
$filename='temp/www.bKjia.c0m/zhutiai.com.jpg';
$im=imagecreatefromjpeg($filename);
$s=imagecreatefrompng('mb.bKjia.c0m/pic/water_template.png');
imagecopymerge($im,$s,0,200,0,0,365,27,20);
imagejpeg($im);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633004.htmlTechArticleA super simple php tutorial image watermark code to add watermarks to images in php with imagecreatefromjpeg imagecreatefrompng imagecopymerge imagejpeg , as long as you set the original image and watermark...
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