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

 ID:                 51593
 Comment by:         blyon at blyon dot com
 Reported by:        ellipsebugs at yahoo dot com
 Summary:            imageellipse() draws incorrectly
 Status:             Open
 Type:               Bug
 Package:            GD related
 Operating System:   Windows XP
 PHP Version:        5.3.2
 Block user comment: N
 Private report:     N

 New Comment:

I'm having the same problem with large ellipses on FreeBSD, I am trying
to do 

ellipses > 1000 pixels and they look like bumpy squares:



PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 21 2008 18:22:59)


Copyright (c) 1997-2008 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies


Previous Comments:
------------------------------------------------------------------------
[2010-04-18 23:17:51] ellipsebugs at yahoo dot com

Description:
------------
On a system of Window XP, PHP/5.3.0 and GD 2.0.34 the imageellipse()
function fails to draw a circle properly when dealing with large
dimensions.



Calling the function for a circle with radius over 1032 pixels (an
ellipse with equal width and height over 2064 pixels) creates a deformed
circle with bumps in four directions. Increasing the dimensions makes
things worse.



On a system of Linux, PHP/5.2.13 and GD 2.0.34 the issue does not
appear.

Test script:
---------------
<?php



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

$im = imagecreatetruecolor(2200, 2200) or die("Cannot Initialize new GD
image stream");

imagefill($im, 0, 0, imagecolorallocate($im, 255, 255, 255));

imageellipse($im, 1100, 1100, 2064, 2064, imagecolorallocate($im, 0, 0,
255));

imagepng($im);

imagedestroy($im);



?>

Expected result:
----------------
A relatively smooth circle is drawn.

Actual result:
--------------
The resulting circle has irregular bumps in it.


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



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

Reply via email to