#30229 [Ver->Fbk]: (imagerectangle + alpha level > 0) = color bug
| From: | pajoye@php.net | Date: | Sat, 20 Nov 2004 13:35:07 +0000 |
| Subject: | #30229 [Ver->Fbk]: (imagerectangle + alpha level > 0) = color bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69294@lists.php.net to get a copy of this message | ||
ID: 30229
Updated by: pajoye@php.net
Reported By: a25617 at alunos dot det dot ua dot pt
-Status: Verified
+Status: Feedback
Bug Type: GD related
Operating System: Windows XP
PHP Version: Irrelevant
Assigned To: pajoye
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Commited to 4.3
--Pierre
Previous Comments:
------------------------------------------------------------------------
[2004-11-17 21:13:33] pajoye@php.net
Got the fix, will commit asap.
--Pierre
------------------------------------------------------------------------
[2004-09-25 15:21:46] a25617 at alunos dot det dot ua dot pt
Description:
------------
When using a transparency level above zero, drawing a rectangle will
produce 4 dots in the corners. I think this is because the 4 lines of
the rectangle are drawn and the corners will be overridden 2 times
making the color on the corners darker than the rest.
Reproduce code:
---------------
<?php
$im = imagecreatetruecolor(100, 100);
$bg = imagecolorallocate($im, 250, 250, 250);
$blue = imagecolorallocatealpha($im, 150, 150, 255, 60);
imagefilledrectangle($im, 0, 0, 100, 100, $bg);
imagerectangle($im, 20, 20, 80, 80, $blue);
imagepng($im);
imagedestroy($im);
?>
Expected result:
----------------
And grayed backgrounded image 100x100 with a blue rectangle 60x60 in
the middle.
Actual result:
--------------
Everything is ok except the corners of the rectangle are darker. In
some complex examples like drawing gantt or bar charts that bug stands
out even more.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30229&edit=1