Bug #78370 [NEW]: imagefilltoborder函数

From: Date: Sun, 04 Aug 2019 12:05:23 +0000
Subject: Bug #78370 [NEW]: imagefilltoborder函数
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222080@lists.php.net to get a copy of this message
From: 1602352639 at qq dot com Operating system: Windows10 PHP version: Irrelevant Package: GD related Bug Type: Bug Bug description:imagefilltoborder函数 Description: ------------ --- From manual page: https://php.net/function.imagefilltoborder --- 当被填充的图形是由imagefilledellipse创建时,可能出现无法正确填充的情况 Test script: --------------- <?php header("content-type:image/png"); $res=imagecreate(800,400); $bmgColor=imagecolorallocate($res,54,125,215); $darkPen1=imagecolorallocate($res,255*0.5,69*0.5,215*0.5); $penColor1=imagecolorallocate($res,255,69,215); $filledTime=15; while($filledTime--) { imagefilledellipse($res,400,200+$filledTime,100,40,$darkPen1); } imagefilledellipse($res,400,200,100,40,$penColor1); //问题出现在这里,这时第三个参数为200 imagefilltoborder($res,400,200,$bmgColor,$penColor1); imagepng($res); imagedestroy($res); ?> Expected result: ---------------- <?php header("content-type:image/png"); $res=imagecreate(800,400); $bmgColor=imagecolorallocate($res,54,125,215); $darkPen1=imagecolorallocate($res,255*0.5,69*0.5,215*0.5); $penColor1=imagecolorallocate($res,255,69,215); $filledTime=15; while($filledTime--) { imagefilledellipse($res,400,200+$filledTime,100,40,$darkPen1); } imagefilledellipse($res,400,200,100,40,$penColor1); /*当第三个参数改为202时,这才是预期的结果。但是第三个参数为200与202时不应该出现不同的结果,因为(400,200)与(400,202)它们都是在由imagefilledellipse($res,400,200,100,40,$penColor1)语句创建的区域里*/ imagefilltoborder($res,400,202,$bmgColor,$penColor1); imagepng($res); imagedestroy($res); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=78370&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78370&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78370&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78370&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78370&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78370&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78370&r=support Expected behavior: https://bugs.php.net/fix.php?id=78370&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78370&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78370&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78370&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78370&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78370&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78370&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78370&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78370&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78370&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78370&r=mysqlcfg

« previous php.bugs (#222080) next »