php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43547 imagefilledarc has a defect filling
Submitted: 2007-12-09 20:44 UTC Modified: 2015-05-07 18:16 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stas at metalinfo dot ru Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5.2.5 OS: WinXP
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: stas at metalinfo dot ru
New email:
PHP Version: OS:

 

 [2007-12-09 20:44 UTC] stas at metalinfo dot ru
Description:
------------
imagefilledarc has a defect filling on Win XP, Works fine on Linux system

Reproduce code:
---------------
$im = imagecreatetruecolor (600, 400);

$corRad = 60;

$rectFillColor = imagecolorallocate ($im, 255, 255, 255); 
imagefilledrectangle($im, 0, 400-$corRad, $corRad, 600-$corRad, $rectFillColor); 

$arcFillColor = imagecolorallocate ($im, 0, 0, 0);
imagecolortransparent($im, $arcFillColor);

imagefilledarc($im,$corRad,400-$corRad,$corRad*2,$corRad*2,90,180,$arcFillColor,IMG_ARC_PIE);

header ("Content-type: image/jpeg");
imagejpeg($im);

Expected result:
----------------
Rounded right bottom corner

Actual result:
--------------
Uploaded buggy result image is here http://ww9.ru/foo.jpg

Because of invalid fill ther is a black line on the right bottom corner

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-09 21:12 UTC] pajoye@php.net
I can reproduce on all platforms. 

Which gd library do you use with your extension linux? Bundled or external? If external, which version on which linux?

The bug seems to be in the polygon function, the clipping looks like the cause.

What you are looking (as a "work 'round") may be:

imagefilledarc($im,$corRad, 399-$corRad, $corRad*2,$corRad*2, 90, 180, $arcFillColor, IMG_ARC_PIE);

As the actual postion of the last line is 399, not 400. But the bug is valid > assigned.
 [2007-12-10 06:40 UTC] stas at metalinfo dot ru
Works fine on my hosting company machine 
PHP Version 5.2.5
Server API CGI
Apache/1.3.37 
Linux saturn 2.6.22-NX.13-saturn #2
GD Version 	bundled (2.0.34 compatible)
 [2008-11-02 13:22 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2008-11-10 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2015-05-07 18:16 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2015-05-07 18:16 UTC] cmb@php.net
This bug has been fixed in the meantime, see
<http://i.imgur.com/wmAJjIY.jpg> (created with [GD Version] =>
bundled (2.1.0 compatible)).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 02:01:30 2024 UTC