Page 1 of 1

background color imagefill

Posted: Mon Dec 14, 2009 8:06 am
by thosecars82
Hello

I would like to ask you why I see this square in red color just in my local xampp installation. If I run the code in the remote server (http://www.arreglaordenador.com/numberimage2.php) I see the square in black color instead of red. Do you have any ideas?

Code: Select all

 
<?php
 
$im = imagecreatetruecolor(100, 100);
 
// sets background to red
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);
 
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?> 
 
Thanks

Re: background color imagefill

Posted: Mon Dec 14, 2009 1:54 pm
by requinix
thosecars82 wrote:If I run the code in the remote server (http://www.arreglaordenador.com/numberimage2.php) I see the square in black color instead of red.
I don't. Looks red to me.