Exemplo n.º 1
0
include_once '../controller/ImageController.php';
$image_controller = new ImageController();
include_once '../controller/UserController.php';
$user_controller = new UserController();
if (isset($_POST['q'])) {
    $path = htmlspecialchars($_POST['q']);
    if (isset($_POST['action'])) {
        $action = htmlspecialchars($_POST['action']);
        if ($action == "lesscontrast") {
            $image_controller->contrastImage(false, $path);
        } else {
            if ($action == "morecontrast") {
                $image_controller->contrastImage(true, $path);
            } else {
                if ($action == "lessluminosity") {
                    $image_controller->brightnessImage(false, $path);
                } else {
                    if ($action == "moreluminosity") {
                        $image_controller->brightnessImage(true, $path);
                    } else {
                        if ($action == "sepia") {
                            $image_controller->sepiaImage($path);
                        } else {
                            if ($action == "gray") {
                                $image_controller->grayImage($path);
                            } else {
                                if ($action == "blur") {
                                    $image_controller->gaussianImage($path);
                                } else {
                                    if ($action == "noise") {
                                        $image_controller->countourImage($path);