Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/umedia3/inc/ |
Upload File : |
<? function fso_image_fixsize($wh,$type,$max=80,$defqual=85) { $currentimagesize = getimagesize($wh); $image_width = $currentimagesize[0]; $image_height= $currentimagesize[1]; $type=strtolower($type); if (($image_height > $max) || ($image_width > $max)) { if ($image_height > $image_width) { $sizefactor = (double) ($max / $image_height); } else { $sizefactor = (double) ($max / $image_width) ; } } else { $sizefactor = 1; } if ($sizefactor!=1) { $newwidth = (int) ($image_width * $sizefactor); $newheight = (int) ($image_height * $sizefactor); //echo $newwidth."x"; //echo $newheight; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); if ($type=="jpg" || $type == "jpeg") { $source = imagecreatefromjpeg($wh); } if ($type=="gif" ) { $source = imagecreatefromgif($wh); } if ($type=="png" || $type == "pong") { $source = imagecreatefrompng($wh); } if ($type=="bmp" ) { $source = imagecreatefromwbmp($wh); } // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $image_width, $image_height); // Output imagejpeg($thumb,$wh,$defqual); } } ?>