Gd Lib PHP.4.3.2 Gentoo
| From: | Sancar Saran | Date: | Tue, 24 Jun 2003 14:06:32 +0000 |
| Subject: | Gd Lib PHP.4.3.2 Gentoo | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152614@lists.php.net to get a copy of this message | ||
Hi,
Is there any problem on Php 4.3.2 GD lib ?
My code works fine on Php 4.3.1 but not work 4.3.2
here code
<?php
Header ("Content-type: image/jpeg");
$text = "some text";
$s = 20;$fontfile = "/usr/X11R6/lib/X11/fonts/truetype/arial.ttf"; $size = imagettfbbox($s,0,"$fontfile",$text); $dx = abs($size[2]-$size[0]); $dy = $s-1; $xpad=9; $ypad=9; $im = imagecreate($dx+$xpad,$dy+$ypad); $white = ImageColorAllocate($im, 255,255,255); $black = ImageColorAllocate($im, 0,0,0); $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF); ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "$fontfile", $text); Imagejpeg ($im); ImageDestroy ($im); ?> Thanks for help... Sancar "Delifisek" Saran