ID:               22103
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         GD related
 Operating System: Linux
 PHP Version:      4.3.0
 New Comment:

The problem still exist in snapshot 200302071430. 

I haven't had time to look at the GD code but this is most likely a
design flaw and not a straight bug. Fixing this will probably require a
new fill algorithm for ellipses that can guarantee that the same pixel
inside the ellipse will only be painted exactly one time.

The script below demonstrates this bug
and the resulting image can also be viewed at
http://www.aditus.nu/jpgraph/bbimages/filledellipsebug.png


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

// Create a truecolor image with alpha blending
$im = imagecreatetruecolor(200,200);
imagealphablending ($im,true);

// Background color
$bkg = imagecolorresolvealpha($im, 255,255,255,0);

// Red with ~70% alpha blending (90/127)
$red = imagecolorresolvealpha($im, 255,0,0,90);

// White background
imagefilledrectangle($im,0,0,200,200,$bkg);

// Filled circle (with moire' patterns)
imagefilledellipse($im,100,100,120,120,$red);

imagepng($im);
imagedestroy($im);
?>


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

[2003-02-07 06:36:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


There were couple of fixes in GD in CVS.
If it still fails, please provide a short example script.


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

[2003-02-06 22:18:03] [EMAIL PROTECTED]

(Using built-in GD 2.x in PHP 4.3.0)

imagefilledellipse() creates moire' patterns inside the filled ellipse
when alpha blending is enabled.

The problem seems to be that the fill algorithm strokes the same point
within the ellipse several times and due to the alpha blending of
single pixels creates several color shades within the ellipse.

This is fine as long as a solid fill is used but does not work together
with alpha blending. 



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


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

Reply via email to