note 18167 deleted from function.imagecopyresized by didou
| From: | didou@php.net | Date: | Fri, 20 Jun 2003 12:19:51 +0000 |
| Subject: | note 18167 deleted from function.imagecopyresized by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50724@lists.php.net to get a copy of this message | ||
Note Submitter: william@waw.com.br
----
REDEFINE? BICUBIC? ARGH!
If you aren't happy with the quality of the resized images, just use this:
<?
// Cria thumbnail de uma imagem, com boa qualidade
// -----------------------------------------------
// William G. Comnisky
// william@waw.com.br
$imagem = "img.jpg";
$img_origem = imagecreatefromjpeg($imagem);
$nova_largura = imagesx($img_origem) / 4;
$nova_altura = imagesy($img_origem) / 4;
$img_destino = imagecreatetruecolor($nova_largura,$nova_altura);
imagecopyresampled($img_destino,
$img_origem,0,0,0,0,$nova_largura,$nova_altura,imagesx
($img_origem),imagesy($img_origem));
imageJPEG($img_destino);
?>