note 47241 rejected from function.imagefill by betz
| From: | betz@php.net | Date: | Mon, 08 Nov 2004 10:37:24 +0000 |
| Subject: | note 47241 rejected from function.imagefill by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80276@lists.php.net to get a copy of this message | ||
Note Submitter: djmccormick at bsu dot edu
----
It's worth noting that (though the problem seems to have been fixed in recent versions of PHP)
when using the imagefill() function on a server running PHP 4.3.8 and v2.0.23 compatible GD I was
not able to get a reliable color fill. Sometimes it would fill the area, sometimes not... randomly.
When the same code was tested on a PHP5.02 server there was no issue.
<?php
header("Content-type: image/jpeg");
$image = imagecreate(200,200);
$red = imagecolorallocate($image, 255,0,0);
$blue = imagecolorallocate($image, 0,0,255);
imageline($image, 0,0, 199,199, $blue);
imagefill($image, 0,199, $blue);
imagejpeg($image);
?>