Fatal error: Call to undefined function imagecreatetruecolor()

hello i have a script error when uploading photos, I tried in local work but when trying on the web is not successful, the error message is Fatal error: Call to undefined function imagecreatetruecolor () . is there a solution?

case 'maintenanceAC':
	if(!is_dir($dtDir_01)){	mkdir($dtDir_01); mkdir($dtDir_02);	mkdir($dtDir_03);mkdir($dtDir_04); }
	else if(!is_dir($dtDir_02)){mkdir($dtDir_02);mkdir($dtDir_03);mkdir($dtDir_04);}
	else if(!is_dir($dtDir_03)){mkdir($dtDir_03);mkdir($dtDir_04);}
	else if(!is_dir($dtDir_04)){mkdir($dtDir_04);}
	foreach($id_foto as $key => $value){
		$source = $_FILES['foto']['tmp_name'][$key];
        $target = $link.$fileName;
          move_uploaded_file($source, $target);

          $imagepath = $fileName ;
          $save = $link.$namaBaru.'.jpg'; //This is the new file you saving
          $file = $link.$fileName; //This is the original file

          list($width, $height) = getimagesize($file) ;
          $tn = imagecreatetruecolor($width, $height) ;
          $image = imagecreatefromjpeg($file) ;
          imagecopyresampled($tn, $image, 0, 0, 0, 0, $width, $height, $width, $height) ;

          imagejpeg($tn, $save,25) ;

Sounds like GD Lib is not installed on the remote server. Contact your hoster and ask them to install it.
Other than that there is nothing you can do; if it’s not there it’s not there.

Thanks … now is running :slight_smile: