0

i wrote this basic codes to check against gd library existence:

$image = @imagecreate(480, 250) or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 0, 0, 0); 
$text_color  = imagecolorallocate ($im, 255, 0, 0); 
imagestring ($im, 255,255,0,  "A Simple Text String", $text_color); 
header ("Content-type: image/gif"); 
imagegif($im);

result: none image shown
gd version: 2.0.15
from the phpinfo()
GIF Read Support enabled
JPG Support enabled
PNG Support enabled

when i changed it to png the same thing happened...dumfounded

if i want to upgrade to gd 2.0.33..where do i start..frm the gd site, they mentioned bout compiling it..im using windows...so please help

others spec:
apache
windows
current gd 2.0.15
current php 4.3.3

help me

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by eliauction
0

You haven't actually set the background colour - you've just created the object.

imagefill($im, 0, 0, $background_color);
0

ok..i figure out what it is..the variable is not consistent...
anyway how to upgrade to gd 2.0.33..

another thing..my current gd version supposed to support gif..but when i changed it to content type=gif ..no image appeared...so i have to use png instead..WHY????

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.