note 67303 deleted from function.imagecopyresized by bjori

From: Date: Wed, 07 Jun 2006 10:38:49 +0000
Subject: note 67303 deleted from function.imagecopyresized by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-113500@lists.php.net to get a copy of this message
Note Submitter: Guilherme Valéro Veras Reason: non-english ---- Criando um simples thumb com o tamanho que você quiser! Algo mais objetivo: <?php $filename = 'nome_sua_img.jpg'; $TamX = 106; // Novo Tamanho para X $TamY = 73; // Novo Tamanho para Y header('Content-type: image/jpeg'); // Obtendo os tamanhos list($width, $height) = getimagesize($filename); // Alocando o thumb $thumb = imagecreatetruecolor($TamX , $TamY); $source = imagecreatefromjpeg($filename); // Mudando o tamanho 106 x 73 - Gerando o Thumb em sí imagecopyresized($thumb, $source, 0, 0, 0, 0, $TamX , $TamY, $width, $height); // Imprimindo no Browser imagejpeg($thumb); // Liberando a memoria imagedestroy($thumb); ?> =)

« previous php.notes (#113500) next »