#40764 [NEW]: imageline() problem
| From: | php at lydiaade dot com | Date: | Fri, 09 Mar 2007 00:54:38 +0000 |
| Subject: | #40764 [NEW]: imageline() problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-110107@lists.php.net to get a copy of this message | ||
From: php at lydiaade dot com
Operating system: Redhat Enterprise 3
PHP version: 5.2.1
PHP Bug Type: GD related
Bug description: imageline() problem
Description:
------------
imageline() now draws all horizontal and vertical lines as one pixel
thick, whichever line thickness has been set using imagesetthickness(). As
it worked fine before I upgraded to 5.2.1, this is probably caused by the
recent optimisation of imageline().
Reproduce code:
---------------
<?php
$image=imagecreatetruecolor(400, 400);
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);
imagefill($image, 0, 0, $white);
imagesetthickness($image, 10);
imageline($image, 200, 0, 200, 400, $black);
imageline($image, 0, 200, 400, 200, $black);
imageline($image, 0, 0, 392, 392, $black);
header("Content-type: image/gif");
imagegif($image);
imagedestroy($image);
?>
Expected result:
----------------
This should draw three lines, all 10 pixels thick.
Actual result:
--------------
Only the diagonal line is the correct thickness.
--
Edit bug report at http://bugs.php.net/?id=40764&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40764&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40764&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40764&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40764&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40764&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40764&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40764&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40764&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40764&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40764&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40764&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40764&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40764&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40764&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40764&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40764&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40764&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40764&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40764&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40764&r=mysqlcfg