Hello,
I have a stranger behaviour of the function imagecolorallocate.
Normally, this function is used to create a color for an image and the first call to this function set the background color of the image.


So here is my code :
<?php

[snip]...[/snip]
$im = imagecreate(15, 15);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
[snip]...[/snip]

?>

And when I display the page, some times the background of the generated image is not white.
The color is the same as the color of the background of the page (defined in the body tag), as if the image was transparent.


Have you also this problem ?
Why isn't the background white as expected ?

Something more strange is that if I replace the line :
$white = imagecolorallocate($im, 255, 255, 255);
by this line :
$white = imagecolorallocate($im, 255, 255, 254);

This works fine and the background of the image is well white.

Thanks for your help

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to