Código PHP:
<?
// useage is thumbnail.php?im=imagename.jpg
// set for 60 px thumb
Header("Content-type: image/jpeg");
$orig_image = imagecreatefromjpeg($im);
list($width, $height, $type, $attr) = getimagesize($im);
if ($width > 100) {
$ratio = 100 / $width;
$newheight = $ratio * $height; }
else $newheight = $height;
$sm_image = imagecreatetruecolor(100,$newheight) or die ("Cannot Initialize new gd image stream");;
Imagecopyresampled($sm_image,$orig_image,0,0,0,0,100,$newheight,imagesx($orig_image),imagesy($orig_image));
imageJPEG($sm_image);
imagedestroy($sm_image);
imageDestroy($orig_image);
?>
Código PHP:
<?
...
echo "<tr>";
if ($data[foto1] != "no_foto1.jpg"){
$f = $data["foto1"];
$t="thumbnail.php?im=fotos/";
$file=$t . $f;
$v="img src=$file";
echo "<td width=\"268\" align=\"center\"><img src=$file></td>";
echo "</tr>";
...
?>
Gracias por la ayuda
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)