-1

我有这个代码:

<?php  

$filename   =  'Tulips.jpg';
$stringSize = 10000;
$footerSize = 40;  
$footer     = 'Blyxo.com/post/1234535';  

list ( $width, $height, $image_type ) = getimagesize ( $filename );  
$im = imagecreatefromjpeg ( $filename );

imagefilledrectangle (  
        $im,  
        0,  
        $height,  
        $width,  
        $height - $footerSize, imagecolorallocate($im, 128, 128, 128));  

imagestring (
        $im,  
        $stringSize,  
        $width  - ( imagefontwidth ( $stringSize ) * strlen ( $footer ) ) - 2,  
        $height - $footerSize,  
        $footer,  
        imagecolorallocate ( $im, 255, 255, 255 ) );  

header ( 'Content-Type: image/jpeg' );  
imagejpeg ( $im ); 

?>

所以; 图像如下所示:

图片

但是,我想将字体设置得更大,但它不起作用;我正在尝试设置$stringSize = 1000, $stringSize = 10, $stringSize= 9,但 (...) 什么都没有。

而且,如果可能的话,我想知道如何在照片的开头设置页脚;不像绝对位置;一开始。

4

1 回答 1

0

在此处输入图像描述

你已经使用了这个功能......水印在文本中设置任何角度,浅色或亮色,大小..

参考:http: //in.php.net/manual/en/function.imagefttext.php

imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text )
于 2012-06-05T04:59:50.453 回答