php如何让生成的文字居中 50
如图;如何让生成的文字自动居中代码应该怎么修改?代码如下<?phpheader("content-type:image/jpeg");$name=$_GET['name'...
如图;如何让生成的文字自动居中代码应该怎么修改?代码如下<?phpheader("content-type:image/jpeg");$name = $_GET['name']?$_GET['name']:"装逼神器";$nameb = $_GET['nameb'];$namec = $_GET['namec'];$named = $_GET['named'];$im = imagecreatetruecolor(900, 675);$bg = imagecreatefromjpeg('toutu.jpg');imagecopy($im,$bg,0,0,0,0,900,675);imagedestroy($bg);$black = imagecolorallocate($im, 60, 60, 60);$text = $name;$font = '../font/ysggt.ttf';$blacka = imagecolorallocate($im, 250, 247, 92);$blackb = imagecolorallocate($im, 255, 255, 230);$blackc = imagecolorallocate($im, 229, 255, 72);imagettftext($im, 30, 0, 230, 245, $blacka, $font, $name);imagettftext($im, 40, 0, 285, 326, $blackb, $font, $nameb);imagettftext($im, 20, 0, 285, 394, $blackb, $font, $namec);imagettftext($im, 20, 0, 295, 450, $blackc, $font, $named);imagejpeg($im);imagedestroy($im);?>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询