$iinfo=getimagesize($destination,$iinfo);
$nimage=imagecreatetruecolor($image_size[0],$image_size);
$white=imagecolorallocate($nimage,255,255,255);
$black=imagecolorallocate($nimage,0,0,0);
$red=imagecolorallocate($nimage,255,0,0);
imagefill($nimage,0,0,$white);
switch ($iinfo)
{
case 1:
$simage =imagecreatefromgif($destination);
break;
case 2:
$simage =imagecreatefromjpeg($destination);
break;
case 3:
$simage =imagecreatefrompng($destination);
break;
case 6:
$simage =imagecreatefromwbmp($destination);
break;
default:
die("不支持的文件类型");
exit;
}
imagecopy($nimage,$simage,0,0,0,0,$image_size[0],$image_size);
imagefilledrectangle($nimage,1,$image_size-15,80,$image_size,$white);
switch($watertype)
{
case 1: //加水印字符串
imagestring($nimage,2,3,$image_size-15,$waterstring,$black);
break;
&nbs