Ich weiß nicht, was du genau willst, aber versuchs doch mal mit diesem Code: PHP-Code: //Verzeichnis durchsuchen und filtern $h = opendir('.'); while ($file = readdir($h)) { $img = false; if (eregi('\.png$', $file)) $img = @ImageCreateFromPNG($file); elseif (eregi('\.jpe\\?g$', $file)) $img = @ImageCreateFromJPEG($file); if ($img) { $alt_breite = imagesx($img); $alt_hoehe = imagesy($img); $neu_breite = 640; //Durch die Breite ersetzen $neu_hoehe = round(($alt_hoehe / $alt_breite) * 100); $thumb = imagecreate($neu_breite, $neu_hoehe); imagecopyresized($thumb, $img, 0, 0, 0, 0, $neu_breite, $neu_hoehe, $alt_breite, $alt_hoehe); imagePNG($img, 'thumb-' . $file); } Verkleinert alle Bilder im Verzeichnis.
//Verzeichnis durchsuchen und filtern $h = opendir('.'); while ($file = readdir($h)) { $img = false; if (eregi('\.png$', $file)) $img = @ImageCreateFromPNG($file); elseif (eregi('\.jpe\\?g$', $file)) $img = @ImageCreateFromJPEG($file); if ($img) { $alt_breite = imagesx($img); $alt_hoehe = imagesy($img); $neu_breite = 640; //Durch die Breite ersetzen $neu_hoehe = round(($alt_hoehe / $alt_breite) * 100); $thumb = imagecreate($neu_breite, $neu_hoehe); imagecopyresized($thumb, $img, 0, 0, 0, 0, $neu_breite, $neu_hoehe, $alt_breite, $alt_hoehe); imagePNG($img, 'thumb-' . $file); }
--Auf meiner Homepage gibt es unter anderem ein PHP-Tutorial!Was man mit CSS alles anstellen kann Opera rulez! opera.com - opera-info.de - Opera- Skins, Banner, Einstellungen und vieles mehr -- Windows 9x/ME A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition.
Foren-Regeln