ID: 40158 Updated by: [EMAIL PROTECTED] Reported By: henus at mail dot ru -Status: Open +Status: Assigned Bug Type: GD related Operating System: Windows XP PHP Version: 5.2.0 -Assigned To: +Assigned To: pajoye
Previous Comments: ------------------------------------------------------------------------ [2007-01-18 10:40:42] henus at mail dot ru Description: ------------ After using imagefilter (IMG_FILTER_COLORIZE) on transparent png image the result color of translucent pixels is wrong. I.e. the edge of non-transparent part of image, which contain translucent antialiasing area - wrong colored. Reproduce code: --------------- <? $mask=imagecreatefrompng("mask.png"); // http://fort-ross.ru/henus/gd/mask.png (mask for colorize, contain translucent) $imagewidth=imagesx($mask); $imageheight=imagesy($mask); $imagemain=imagecreatetruecolor($imagewidth,$imageheight); imagealphablending($mask, TRUE); imagealphablending($imagemain, TRUE); $color=imagecolorallocate($imagemain, 0, 0, 0); imagefill($imagemain, 0, 0, $color); imagefilter($mask, IMG_FILTER_COLORIZE, -255, -255, 0); imagecopy($imagemain, $mask, 0, 0, 0, 0, $imagewidth, $imageheight); imagepng($imagemain,"result_incorrect.png"); // http://www.fort-ross.ru/henus/gd/result_incorrect.png imagedestroy($mask); imagedestroy($imagemain); ?> Expected result: ---------------- The result image - absolutely black square Actual result: -------------- The result image - black square with gray line (on the edge of mask image) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40158&edit=1