Witam mam taki skrypt do robienia miniaturek:
<?php
$file = \"./wasze04/duze/\".$upa.\"\";
$obrazek_minn = \"$upa\";
if(!$max_width) $max_width = 100;
if(!$max_height) $max_height = 75;
$width = $size[0];
$height = $size[1];
$x_ratio = $max_width / $width;
$y_ratio = $max_height / $height;
if(($width <= $max_width) && ($height <= $max_height))
{
$tn_width = $width;
$tn_height = $height;
}
else if(($x_ratio * $height) < $max_height)
{
$tn_height = ceil($x_ratio * $height); $tn_width = $max_width;
}
else
{
$tn_width = ceil($y_ratio * $width); $tn_height = $max_height;
}
$src = imagecreatefromjpeg($file);
$dst = imagecreatetruecolor($tn_width, $tn_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
Header('Content-type: image/jpeg'); imagejpeg($dst, \"./wasze04/\".$obrazek_minn);
?>
Jak dodaje foto to najpierw ustawiana jest wysokosc a pozniej szerokosc...a chce zeby bylo na odwrot zeby wszystkie foty mialy ta sama szerokosc a rozne wysokosci...jak to zmienic ?
pozdrawiam
TOMEK