Bug #64614 [Csd->Dup]: imagettbbox() Always returns -1 for X coordinate left corner.

From: Date: Fri, 23 Sep 2016 13:03:03 +0000
Subject: Bug #64614 [Csd->Dup]: imagettbbox() Always returns -1 for X coordinate left corner.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204198@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64614&edit=1

 ID:                 64614
 Updated by:         cmb@php.net
 Reported by:        fredcm at gmail dot com
 Summary:            imagettbbox() Always returns -1 for X coordinate
                     left corner.
-Status:             Closed
+Status:             Duplicate
 Type:               Bug
 Package:            GD related
 Operating System:   Linux/Windows
 PHP Version:        5.4.13
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Actually, this is a duplicate of bug #53504.


Previous Comments:
------------------------------------------------------------------------
[2016-09-23 12:54:14] cmb@php.net

Fixed with <http://git.php.net/?p=php-src.git;a=commit;h=f5f94d9c>.

------------------------------------------------------------------------
[2016-09-14 17:36:28] cmb@php.net

Besides Mark's fix, I've noticed that external libgd's results may
differ from those of the bundled libgd, see
<https://github.com/libgd/libgd/issues/301>.

------------------------------------------------------------------------
[2016-03-31 11:37:35] mplomer at gmx dot de

For proposed fix and further info/discussion, see bug #53504

------------------------------------------------------------------------
[2015-05-17 16:17:32] davehampson12 at gmail dot com

Same reason as the original reporter - I need to calculate the bounding box dimensions of text and
this bug doesn't help :)

------------------------------------------------------------------------
[2013-04-09 12:11:16] fredcm at gmail dot com

Description:
------------
//The function imagettbbox() always returns -1 for X coordinate left corner.

$bbox = imagettfbbox(20, 0, './arial.ttf', 'TestImagettfbbox');

echo $bbox[0]; // always -1 - lower left corner, X position
echo $bbox[6]; // always -1 - upper left corner, X position


//with this problem there is no way to align left the text in the image.

Test script:
---------------
$bbox = imagettfbbox(20, 0, './arial.ttf', 'TestImagettfbbox');

echo $bbox[0]; // always -1 - lower left corner, X position
echo $bbox[6]; // always -1 - upper left corner, X position


Expected result:
----------------
Return valid values for X coordinates.
I've tested the imagettbbox() in PHP 5.0.4 and the function is working.


Actual result:
--------------
imagettbbox() always returns -1 for X coordinate of the left corners.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=64614&edit=1


Thread (10 messages)

« previous php.bugs (#204198) next »