בעקרון אבל אמור לעבוד , אין סיבה שלא
<?php
$album=$_GET;
header('Content-type: image/jpeg'); foreach (glob("$album/*.jpg") as $filename)
{ $co++;
list($width, $height) = getimagesize($filename);
$pics=$filename;
$picsn=str_replace("$album/",'',$filename);
if ($height > $width)
{
$ratio= ($height/$width);
$nheight="125";
$nwidth=($nheight/$ratio);
}
else
{
$ratio= ($width/$height);
$nwidth="125";
$nheight=($nwidth/$ratio);
}
$no++;
}
foreach (glob("$album/*.JPG") as $filename)
{
list($width, $height) = getimagesize($filename);
$pics=$filename;
$picsn=str_replace("$album/",'',$filename);
if ($height > $width)
{
$ratio= ($height/$width);
$nheight="125";
$nwidth=($nheight/$ratio);
}
else
{
$ratio= ($width/$height);
$nwidth="125";
$nheight=($nwidth/$ratio);
}
$no++;
}
for ($aaa=0 ; $aaa<$no ; $aaa++)
{
$nwid=$nwidth;
$nheig=$nheight;
$picz=$pics;
$thumbz=imagecreatetruecolor('125','125');
$source = imagecreatefromjpeg($picz);
imagecopyresized($thumbz,$source, 0, 0, 0, 0, 125, 125, 640,480);
imagejpeg($thumbz) ;
}
?>