带有imagecopyresampled函数的PHP水印

时间:2015-10-28 22:35:32

标签: php watermark

是否可以使用imagecopyresampled函数而不是imagecopy函数对图像产生水印效果?

我的研究没有基于好的例子,所以如果有人能回答我的问题,我会非常感激。

list($width, $height) = getimagesize($path);
$src = imagecreatefromjpeg($path);
$temp = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($temp, $src, 0,0,0,0, $newwidth, $newheight, $width, $height);
imagejpeg($temp, $path,100);
imagedestroy($temp);

0 个答案:

没有答案
相关问题