From: a25617 at alunos dot det dot ua dot pt Operating system: Windows XP PHP version: Irrelevant PHP Bug Type: GD related Bug description: (imagerectangle + alpha level > 0) = color bug
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 bug report at http://bugs.php.net/?id=30229&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30229&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30229&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30229&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30229&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30229&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30229&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30229&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30229&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30229&r=support Expected behavior: http://bugs.php.net/fix.php?id=30229&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30229&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30229&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30229&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30229&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30229&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30229&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30229&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30229&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30229&r=mysqlcfg