#38517 [Asn]: imagefilledarc() with alpha blending mode
| From: | pajoye@php.net | Date: | Mon, 21 Aug 2006 13:05:39 +0000 |
| Subject: | #38517 [Asn]: imagefilledarc() with alpha blending mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101062@lists.php.net to get a copy of this message | ||
ID: 38517
Updated by: pajoye@php.net
Reported By: wkpark at gmail dot com
Status: Assigned
Bug Type: GD related
Operating System: Linux
PHP Version: 5.1.5
Assigned To: pajoye
New Comment:
Ok, I got your patch now. Not sure why, but your host is not reachable
from my ISP (arcor/germany).
Previous Comments:
------------------------------------------------------------------------
[2006-08-21 12:16:58] 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 11:18:46] 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-20 09:08:46] 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-20 08:46:48] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38517&edit=1