From:             
Operating system: WinXP - IIS -fastcgi
PHP version:      5.3.2
Package:          GD related
Bug Type:         Bug
Bug description:imagettftext() - wrong character aligning in the textbox

Description:
------------
 imagettftext($image,$FontSize,$RotationAngle=90,$x,$y,$Color,$font,$value);



This function worked well in the previous version of PHP (5.3.1), after
updating PHP package, the next bug can be realized:



When you work with image processing functions and using imagettftext()
function to write some text to the image area, and if you use for example
90 degrees rotating for the text (that is the 3rd parameter of this
funcion), a wrong text align is visible on the image, because all
characters are fitted to the upper edge of the textbox. It is a new
problem, because there are not available any kind of text aligning
functions under image processing extension...



To corrigate this bug, strongly advised to use the previous version of PHP
(v5.3.1)

Test script:
---------------
$ima...@imagecreate(500,500);

$background_color=imagecolorallocate($image,40,40,40);

$font="./arial.ttf";

$Color=imagecolorallocate($image,255,0,255);

imagettftext($image,12,90,10,100,$Color,$font,"Something, Text.");

imagepng($image);

imagedestroy($image);



Expected result:
----------------
This function worked well in the previous version of PHP (5.3.1), after
updating PHP package, the next bug can be realized:



When you work with image processing functions and using imagettftext()
function to write some text to the image area, and if you use for example
90 degrees rotating for the text (that is the 3rd parameter of this
funcion), a wrong text align is visible on the image, because all
characters are fitted to the upper edge of the textbox. It is a new
problem, because there are not available any kind of text aligning
functions under image processing extension...



To corrigate this bug, strongly advised to use the previous version of PHP
(v5.3.1)


-- 
Edit bug report at http://bugs.php.net/bug.php?id=51902&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51902&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51902&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51902&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51902&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51902&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51902&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51902&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51902&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51902&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51902&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51902&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51902&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51902&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51902&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51902&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51902&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51902&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51902&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51902&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51902&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51902&r=mysqlcfg

Reply via email to