- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 
                        $src = $_GET["src"];
$w = $_GET["w"];
$h = $_GET["h"];
$q = $_GET["q"];
$info = pathinfo($src);
$ext = $info["extension"];
if($ext == "jpg" or $ext == "jpeg"){
    $img = imagecreatefromjpeg($src);
}
else if($ext == "gif"){
    $img = imagecreatefromgif($src);
}
else if($ext == "png"){
    $img = imagecreatefrompng($src);
}
$x = $w / imagesx($img);
$y = $h / imagesy($img);
$k = ($x > $y) ? $y : $x;
$nw = intval(imagesx($img) * $k);
$nh = intval(imagesy($img) * $k);
$img1 = imagecreatetruecolor($nw, $nh);
// $img1 = imagecreatefromjpeg("bj.jpg");
imagecopyresampled($img1, $img, 0, 0, 0, 0, $nw, $nh, imagesx($img), imagesy($img));
header("Content-type: image/jpeg");
imagejpeg($img1, null, $q);
imagedestroy($img);
imagedestroy($img1);
                                     
        
            Кусман отборного калища руки Великого уё... Гудвина =)