Thumbnail with GD

From: Date: Thu, 03 Oct 2002 23:20:37 +0000
Subject: Thumbnail with GD
Groups: php.general 
Request: Send a blank email to php-general+get-118790@lists.php.net to get a copy of this message
Hi, I am pretty lost.. I am trying to create a php thumbnail with php without using any *sql database.this script was supposed to open a directory then read it resize the images without losing quality and displays it on screen. ok, here is what I am trying to do and its now working: <? $dir = "imagestrips"; if($abre = opendir($dir)) { while($arq = readdir($abre)) { $filename = "imagestrips/" . $arq; if(is_file($filename)) { $neww = 100; $newh = 100; header("Content-type: image/jpeg"); $dst_img=imagecreate($neww, $newh); $src_img=imagecreatefromjpeg($filename); imagecopyresized($dst_img,$src_img,0,0,0,0,$neww,$newh,imagesx($src_img),imagesy($src_img)); imagejpeg($dst_img); } } } closedir($abre); ?> THANKS! net. -- Get your free email from www.linuxmail.org Powered by Outblaze

« previous php.general (#118790) next »