![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
23/12/2004, 11:23
|
![Avatar de JuanKa](http://static.forosdelweb.com/customavatars/avatar73531_1.gif) | | | Fecha de Ingreso: septiembre-2004
Mensajes: 468
Antigüedad: 20 años, 5 meses Puntos: 1 | |
Mira yo uso esta pagina para generar los tumbnail, pero como tu vez llamo a otra donde esta el codigo para los tumbnails (thumbnail.php) y cuando me posiciono sobre la imagen pequeña me llama a otra ver_foto.php
generar.php
......
<?php echo "<a href=\"ver_foto.php?de=".$fotos['des1']."&codi=".$fotos['id']."\";><img src=\"thumbnail.php?ruta=Archivos_Fotos/".$fotos['ima1']."\" border='0' alt='Ampliar Imatge'>"; ?>
.......
thumbnail.php
<?php
$arc=$_GET['ruta'];
$image = imagecreatefromjpeg($arc);
$img_w = imagesx($image);
$img_h = imagesy($image);
$new_img_w = 120;
$new_img_h = 100;
$new_img_source = imagecreatetruecolor($new_img_w,$new_img_h);
imagecopyresized($new_img_source, $image, 0, 0, 0, 0, $new_img_w, $new_img_h,$img_w, $img_h);
header("Content-type: image/jpeg");
imagejpeg($new_img_source);
?>
ver_foto.php
...
<?php echo "<img src=\"Archivos_Fotos/".$var_ima."\">"; ?>
....
Bueno eso esto. |