ID:               27385
 User updated by:  nih at phlux dot co dot uk
 Reported By:      nih at phlux dot co dot uk
-Status:           Feedback
+Status:           Open
 Bug Type:         GD related
 Operating System: FreeBSD
 PHP Version:      4.3.4
 New Comment:

I used the bundled GD library.


Previous Comments:
------------------------------------------------------------------------

[2004-02-24 18:14:25] [EMAIL PROTECTED]

Did you use the bundled GD library or the external one. (In short: what
is your configure line?)

------------------------------------------------------------------------

[2004-02-24 17:51:49] nih at phlux dot co dot uk

Description:
------------
The elliptical drawing tools in the GD library that offer a fill
function do not correctly render the fill when using a translucent
colour. It would appear that the fill is drawn by a series of lines
from the centre point to each pixel around the edge of the ellipse or
arc, thus pixels near the centre are drawn over many times, thus
increasing the effective alpha of those pixels.

Reproduce code:
---------------
<?php



$img = imagecreatetruecolor(100, 100);

imageantialias($img, FALSE);

$blue = imagecolorallocatealpha($img, 0, 0, 255, 50);



imagefilledarc($img, 5, 5, 170, 170, 0, 85, $blue, 4);



header("Content-type: image/png");

imagepng($img);

imagedestroy($img);



?>

Expected result:
----------------
There should be a PNG image output of an arc of a 170px diameter going
from a bearing of 090 to a bearing of 175 in 50% transparent pure RGB
blue (0, 0, 255).

Actual result:
--------------
The transparency isn't correct, the closer towards the centre of the
arc the pixel is, the lower it's transparency (I'm almost certain it's
because they are being redrawn over and over).


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27385&edit=1

Reply via email to