PHP 4.0 Bug #8711: When I call the the ImageTTFText Function I receive a Segmentation Fault
| From: | gafain at fineware dot it | Date: | Mon, 15 Jan 2001 14:12:27 +0000 |
| Subject: | PHP 4.0 Bug #8711: When I call the the ImageTTFText Function I receive a Segmentation Fault | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44121@lists.php.net to get a copy of this message | ||
From: gafain@fineware.it
Operating system: Linux Mandrake 7.2
PHP version: 4.0.4pl1
PHP Bug Type: Reproduceable crash
Bug description: When I call the the ImageTTFText Function I receive a Segmentation Fault
Header("Content-type: image/gif");
$dims=ImageTTFBBox($size,0,$fontname,$text);
$w=$dims[4]+$dims[6];
$h=-($dims[5]+$dims[3]);
$im = imagecreate($w,$h);
$bg = splitColor($background);
$fg = splitColor($color);
$back= ImageColorAllocate($im, $bg[0],$bg[1],$bg[2]);
$fore= ImageColorAllocate($im, $fg[0],$fg[1],$fg[2]);
ImageFilledRectangle($im,0,0,$w,$h,$back);
ImageTTFText($im, $size, 0, -1 ,$h-2 , $fore, $fontname, $text);
ImageGif($im);
ImageDestroy($im);
--
Edit Bug report at: http://bugs.php.net/?id=8711&edit=1