-----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-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php