#28761 [NEW]: lines drawn with imageline() are ugly

From: Date: Sun, 13 Jun 2004 04:13:27 +0000
Subject: #28761 [NEW]: lines drawn with imageline() are ugly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60841@lists.php.net to get a copy of this message
From: odarcan at hotmail dot com Operating system: win xp PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug description: lines drawn with imageline() are ugly Description: ------------ i dont think this is a bug, it may be, and i dont know if reporting this here will do any good, when drawing lines in gd, other than 90degree angles; the endings of the lines always become horisontal and it looks really, REALLY cheap! it doesnt show when the lines are 1 pixel wide but when drawing thicker lines, it becomes VERY obvious, this is my greatest obstacle in my project right now, ive emailed boutell.com but got no answer. thanks, Osman Darcan Reproduce code: --------------- <? $im = imagecreate(400, 400) or die ("Cannot Initialize new GD image stream"); header ("Content-type: image/png"); $grey = imagecolorallocate ($im, 155, 155, 155); $blue = imagecolorallocate ($im, 0, 0, 255); $green = imagecolorallocate ($im, 0, 155, 0); imagesetthickness($im,9); imageline($im,5,5,50,50,$blue); imageline($im,50,50,100,300,$blue); imageline($im,100,300,300,40,$blue); imageline($im,5+20,5+20,50+20,50+20,$green); imageline($im,50+20,50+20,60+20,300+20,$green); imageline($im,100+20,300+20,300+20,40+20,$green); imagepng($im,"",60); ?> Expected result: ---------------- try different values for imagesetthickness Actual result: -------------- you'll see that some lines look very weird.. im not sure its a bug but it's sure ugly allright.. php and gd deserves something as simple as a decent option to set thickness to lines.. shouldnt be so hard to implement? -- Edit bug report at http://bugs.php.net/?id=28761&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28761&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28761&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28761&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28761&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28761&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28761&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28761&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28761&r=support Expected behavior: http://bugs.php.net/fix.php?id=28761&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28761&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28761&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28761&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28761&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28761&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28761&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28761&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28761&r=float

« previous php.bugs (#60841) next »