Hello,
I do this to test the version of lib gd installed on the server:
if( (function_exists("imagecreatetruecolor")) &&
(function_exists("imagecopyresampled")) ) {
$out = imagecreatetruecolor( $s0x, $s0y) ;
imagecopyresampled ($out, $pic, 0, 0, 0, 0, $s0x, $s0y, $sizex, $sizey) ;
}else {
$out = imagecreate( $s0x, $s0y) ;
imagecopyresized($out, $pic, 0, 0, 0, 0, $s0x, $s0y, $sizex, $sizey) ;
}
And even if the lib gd is in version 1, it enters in the if and output the following insult:
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in index.php on line 22
Why it enters in the if, why does the function exist if the function is not available ?
Any idea to test if the functions imagecreatetruecolor and imagecopyresampled are available ?
What's more, the function gd_info() does not exist on most servers:
http://defacta.nexenservices.com/test.php
Thanks,
Vincent.