課程
/后端開發
/PHP
/PHP進階篇-GD庫圖像處理
這個整個教程有沒有源碼的呢
2017-07-10
源自:PHP進階篇-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);
貌似沒有哦
舉報
想通過PHP中GD函數庫靈活操作圖像嗎,點擊學習本教程可以實現
2 回答不顯示驗證碼,只有一個白色的方塊
3 回答老師你支持中文的這個font在哪里的,我也是mac沒有找到
1 回答為什么我的這上面有亂碼
1 回答求完整驗證碼代碼
1 回答輸出不了圖像, 只有在中間有個白色的小框
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-05-06
2018-05-06
2017-08-03
貌似沒有哦