GD problem

From: Date: Fri, 04 Jul 2003 15:20:00 +0000
Subject: GD problem
Groups: php.general 
Request: Send a blank email to php-general+get-154000@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there... I'm having huge problem with PHP 4.3.2 on FreeBSD 5.1 platform with GD functions. check out the following code: $str = "some text"; $img = imagecreatefrompng("images/template.png"); $color = imagecolorallocate($img, $red, $blue, $green); imagestring($img, 5, 0, 0, $str, $color); header("Content-Type: image/png"); imagepng($img); imagedestroy($img); This code works okay. $str = "some text"; $font_file = "/some/dir/times.ttf"; # TT font from microsoft windows $img = imagecreatefrompng("images/template.png"); $color = imagecolorallocate($img, $red, $blue, $green); imagettftext($img, 20, -40, 40, 40, $color, $font_file, $str); header("Content-Type: image/png"); imagepng($img); imagedestroy($img); This code sometimes prints picture in a browser, but many times crash entire apache child process (sig 11). If using bundled GD library, crashes are not so often, but string on image is not correct. Can anyone help me? Brane -----BEGIN PGP SIGNATURE----- iD8DBQE/BZshfiC/E+t8hPcRAlGHAJ0X1bsVoVNKXXKTXej6UWSZIhPeTQCbBHYw XANp8xHJEnxfW2TTEgNEPjs= =fymB -----END PGP SIGNATURE-----

« previous php.general (#154000) next »