Bug #77460 [NEW]: Filled arc drawing does not use the correct degree.
| From: | p1100i at gmx dot com | Date: | Tue, 15 Jan 2019 11:25:28 +0000 |
| Subject: | Bug #77460 [NEW]: Filled arc drawing does not use the correct degree. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-218952@lists.php.net to get a copy of this message | ||
From: p1100i at gmx dot com
Operating system: bionic / ArchLinux
PHP version: 7.3.1
Package: GD related
Bug Type: Bug
Bug description:Filled arc drawing does not use the correct degree.
Description:
------------
It seems the
php-gd module which enables using imagefilledarc method
cannot render in some degrees corecctly.
* versions (format: distro: version) tested the issue on:
* ubuntu-bionic: 7.2.10-0ubuntu0.18.04.1
* archlinux: 7.3.1
* for reproduction install php-gd and allow extension=gd in your
php.ini
Test script:
---------------
<?php
$image = imagecreatetruecolor(100, 100);
$red = imagecolorallocate($image, 200, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $white);
imagefilledarc($image, 50, 50, 100, 50, 91, 360, $red, IMG_ARC_PIE);
header('Content-type: image/png');
imagepng($image, phpversion() . '.png');
Expected result:
----------------
The rendered ellipse fill should start just one degree after the 6
hour-o-clock position.
Actual result:
--------------
The rendered ellipse fill starts much more after the 6-hour-o-clock
position.
--
Edit bug report at https://bugs.php.net/bug.php?id=77460&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77460&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77460&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77460&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77460&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77460&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77460&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77460&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77460&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77460&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77460&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77460&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77460&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77460&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77460&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77460&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77460&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77460&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77460&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77460&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77460&r=mysqlcfg