查看文件: logo_word.php
大小: 1001 字节
类型: application/octet-stream
<? $word=isset($_GET['title'])?$_GET['title']:'SKYBNI'; Header("Content-type: image/PNG"); $im = imagecreatetruecolor(125, 24); ;//imagecreate(125,24); imagesavealpha($im, true); $scolor = imagecolorallocatealpha($im, 0, 0, 0, 127); imagefill($im, 0, 0, $scolor); $black = ImageColorAllocate($im, 0,0,0); $white = ImageColorAllocate($im, 255,255,255); $wcolor = ImageColorAllocate($im, 28,22,225); //$gray = ImageColorAllocate($im, 200,200,200); //imagefill($im,68,30,$gray); //$word="飛行家"; //$width=125; $fontsize=18; $myfont="/www2/skybni/fonts/kaiu.ttf"; $fontBox = imagettfbbox($fontsize,5, $myfont,$word); //ceil((700 - $fontBox[2])/ 2) imagettftext($im,$fontsize,0,ceil((125-$fontBox[2])/ 2),18, $wcolor,$myfont,$word); //imagettftext($im,$fontsize,0,5,18, $wcolor,$myfont,$word); //imagepng( $im, "/path/where/you/want/save/the/png.png" ); imagepng($im); imagedestroy($im); //ImageTTFText($im,$fontsize,0,5,18, $wcolor,$myfont,$word); ?>
保存
取消
返回文件列表