Imagecopyresampled()

From: Date: Fri, 11 Apr 2003 09:38:55 +0000
Subject: Imagecopyresampled()
Groups: php.general 
Request: Send a blank email to php-general+get-143469@lists.php.net to get a copy of this message
I'm absolutley flabberghated by the complexity of these image manipulation functions. I can't make anything work. First of all, I'm trying to create a thumbnail using this function: imagecopyresampled($destinationimage, "$LogoDirectory/$sourceimage", 0, 0, 0, 0, $logothumbnailwidth, $logothumbnailheight, $logopicwidth, $logopicheight); I get Warning: imagecopyresampled(): supplied argument is not a valid Image resource I assure you, it's a valid resource (the source file is there!). It doesn't work whether or not the destination image file exists already. So I fiddle around and finally add this: $destinationimage = imagecreatetruecolor($logothumbnailwidth, $logothumbnailheight); imagecopyresampled($destinationimage, "$LogoDirectory/$sourceimage", 0, 0, 0, 0, $logothumbnailwidth, $logothumbnailheight, $logopicwidth, $logopicheight); imagejpeg($destinationimage, "$LogoDirectory/" . $_REQUEST["seriescode"] .. ".jpg"); imagedestroy($destinationimage); Same results. Finally, I just try simply this: $destinationimage = imagecreatefromjpeg($_FILES["logotoupload"]["tmp_name"]); and get this: Fatal error: Call to undefined function: imagecreatefromjpeg() Seems something went wrong in the install? No clue, but GD seems to put a stop to me at every turn. Is there anyone who knows how to fix this stuff?

« previous php.general (#143469) next »