3 include('config/conf.php');
5 if (isset($_REQUEST["ecrire"]))
6 $ecrire = $_REQUEST["ecrire"];
9 $ecrire=str_rot13($ecrire);
15 $size = ImageTTFBBox( $fontsize, $angle, $font, $ecrire ) ;
17 $widthExtra = $size[2] * 0.025 ;
18 $width = round( $size[2] +
$widthExtra ) ;
19 $widthExtra = round( $widthExtra ) ;
21 $heightExtra = ( abs( $size[5] ) +
$size[3] ) * 0.15 ;
22 $height = abs( $size[5] ) +
$size[3] +
$heightExtra ;
23 $heightExtra = round( $heightExtra ) ;
25 $text_x = round( $widthExtra / 2 ) ;
26 $text_y = abs( $size[5] ) +
round( $heightExtra / 2 ) ;
28 $im = imagecreate( $width+
2, $height+
2) ;
29 $bkgc = ImageColorAllocate( $im, 255, 255, 255 ) ;
30 $txtc = ImageColorAllocate( $im, 0, 0, 0 ) ;
31 ImageTTFText( $im, $fontsize, $angle, $text_x, $text_y, $txtc, $font, $ecrire ) ;
33 Header( "Content-type: image/gif" ) ;