php图片水印代码
在php中给图片增加水印有imagecreatefromjpeg imagecreatefrompng imagecopymerge imagejpeg就成了,只要你设置原图与水印图片就成了,下面看实例.
- header("content-type: image/jpeg");
- $filename='temp/www.phpfensi.com/phpfensi.com.jpg';
- $im=imagecreatefromjpeg($filename);
- $s=imagecreatefrompng('mb.phpfensi.com/pic/water_template.png');
- imagecopymerge($im,$s,0,200,0,0,365,27,20);
- imagejpeg($im);