#28885 [Fbk->NoF]: imagettftext fails
| From: | php-bugs at lists dot php dot net | Date: | Fri, 02 Jul 2004 23:00:05 +0000 |
| Subject: | #28885 [Fbk->NoF]: imagettftext fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61634@lists.php.net to get a copy of this message | ||
ID: 28885
Updated by: php-bugs@lists.php.net
Reported By: aderyn at gentoo dot se
-Status: Feedback
+Status: No Feedback
Bug Type: GD related
Operating System: Linux 2.6.7 (Gentoo)
PHP Version: 5.0.0RC3
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-06-24 14:28:32] pajoye@php.net
Please provide a short script to reproduce your problem (create an
image, draw a text, save the image).
Which Freetype version do you use?
--Pierre
------------------------------------------------------------------------
[2004-06-23 22:17:50] moriyoshi@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
- What's the content of FONT ?
- What's the content of $text?
- What's the exact size of the produced image?
------------------------------------------------------------------------
[2004-06-23 03:22:41] aderyn at gentoo dot se
Description:
------------
This code (See below) leaves the image empty, without returning any
kind of error. I've verified that it really remains empty several
times. The intresting thing is that if I replace imagecreatetruecolor
with imagecreate it works.
Configure-line:
'./configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-xsl'
'--with-gd' '--with-pspell' '--with-ttf' '--with-zlib'
'--with-jpeg-dir=/usr/lib' '--enable-sockets' '--enable-ftp'
'--with-mysql=/usr/local/mysql40/' '--enable-exif'
No gd-related changes to php.ini.
Reproduce code:
---------------
list($ll['x'],$ll['y'],$lr['x'],$lr['y'],$ur['x'],$ur['y'],$ul['x'],$ul['y'])
= imagettfbbox(10,0,FONT,$text);
//echo abs($lr['x'])+abs($ur['x']),'
',abs($ur['y'])+abs($lr['y']);
$img2 =
imagecreatetruecolor(abs($lr['x'])+abs($ul['x']),abs($ur['y'])+abs($lr['y']));
imagecolorallocate($img2,0,0,0);
imagettftext($img2,10,0,$ul['x'],8,imagecolorallocate($img2,255,0,0),FONT,$text);
imagepng($img2,'foo.png');
imagedestroy($img2);
Expected result:
----------------
The text outputted on the image canvas.
Actual result:
--------------
A blank image.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28885&edit=1