如何輸入漢字,和修改背景顏色,網上查了幾個不能用啊,
imagettftext();&
$bgcolor = imagecolorallocate($image, r,g,b);
imagefill($image, 0, 0, $bgcolor);
&imgfilledrectangle()。都不行啊~
imagettftext();&
$bgcolor = imagecolorallocate($image, r,g,b);
imagefill($image, 0, 0, $bgcolor);
&imgfilledrectangle()。都不行啊~
2016-03-24
舉報
2016-03-25
imagefill — 區(qū)域填充
imagestring($image,$fontsize,$x,$y,$string,$string_color);//設置輸入漢字的函數。
imagefill($image,0,0,$red);//從圖片Image(0,0)的位置以red顏色填充,看你的代碼上一行r,g,b應該寫成$r,$g,$b(或許你表示其他意思),實在不行可以試試用水印來修改背景顏色,用imagecopy這個函數設置水印,或者漢字都行。