GD problem

From: Date: Tue, 31 Aug 2004 07:57:19 +0000
Subject: GD problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-24468@lists.php.net to get a copy of this message
Hi, Is it possible to resize jpg/gif from gd 1.7, its working fine in gd 2.0 and my webbserver wont upgrade. This is my example (not working in gd 1.7) <?php // 1.php header("Content-type: image/jpeg"); $img = $_GET["img"]; $imgSource = @getimagesize($img); $imgWidth = $imgSource[0]; $imgHeight = $imgSource[1]; $imgType = $imgSource[2]; switch($imgType) { case 1: $imgSource = imagecreatefromgif($img); break; case 2: $imgSource = imagecreatefromjpeg($img); break; case 3: $imgSource = imagecreatefrompng($img); break; case 15: $imgSource = imagecreatefromwbmp($img); break; default: exit; } $h = ($_GET["w"]/$imgWidth)*$imgHeight; $imgTN = @imagecreatetruecolor($_GET["w"], $h); imagecopyresized($imgTN, $imgSource, 0, 0, 0, 0, $_GET["w"], $h, $imgWidth, $imgHeight); imagejpeg($imgTN, null, 80); imagedestroy($imgTN); ?> <img src="1.php?img=1.jpg&w=70&q=70">

« previous php.windows (#24468) next »