Hallo zusammen,
DAs folgende Script sollte die Bilder im angegebenen Ordner auslesen und automatisch verkleinern, doch es geschieht nichts wenn ich das script ausführe. Weiss jemand an was es liegen könnte...?
Vielen Dank
<?php
if(isset($_POST["submit"]))
{
$ordner = "$_POST[ordnerin]";
$handle = opendir($ordner);
while ($file = readdir ($handle)) {
if($file != "." && $file != "..") {
$compl = $ordner."/".$file;
$bild="/$_POST[ordnerin]/".$file;
$size=getimagesize($bild);
$breite=$size[0];
$hoehe=$size[1];
$neueHoehe=500;
$neueBreite=intval($breite*($neueHoehe/$hoehe));
$altesBild=ImageCreateFromJPEG($bild);
$neuesBild=imagecreatetruecolor($neueBreite,$neueHoehe);
imagecopyresampled($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
mkdir("$_POST[ordnerout]", 0777);
ImageJPEG($neuesBild,"$_POST[ordnerout]/".$file);
}
}
}
?>