Thumbnails
| From: | jjj | Date: | Mon, 19 Aug 2002 17:03:55 +0000 |
| Subject: | Thumbnails | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-25950@lists.php.net to get a copy of this message | ||
Alguien sabe como se pueden hacer thumbnails de imagenes del servidor.
Lo que quiero es mostrarlas ajustadas a un cuadro de 80x80 pixeles. Consegui este codigo, pero no lo
pude hacer funcionar bien:
<?php
/*Este Archivo Recibe Los Parametros $ruta, Que Es La Ruta Interna De La Imagen En El Servidor, Y
Los Parametros $ancho y $alto Que Se Refiere Al Alto Y Ancho De La Previsualizacion.*/
$fuente = @imagecreatefromgif($ruta);
$imgAncho = imagesx ($fuente);
$imgAlto =imagesy($fuente);
$imagen = ImageCreate($ancho,$alto);
ImageCopyResized($imagen,$fuente,0,0,0,0,$ancho,$alto,$imgAncho,$imgAlto);
Header("Content-type: image/gif");
imageGif($imagen);
?>
Pueden ver el articulo entero en http://www.maestrosdelweb.com/editorial/articulo.asp?thumbphp.
Gracias.
Alejo.