php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73614 gdImageFilledArc() doesn't properly draw pies
Submitted: 2016-11-27 08:15 UTC Modified: 2019-01-16 18:41 UTC
Votes:5
Avg. Score:4.4 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:1 (20.0%)
From: vrp76 at mail dot ru Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: 7.0.13 OS: Windows Vista HomePremium 32 SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vrp76 at mail dot ru
New email:
PHP Version: OS:

 

 [2016-11-27 08:15 UTC] vrp76 at mail dot ru
Description:
------------
Wrong draws filled arcs.

Test script:
---------------
<?php

$image = imagecreatetruecolor(500, 500);

$white    = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$navy     = imagecolorallocate($image, 0x00, 0x00, 0x80);
$red      = imagecolorallocate($image, 0xFF, 0x00, 0x00);

 imagefilledarc($image, 250, 250, 500, 250, 0, 88, $white, IMG_ARC_PIE);
 imagefilledarc($image, 250, 250, 500, 250, 88, 91 , $navy, IMG_ARC_PIE);
 imagefilledarc($image, 250, 250, 500, 250, 91, 360 , $red, IMG_ARC_PIE);

header('Content-type: image/png');
imagepng($image);
imagedestroy($image);

?>

Expected result:
----------------
https://www.dropbox.com/s/s1pby0zutsajbed/Pie1.png?dl=0

Actual result:
--------------
https://www.dropbox.com/s/68l645wakutl3n0/Pie2.png?dl=0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-27 13:34 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-11-27 15:56 UTC] cmb@php.net
-Status: Assigned +Status: Suspended
 [2016-11-27 15:56 UTC] cmb@php.net
I can confirm the issue (however, the expected and actual results
are swapped above).

As this is a libgd issue, I've forwared to
<https://github.com/libgd/libgd/issues/351>, and suspend this
ticket until the bug is fixed in libgd.
 [2017-08-16 16:30 UTC] cmb@php.net
-Assigned To: cmb +Assigned To:
 [2019-01-16 18:41 UTC] cmb@php.net
-Summary: Wrong draws filled arcs. +Summary: gdImageFilledArc() doesn't properly draw pies -Status: Suspended +Status: Analyzed -Assigned To: +Assigned To: cmb
 [2019-01-16 18:41 UTC] cmb@php.net
The bug has just been fixed in upstream.
 [2019-01-16 19:24 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=61cfa34e1194b5a026548508f9f34d6f6a8774da
Log: Fix #73614: gdImageFilledArc() doesn't properly draw pies
 [2019-01-16 19:24 UTC] cmb@php.net
-Status: Analyzed +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 10:01:28 2024 UTC