Zobacz to, napisałem na szybko...
[php:1:f32fb686ff]<?
if(!$quality) {$quality=100;}
if($folder=="") {
$file="$photo";
} else {
$file="$folder/$photo";
}
$srcImg = ImageCreateFromJpeg("$file");
$orginalWidth = ImageSX($srcImg);
$orginalHeight = ImageSY($srcImg);
if (!$width)
{
$newWidth=$orginalWidth;
$newHeight=$orginalHeight;
}
else
{
$org = ($width*100)/$orginalWidth;
(int)$newWidth = ($orginalWidth*$org)/100;
(int)$newHeight = ($orginalHeight*$org)/100;
$newWidth = $newWidth-1;
$newHeight = $newHeight-1;
}
$dstImg=ImageCreate($newWidth, $newHeight);
ImageCopyResized($dstImg,$srcImg,0,0,0,0,$newWidth,$newHeight,ImageSX($srcImg),I
ageSY($srcImg));
header ("Content-type: image/jpeg");
ImageJpeg($dstImg, '', $quality);
?>
[/php:1:f32fb686ff]
Zdjęcie wstaw tak...
Kod
<a href=katalog/zdjecie.jpg target=_blank><img border=0 src=resize.php?quality=70&folder=tutaj_katalog&photo=tutaj_url_fotki&width=100>
Mam nadzieje że o to chodziło...