課程
/后端開發(fā)
/PHP
/PHP進(jìn)階篇-GD庫圖像處理
這個(gè)整個(gè)教程有沒有源碼的呢
2017-07-10
源自:PHP進(jìn)階篇-GD庫圖像處理 3-5
正在回答
<?php $filename="images/thumb.jpg"; $fileInfo=getimagesize($filename); $mime=$fileInfo['mime']; $createfrom=str_replace('/','createfrom',$mime); $outFun=str_replace('/',null,$mime); $image=$createfrom($filename); $red=imagecolorallocatealpha($image,255,0,0,60); $fontfile='fonts/Doodle?Camp.ttf'; imagettftext($image,30,0,0,30,$red,$fontfile,"水印"); header("content-type:.$mime;charset='utf-8'"); $outFun($image); imagedestroy($image);
<?php $filename="images/thumb.jpg"; $fileInfo=getimagesize($filename); $mime=$fileInfo['mime']; $createfrom=str_replace('/','createfrom',$mime); $outFun=str_replace('/','null',$mime); $image=$createfrom($filename); $red=imagecolorallocatealpha($image,255,0,0,60); $fontfile='fonts/BRITANIC.TTF'; imagettftext($image,30,0,0,30,$red,$fontfile,"水印"); header('content-type:'.$mime); $outFun($image); imagedestroy($image);
貌似沒有哦
舉報(bào)
想通過PHP中GD函數(shù)庫靈活操作圖像嗎,點(diǎn)擊學(xué)習(xí)本教程可以實(shí)現(xiàn)
2 回答不顯示驗(yàn)證碼,只有一個(gè)白色的方塊
3 回答老師你支持中文的這個(gè)font在哪里的,我也是mac沒有找到
1 回答為什么我的這上面有亂碼
1 回答求完整驗(yàn)證碼代碼
1 回答輸出不了圖像, 只有在中間有個(gè)白色的小框
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-05-06
2018-05-06
2017-08-03
貌似沒有哦