Bug #78370 [NEW]: imagefilltoborder彿°
| From: | 1602352639 at qq dot com | 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