From: info at silisoftware dot com Operating system: Windows XP Pro PHP version: 4.3.5 PHP Bug Type: GD related Bug description: ImageSetThickness + ImageArc = strange results
Description: ------------ Drawing an arc with an image thickness of other than 1 produces very strange results. The thicker the line specified, the "hairier" it gets. At 5px it's uneven, 25px quite ragged, at 50px and above it gets very non-round. The best way I can show the problem is with some sample images: http://www.silisoftware.com/temp/imagearc/ Not sure if it's a related issue, but I notice if I use the same code to draw an arc from 1-360 degrees, it looks like a big hairy "+" instead of a "o", but if I draw from 0-360 degrees it becomes a 1px circle, no matter what I specify for ImageSetThickness. Reproduce code: --------------- $imagethickness = 100; $gdimg_output = ImageCreateTrueColor(400, 400); $color_bg = ImageColorAllocate($gdimg_output, 0, 0, 255); $color_fg = ImageColorAllocate($gdimg_output, 255, 0, 0); ImageSetThickness($gdimg_output, $imagethickness); ImageFilledRectangle($gdimg_output, 0, 0, 400, 400, $color_bg); ImageArc($gdimg_output, 200, 200, 200, 200, 90, 360, $color_fg); ImagePNG($gdimg_output); Expected result: ---------------- 100px thick, 270-degree red arc on blue background Actual result: -------------- This: http://www.silisoftware.com/temp/imagearc/100.png 270-degree red arc on blue background, but thickness varies from 1px to 100px, it looks "hairy", with a tendency to elongate into a "+" rather than a "o" (more pronounced the thicker the line is set to). -- Edit bug report at http://bugs.php.net/?id=27756&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27756&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27756&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27756&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27756&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27756&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27756&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27756&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27756&r=support Expected behavior: http://bugs.php.net/fix.php?id=27756&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27756&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27756&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27756&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27756&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27756&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27756&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27756&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27756&r=float
