note 30913 deleted from ref.image by tularis

From: Date: Sun, 29 Jun 2008 21:12:23 +0000
Subject: note 30913 deleted from ref.image by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140978@lists.php.net to get a copy of this message
Note Submitter: Angus Chung a swinburnemultimediastudent ---- this code work faster in my p4 2G machine PHP Version 4.3.1 imageresampled() gives better quality however much slower when work on high resolution image , e.g. the DC photo.therefore i first use imageresized() to produce a middle size temp image, then imageresampled() the temp image to a smaller thumbnail and output to the browser <?php $t_w = 444; // temp image width x 3 $t_h = 333; // temp image height x 3 ................ // get and create intermediate image ................ imagecopyresized ($destimage,$srcimage,0,0,0,0,$t_w,$t_h,$width,$height); // process of the output thumbnail $t_w2 = round($t_w/3); //148 $t_h2 = round($t_h/3); //111 $destimage2 = imagecreatetruecolor($t_w2,$t_h2); // for output imagecopyresampled ($destimage2,$destimage,0,0,0,0,$t_w2,$t_h2,$t_w,$t_h); imagedestroy($destimage); imageinterlace ($destimage2,1);//progressive jpeg imagejpeg($destimage2, '', 45); imagedestroy($destimage2); ................. ?>

« previous php.notes (#140978) next »