ccrevcypsys Posted September 4, 2007 Share Posted September 4, 2007 hello i need help changing the directory that gd is uploading to include the .$date_str."_". because it is not. here is teh src info from gd. class thumbnail { var $img; function thumbnail($imgfile="",$width="",$height="") { global $config; //detect image format $this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile); $this->img["format"]=strtoupper($this->img["format"]); if($config['gdversion']>0) { if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG $this->img["format"]="JPEG"; $this->img["src"] = imagecreatefromjpeg($imgfile); } elseif($this->img["format"]=="PNG") { //PNG $this->img["format"]="PNG"; $this->img["src"] = imagecreatefrompng($imgfile); } elseif ($this->img["format"]=="GIF") { //GIF $this->img["format"]="GIF"; $this->img["src"] = imagecreatefromgif($imgfile); } else { //DEFAULT echo "Not Supported File!"; exit(); } if($width>0 && $height>0) { $this->img["width"] = $width; $this->img["height"] = $height; } else { @$this->img["width"] = imagesx($this->img["src"]); @$this->img["height"] = imagesy($this->img["src"]); } //default quality jpeg $this->img["quality"] = $config['gdquality']; } else { return FALSE; } } Quote Link to comment https://forums.phpfreaks.com/topic/67925-changing-something-in-gdphpinc/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.