<?php

error_reporting(0);
if (isset($_REQUEST['width']) && $_REQUEST['width'] != '') {
    $width = $_REQUEST['width'];
}
if (isset($_REQUEST['height']) && $_REQUEST['height'] != '') {
    $height = $_REQUEST['height'];
}
if ($height != '') {
    header('Content-Type: image/jpeg');
    include 'resizeimageclass.php';
    $image = new ResizeImage();
    $image->load($_REQUEST['path']);
    $image->resizeToHeight($height);
    $image->output();
}
if ($width != '') {
    header('Content-Type: image/jpeg');
    include 'resizeimageclass.php';
    $image = new ResizeImage();
    $image->load($_REQUEST['path']);
    $image->resizeToWidth($width);
    $image->output();
}
//                        header('Content-Type: image/jpeg');
//			include('resizeimageclass.php');
//			$image = new ResizeImage ();
//			$image->load($_REQUEST['path']);
//			$image->resizeToWidth($width);
//			$image->output();