User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,902 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,597 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1012 | Replies: 2
Reply
Join Date: Oct 2005
Posts: 17
Reputation: eliauction is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
eliauction eliauction is offline Offline
Newbie Poster

php 4.3.3 and gd

  #1  
Jan 4th, 2006
i wrote this basic codes to check against gd library existence:

[PHP]$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);[/PHP]

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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2005
Location: In my box.
Posts: 43
Reputation: Ooble is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
Ooble's Avatar
Ooble Ooble is offline Offline
Light Poster

Re: php 4.3.3 and gd

  #2  
Jan 4th, 2006
You haven't actually set the background colour - you've just created the object.
[php]imagefill($im, 0, 0, $background_color);[/php]
while(sleeping)
    cat_wails();
wake_up();
for(i=0;i<9;i++)
    shoot_cat();
rejoice();
goto(bed);
Reply With Quote  
Join Date: Oct 2005
Posts: 17
Reputation: eliauction is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
eliauction eliauction is offline Offline
Newbie Poster

Re: php 4.3.3 and gd

  #3  
Jan 5th, 2006
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????
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:34 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC