Para los que no sepan programar en PHP,
aqui les dejo el codigo para hacer lo que
dije en el tema anterior, aunque actualmente
no se pueda probrar en mi@rroba.
Para probar este ejemplo deben crear un
subdirectorio llamado photos, dentro del
directorio de los siguentes 2 archivos.
thumbral.php:
<html>
<body>
<head>
<title> </title>
</head>
<?
$i = 0;
$d = dir("./photos");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
echo "<table width=700 border=\"3\">";
echo "<tr>";
while($entry=$d->read()) {
if(stristr(strrev($entry), strrev(".jpg")) != false) {
echo "<a href=\"" . $d->path . "/" . $entry . "\"><img src=\"prbimg2.php?fl=" . $d->path . "/" . $entry . "\"></a>\n";
if(floor($i / 3) < floor(++$i / 3)) echo "<br>";
}
}
$d->close();
echo "</tr>";
echo "</table>";
?>
</body>
</html>
prbimg2.php:
<?
header("Content-type: image/jpeg");
$im=ImageCreateFromJPEG($HTTP_GET_VARS['fl']);
$in=ImageCreate(200, 200);
$size=GetImageSize($HTTP_GET_VARS['fl']);
ImageCopyResized($in ,$im ,0 ,0 ,0 ,0 ,200 ,200 ,$size[0] , $size[1]);
ImageJPEG($in);
ImageDestroy($in);
?>