ID: 27582 Updated by: [EMAIL PROTECTED] Reported By: panda dot management at free dot fr -Status: Open +Status: Suspended Bug Type: GD related Operating System: Windows XP PHP Version: 4.3.5RC4-dev Mar 14 2004 22:12:48 Assigned To: pajoye New Comment:
Hello, Sorry, this function does not work with blending mode. I was forced to desactivate it. Using a blending mode will result in an infinite loop and recursive calls with the current implementation (blending over endlessly). A second case where it fails is when you have a lot of small open segments (see ext/gd/tests/bug27852_1.phpt). I cannot fix it before the next php4 and php5 (rc1) release. I have to rewrite the function. pierre Previous Comments: ------------------------------------------------------------------------ [2004-03-14 21:51:57] panda dot management at free dot fr heu... I just reopened the bug, cause it seemed to me that it's related. Should I have filled a new one instead? Best regards. Olivier ------------------------------------------------------------------------ [2004-03-14 21:47:34] panda dot management at free dot fr Hello, Using PHP Version 4.3.5RC4-dev Mar 14 2004 22:12:48. The first described bug is fixed, but we now loose the ability to use a fill color with an alpha channel. Reproduce: ********** <?php $res=imagecreatetruecolor(100, 100); imagealphablending($res, 1); imagesavealpha($res, 0); $border=imagecolorallocate($res, 150, 0, 0); $back=imagecolorallocatealpha($res, 0, 255, 0, 100); $fill=imagecolorallocatealpha($res, 255, 0, 0, 125); // This fill the image with a very light layer of green imagefill($res, 0, 0, $back); // Draw a diagonal imageline($res, 0, 0, 100, 100, $border); // This should fill half with a very light layer of red imagefilltoborder($res, 100, 50, $border, $fill); imagepng($res, 'bugtest.png'); imagedestroy($res); echo '<img src="bugtest.png"/>'; ?> Actual result: ************** imagefilltoborder doesn't take the alpha channel of fill color into account. Expected result: **************** imagefilltoborder (on alpha blending images) should use alpha channel on the color to fill, IMHO because: - when using Non Alpha Blending images, it does. - and imagefill on alphablending images does also. Additionnal comment: ******************** Thank you Pierre for the quick fix to the first bug! Hope this sequel will find its solution soon. See ya! ------------------------------------------------------------------------ [2004-03-13 13:31:30] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. This bug is fixed in HEAD (php5). It will be fixed too in php4 (PHP_4_3) later this weekend. thanks for the small reproduce script, pierre ------------------------------------------------------------------------ [2004-03-13 05:10:55] [EMAIL PROTECTED] Hello, Verified with HEAD. Segfault in libgd function, infinite recursion. I will try to fix it asap. pierre ------------------------------------------------------------------------ [2004-03-13 05:03:55] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/27582 -- Edit this bug report at http://bugs.php.net/?id=27582&edit=1
