ID: 40572 Updated by: [EMAIL PROTECTED] Reported By: seth at pricepages dot org -Status: Open +Status: Assigned Bug Type: GD related Operating System: Mac 10.4 PHP Version: 5.2.1 -Assigned To: +Assigned To: pajoye
Previous Comments: ------------------------------------------------------------------------ [2007-02-21 05:01:04] seth at pricepages dot org Description: ------------ I am filling the background of an image with a transparent red (it shouldn't have an effect on the rest of the drawing). Over it, I'm drawing a black, semi-transparent, square. Reproduce code: --------------- $img = imagecreatetruecolor(100, 100); imagealphablending($img, true); $trans = imagecolorresolvealpha($img,255,0,0, 127); imagefill($img, 0,0, $trans); $pTrans = imagecolorresolvealpha($img, 0,0,0, 64); imagefilledrectangle($img, 10, 10, 50, 50, $pTrans); imagealphablending($img, false); imagesavealpha($img,true); header('Content-Type: image/png'); imagepng($img); Expected result: ---------------- I would expect the resulting image to be 100% transparent, except for a grey, 50% transparent square. Actual result: -------------- Instead, the black is mixed with the red to form a dark-red semi-transparent square. The red color should not be there, because it was 100% transparent. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40572&edit=1