php技术实现加载字体并保存成图片
<div class="jb51code">下面通过一段代码给大家详解介绍下php技术实现加载字体并保存成图片。 // Set the content-type // Create the image // Create some colors // The text to draw // Add some shadow to the text // Add the text // Using imagepng() results in clearer text compared with imagejpeg() 如果想保存图可以用下面代码 $fp2=@fopen('tst.jpg',"a");
fwrite($fp2,$img); fclose($fp2); 以上代码就可以完成加载字体并保存成图片,希望大家会喜欢 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |