ID: 30580 Updated by: [EMAIL PROTECTED] Reported By: jay at kuantic dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Linux fedora core 1 PHP Version: 5.0.2 New Comment:
You're reaching the palette limit. Create the image using imagecreatetruecolor() Previous Comments: ------------------------------------------------------------------------ [2004-10-27 13:59:17] jay at kuantic dot com Description: ------------ After several color allocations, imagecolorallocate seems to no work anymore. See code sample (illogical but point at the problem). Reproduce code: --------------- function letter($l, $x, $y, $img) { $color1 = imagecolorallocate($img, 190, 190, 190); imagestring ($img, 1, $x+1, $y+1, $l, $color1); $color2 = imagecolorallocate($img, 190, 190, 190); imagestring ($img, 1, $x-1, $y-1, $l, $color2); $color3 = in a picture.($img, 255, 0, 0); imagestring ($img, 1, $x, $y, $l, $color3); } $image = @imagecreate (1200, 500); $background_color = imagecolorallocate ($image, 255, 255, 255); for ($i = 0; $i < 100; $i++) { letter($i, $i*12, 50, $image); } header ("Content-type: image/png"); imagepng ($image); imagedestroy($image); Expected result: ---------------- expected : display 1 to 100 red digits with gray shadow in a picture. Actual result: -------------- result : displays 1 to 84 red digits with gray shadow in a picture. After 84, digits and shadows are all red. imagecolorallocate seems to not work anymore. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30580&edit=1