<?php
namespace   abeautifulsite;
use         Exception;

require 'SimpleImage.php';

try {
    // Flip the image and output it directly to the browser
    $img = new SimpleImage($_GET['image']);
    $img->thumbnail($_GET['width'], $_GET['height'])->output('jpg');
} catch(Exception $e) {
    echo '<span style="color: red;">' . $e->getMessage() . '</span>';
}