最新回答 / Wizey
header("content-type:", $info['mime']);?$func($img,'newimage.'.$type);你這兩句不知道是打錯了,還是寫錯了,你的打開是亂碼,有沒有報錯信息,還有看看你保存php文件的編碼是不是utf-8無bom格式的
2016-11-06
最新回答 / wumu_zhuangzhu
imagecopymerge($image, $water, 20, 30, 0, 0, $info2[2], $info2[1], 30);這里的寬高是$info2[0] $info2[1]?
2016-11-06
還有關于png背景黑色的問題,可以創建一個畫布,把logo跟背景圖片都放里面例如
imagecopy($canvas, $bg, 0, 0, 0, 0, 寬, 高);
imagecopy($canvas, $logo, 0,0, 0, 0, 寬, 高);
然后在把畫布放在原背景圖片之上
imagecopymerge($bg, $canvas, 20, 30, 0, 0, 寬 ,高, 透明度);
imagecopy($canvas, $bg, 0, 0, 0, 0, 寬, 高);
imagecopy($canvas, $logo, 0,0, 0, 0, 寬, 高);
然后在把畫布放在原背景圖片之上
imagecopymerge($bg, $canvas, 20, 30, 0, 0, 寬 ,高, 透明度);
2016-11-04
Call to undefined function image() ...
public function show(){
header("Content-type:".$this->info['mime']);
$funs = "image{$this->info['type']}";
$funs($this->image);
}
public function show(){
header("Content-type:".$this->info['mime']);
$funs = "image{$this->info['type']}";
$funs($this->image);
}
2016-11-01
已采納回答 / yvsh
<?phpclass Image {??? /*圖片的基本信息*/??? private $info;??? /*構造函數,打開圖片,讀取到內存中*/??? public function __construct($src){??????? $info = getimagesize($src);??????? $this->info = array(??????????? 'width' => $info[0],??????????? 'height' => $info[1],??...
2016-10-27