php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38517 imagefilledarc() with alpha blending mode
Submitted: 2006-08-20 08:46 UTC Modified: 2008-11-10 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: wkpark at gmail dot com Assigned: pajoye (profile)
Status: No Feedback Package: GD related
PHP Version: 5.1.5 OS: Linux
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: wkpark at gmail dot com
New email:
PHP Version: OS:

 

 [2006-08-20 08:46 UTC] wkpark at gmail dot com
Description:
------------
there are already similar imagefilledellipse() bug #22103.

but it is not corrected with the imagefilledarc().

the reason why this results are obtained is same as described in #22103.





Reproduce code:
---------------
<?php
$im = imagecreatetruecolor(401, 802);
imagesavealpha($im, true);
imagealphablending($im, false);
imagefilledrectangle($im, 0, 0, 400, 801, 0x7fffffff);
imagealphablending($im, true);
imagefilledarc($im, 200, 200, 400, 400, 30, 270, 0xff0000, 0);
imagefilledarc($im, 200, 601, 400, 400, 30, 270, 0x40ff0000, 0);
imagepng($im, 'test.png');

echo
'<img src="test.png" />';
?>

and the result http://kldp.org/files/test_0.png


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-20 09:08 UTC] wkpark at kldp dot org
and this is my first try to fix this problem.

this patch use Bresenham algorithm and some simple trick to make integer based imagefilledarc()

http://chem.skku.ac.kr/~wkpark/linux/patch/php5.x-gd-bresenham3.patch

http://kldp.org/files/gd_try1.png
 [2006-08-21 11:18 UTC] wkpark at gmail dot com
this is a new patch:
 - CHANGES:
  - fixed winding number exceptions:
http://chem.skku.ac.kr/~wkpark/linux/patch/php5.x-gd-bresenham4.patch
 [2006-08-21 12:16 UTC] pajoye@php.net
The host where you uploaded the patches is not reachable.

Also please note that I already rewrote this function for both the bundled GD and the normal GD libs. Using an innovative solution, it is nearly as fast as my new ellipse function. I will use the faster version :)

Can you mail me your patch please? Or put it in a reachable post.


 [2006-08-21 13:05 UTC] pajoye@php.net
Ok, I got your patch now. Not sure why, but your host is not reachable from my ISP (arcor/germany).
 [2008-11-02 12:37 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 11:01:32 2024 UTC