<?php
header("content-type:image/jpg");
$src ="image/t3.jpg";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type}";
$image = $fun($src);
$imagemark = "image/t1.jpg";
$info2 = getimagesize($imagemark);
$type2 = image_type_to_extension($info2[2],false);
$fun2 = "imagecreatefrom{$type2}";
$water = $fun2($imagemark);
imagecopymerge($image,$water,20,30,0,0,$info2[2],$info2[1],30);
header("Content-type:".$info['mine']);
$func="image{$type}";
$func($image);
imagedestroy($water);
?>
imagecopymerge($image, $water, 20, 30, 0, 0, $info2[2], $info2[1], 30);
这里的宽高是$info2[0] $info2[1]
网页显示是这个样子的
改了还是不行
header("Content-type:".$info['mime']); mime 不是 mine;