PDA

Click to See Complete Forum and Search --> : Image function


slice
Jan 25th, 2006, 12:31 PM
I want to generat my secure code image myself.
In my code
$image=imagecreatetruecolor($x, $y);

imagecreatetruecolor is returning
Fatal error: Call to undefined function: imagecreatetruecolor()
Thank You.

sciguyryan
Jan 25th, 2006, 02:00 PM
I want to generat my secure code image myself.
In my code
$image=imagecreatetruecolor($x, $y);

imagecreatetruecolor is returning
Fatal error: Call to undefined function: imagecreatetruecolor()
Thank You.

Create a file with:


<?php
phpinfo();
?>


as its contents, view the page. And check to see if GD is enabled, if not then you'll need to get your host to enable / upgrade it in otder for that woo work :) Also, check you have the correct PHP version :)

Cheers,

Ryan Jones

slice
Jan 26th, 2006, 12:56 AM
I am currently testing on my own pc.So i have to enable it myself. :)
How to enable it ?
Thank You.

AWC_Joe
Jan 26th, 2006, 02:20 AM
I am currently testing on my own pc.So i have to enable it myself. :)
How to enable it ?
Thank You.

This shuold get you started:
http://www.boutell.com/gd/


_

slice
Jan 26th, 2006, 09:35 AM
There are not clear instructions available for installing gd.

PlaGuE
Jan 26th, 2006, 12:19 PM
Nothing in life is easy.

visualAd
Jan 26th, 2006, 03:51 PM
Installation

To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option --with-gd. GD library requires libpng and libjpeg to compile.

In Windows, you'll include the GD2 DLL php_gd2.dll as an extension in php.ini. The GD1 DLL php_gd.dll was removed in PHP 4.3.2. Also note that the preferred truecolor image functions, such as imagecreatetruecolor(), require GD2.


Not sure it could be any clearer. :ehh: