#28506 [NEW]: imagearc() doesn't like negative value of the s parameter
| From: | tony2001 at phpclub dot net | Date: | Mon, 24 May 2004 12:49:16 +0000 |
| Subject: | #28506 [NEW]: imagearc() doesn't like negative value of the s parameter | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-59937@lists.php.net to get a copy of this message | ||
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version: 5CVS-2004-05-24 (dev)
PHP Bug Type: GD related
Bug description: imagearc() doesn't like negative value of the s parameter
Description:
------------
imagearc() draws broken arc, when using negative value as s parameter.
It could be GDlib bug, at least I found a couple of words in GD man:
http://www.boutell.com/gd/manual2.0.23.html
about unspecified bugs in
gdImageArc().
Also, there can be simple workaround: just don't accept negative values,
reduce them to zero.
Reproduce code:
---------------
// result image is here: http://tony2001.phpclub.net/temp/imagearc.png
//
// create a 200*200 image
$img = imagecreate(200, 200);
// allocate some colors
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 50, 200);
// draw a white circle
imagearc($img, 100, 100, 150, 150, -1, 200, $black);
// output image in the browser
header("Content-type: image/png");
imagepng($img);
// free memory
imagedestroy($img);
Expected result:
----------------
a flat arc
Actual result:
--------------
a broken arc with some crosslines
--
Edit bug report at http://bugs.php.net/?id=28506&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28506&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28506&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28506&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28506&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28506&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28506&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28506&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28506&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28506&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28506&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28506&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28506&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28506&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28506&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28506&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28506&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28506&r=float