note 95366 deleted from function.imagejpeg by thiago

From: Date: Tue, 29 Dec 2009 14:14:12 +0000
Subject: note 95366 deleted from function.imagejpeg by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164433@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- This is the script i have been using for creating thumbnails of images ,but there is a problem that i can only display one image at time how many times i called it. <?php $file= "image.gif"; $old= @imagecreatefromjpeg("$file"); $weight= imageSX($old); $height= imageSY($old); $wn= 60; $hn= 60; if (!$old) { // We get errors from PHP's ImageCreate functions... // So let's echo back the contents of the actual image. readfile ($file); } else { $new = @imagecreatetruecolor($wn, $hn); @imageCopyResized($new, $old, 0, 0, 0, 0, $wn, $hn, $weight, $height); while (@ob_end_clean()); // for working of the header // Set the content type header - in this case image/jpeg Header("Content-type: image/jpeg"); @imagejpeg($new); // Output the image } ?>

« previous php.notes (#164433) next »