i have used two type of image creation code but both are giving error like in first
fatal error showing imagecreate() function is undefined
in seconde code
fatal errro imagecreatefromgif is undifine
what is wrong with it this function are there in php and also i m supplying right argument to it.
code is like
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$image['name']="imagetest.png";
$image['path']=realpath("./".$image['name']);
$font['size']=5;
//$image['id']=imagecreate(288,360);
$white=imagecolorallocate($image['id'],0xff,0xff,0xff);
$black=imagecolorallocate($image['id'],0,0,0);
imagechar($image['id'],$font['size'],10,10,"test text",$black);
imagestring($image['id'],$font['size'],40,40,"test at xy",$black);
imagepng($image['id'],$image['path']);
imagedestroy($image['id']);
print "<br> <a href=\"./".$image['name']."\" target=\"_blank\">".$image['name']."</a>";
?>
</body>
</html>
in second case
i use
<?php
Header("Content-type: image/gif");
?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
$argv="test image";
$string=implode($argv," ");
$im = imagecreatefromgif("../images/button1.gif");
$orange = ImageColorAllocate($im, 220, 210, 60);
$px = (imagesx($im)-7.5*strlen($string))/2;
ImageString($im,3,$px,9,$string,$orange);
ImageGif($im);
ImageDestroy($im);
?>
</body>
</html>
where string is $argv which is userd
what is wrong with it please help