From:             nih at phlux dot co dot uk
Operating system: FreeBSD
PHP version:      4.3.4
PHP Bug Type:     GD related
Bug description:  GD: Eliptical fills don't work with translucent colours

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 bug report at http://bugs.php.net/?id=27385&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27385&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27385&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27385&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27385&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27385&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27385&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27385&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27385&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27385&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27385&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27385&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27385&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27385&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27385&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27385&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27385&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27385&r=float

Reply via email to