note 95366 added to function.imagejpeg

From: Date: Tue, 29 Dec 2009 14:13:07 +0000
Subject: note 95366 added to function.imagejpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-164431@lists.php.net to get a copy of this message
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 } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 61.2.41.91 ---- Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php Edit -- https://master.php.net/note/edit/95366 Del: integrated -- https://master.php.net/note/delete/95366/integrated Del: useless -- https://master.php.net/note/delete/95366/useless Del: bad code -- https://master.php.net/note/delete/95366/bad+code Del: spam -- https://master.php.net/note/delete/95366/spam Del: non-english -- https://master.php.net/note/delete/95366/non-english Del: in docs -- https://master.php.net/note/delete/95366/in+docs Del: other reasons-- https://master.php.net/note/delete/95366 Reject -- https://master.php.net/note/reject/95366 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164431) next »