Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Call to undefined function: imagecreate()

images php coding issues or problems here.

Moderators: macek, egami, gesf

Call to undefined function: imagecreate()

Postby vikas » Fri Apr 18, 2003 11:24 pm

Hi

I am working on a script of image creation by using the function of php.

In that script i just write down the following code.

$myImage = imagecreate(300, 300);
$black = imagecolorallocate($myImage, 0, 0, 0);
$white = imagecolorallocate($myImage, 255, 255, 255);
imagefilledrectangle($myImage, 25, 25, 275, 275, $white)

But when i run this script it display the following error message.

<br />
<b>Fatal error</b>: Call to undefined function: imagecreate() in <b>/home/dinsol/public_html/vikas/test.php</b> on line <b>3</b><br />


Suggestion from any one would be appreciated.

Thanks.

Vikas
----------------
http://www.dinsol.com/
User avatar
vikas
New php-forum User
New php-forum User
 
Posts: 6
Joined: Sun Dec 08, 2002 11:12 pm
Location: india

Postby pootergeist » Sat Apr 19, 2003 2:45 am

do you have GD libraries compiled in your PHP build?

it'll tell you in phpinfo();

if you use one of the dinsol ones with the php build as specified, the GD is NOT compiled - maybe pester the host to go and get it from boutell.com
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron