Hola
con
opendir() y
readdir() puedes obtener el puntero del directorio y empezar a leer su contenido. Luego para redimensionar podrias usar algo como esto
Código PHP:
Ver originalfunction resizeImage($file,$scale="",$width="",$height="")
{
// If they wish to scale the image.
{
// Create our image object from the image.
// Get the image size, used in calculations later.
// If there is NOT a thumbnail for this image, make one.
{
// Create our thumbnail size, so we can resize to this, and save it.
// Resize the image.
imagecopyresampled($tnImage,$fullImage,0,0,0,0,$fullSize[0]/$scale,$fullSize[1]/$scale,$fullSize[0],$fullSize[1]); // Create a new image thumbnail.
// Clean Up.
// Return our new image.
return "tn_".$file;
}
// If there is a thumbnail file, lets just load it.
else
return "tn_".$file;
}
// If they want to force whatever size they want.
{
return "tn_".$file;
}
else
{
return false;
}
}
con GD activado.
saludos