PHP图片加水印
在一张图片上加一个图片水印。
方法
//imagecopy($dst, $src, 10, 10, 0, 0, $src_w, $src_h); 输出图片 //
list($dst_w, $dst_h, $dst_type) = getimagesize($dst_path); switch ($dst_type) {
case 1://GIF
header('Content-Type: image/gif');
imagegif($dst);
break;
case 2://JPG
header('Content-Type: image/jpeg');
imagejpeg($dst);
break;
case 3://PNG
header('Content-Type: image/png');
imagepng($dst);
break;
default:
break;
}
imagedestroy($dst); imagedestroy($src); ?>