Hello guys
This is driving me mad. I would really appreciate if you told me any idea about 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?

<?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

Recommended Answers

All 2 Replies

Member Avatar for diafol

My computer shows red when I run this at localhost and lo and behold when I go to your site, I see red again!

Clear the cache for this page. However, I don't know if that'll help. Which browser are you using?
Have you tried to create a jpeg instead? Does the same thing happen?

Member Avatar for diafol

Hello?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.