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

From: Date: Sun, 17 May 2015 16:17:33 +0000
Subject: Bug #64614 [Com]: imagettbbox() Always returns -1 for X coordinate left corner.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192711@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 Comment by: davehampson12 at gmail dot com Reported by: fredcm at gmail dot com Summary: imagettbbox() Always returns -1 for X coordinate left corner. Status: Open Type: Bug Package: GD related Operating System: Linux/Windows PHP Version: 5.4.13 Block user comment: N Private report: N New Comment: Same reason as the original reporter - I need to calculate the bounding box dimensions of text and this bug doesn't help :) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#192711) next »