Page 1 of 1

imagefill() on images larger than 181x181

Posted: Tue Oct 19, 2004 10:57 am
by sternobread
Ok... I'm not sure if this is a bug w/ php or gd, or if I'm doing somthing wrong here:

Code: Select all

<?php
$img_big = imagecreatetruecolor(182, 182);
$brown=imagecolorallocate($img_big, 0xFF, 0xEF, 0xD8);
imagefill($img_big, 0, 0, $brown);
imagepng($img_big, "/usr/local/apache2/htdocs/cart/images/999999-1-big.png");
?>
Running this bit of script yields a 182x182 png image that is all black. If i reduce the imagecreatetruecolor size to 181x181 or less, it fills it with the tan-ish color specified by imagecolorallocate().

Is there some reason the imagefill wouldn't work on images larger than 181x181?

Can anyone shed some light on this?

Posted: Tue Oct 19, 2004 2:06 pm
by feyd
Moved to Graphics.

Posted: Tue Dec 21, 2004 5:25 pm
by onion2k
Interesting issue, I'll have a look into later.. in the mean time though, you could use imagefilledrectangle() instead if you're just trying to create a solid background colour.