ID:               28885
 Updated by:       [EMAIL PROTECTED]
 Reported By:      aderyn at gentoo dot se
 Status:           Feedback
 Bug Type:         GD related
 Operating System: Linux 2.6.7 (Gentoo)
 PHP Version:      5.0.0RC3
 New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[2004-06-23 22:17:50] [EMAIL PROTECTED]

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

Reply via email to