note 39239 deleted from function.imagefilledpolygon by aidan

From: Date: Sun, 10 Oct 2004 11:14:41 +0000
Subject: note 39239 deleted from function.imagefilledpolygon by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78297@lists.php.net to get a copy of this message
Note Submitter: topace at lightbox dot org ---- The above comment states that the maximum points is 256. This is untrue in PHP 4.3.4, using the built-in GD. The following produces a pretty picture with 10000 points. (and I've tested it up to 100000 points) <?php $im = imagecreate(2000, 2000); $bg = imagecolorallocate($im, 255, 255, 255); $blue = imagecolorallocate($im, 0, 0, 255); $numpoints=10000; for($x=0;$x<$numpoints*2;$x+=2) { $values[$x]=rand(1,2000); $values[$x+1]=rand(1,2000); } imagefilledpolygon($im, $values, $numpoints, $blue ); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?>

« previous php.notes (#78297) next »