当前位置 : 主页 > 网络编程 > PHP >

php在图片上写指定字体的文字

来源:互联网 收集:自由互联 发布时间:2021-06-30
?phpheader('Content-type: image/gif');$image = imagecreate( 400, 200 );$red = imagecolorallocate($image, 255,0,0);$blue = imagecolorallocate($image, 0,0,255 );$font = 'ARIALBD.TTF';imageTTFtext( $image, 50, 0, 20, 100, $blue, $font, 'outofm
<?php
header('Content-type: image/gif');

$image = imagecreate( 400, 200 );
$red = imagecolorallocate($image, 255,0,0);
$blue = imagecolorallocate($image, 0,0,255 );
$font = 'ARIALBD.TTF';
imageTTFtext( $image, 50, 0, 20, 100, $blue, $font, 'outofmemory.cn' );
imagegif($image);
?>
网友评论