3 if (isset($_REQUEST["ecrire"]))
4 $ecrire = $_REQUEST["ecrire"];
7 $ecrire=str_rot13($ecrire);
11 $font = "/Applications/MAMP/htdocs/forumheracles/Vera.ttf" ;
13 $size = ImageTTFBBox( $fontsize, $angle, $font, $ecrire ) ;
15 $widthExtra = $size[2] * 0.025 ;
16 $width = round( $size[2] +
$widthExtra ) ;
17 $widthExtra = round( $widthExtra ) ;
19 $heightExtra = ( abs( $size[5] ) +
$size[3] ) * 0.15 ;
20 $height = abs( $size[5] ) +
$size[3] +
$heightExtra ;
21 $heightExtra = round( $heightExtra ) ;
23 $text_x = round( $widthExtra / 2 ) ;
24 $text_y = abs( $size[5] ) +
round( $heightExtra / 2 ) ;
26 $im = imagecreate( $width+
2, $height+
2) ;
27 $bkgc = ImageColorAllocate( $im, 255, 255, 255 ) ;
28 $txtc = ImageColorAllocate( $im, 0, 0, 0 ) ;
29 ImageTTFText( $im, $fontsize, $angle, $text_x, $text_y, $txtc, $font, $ecrire ) ;
31 Header( "Content-type: image/gif" ) ;