File "ContrastCommand.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/ContrastCommand.php
File size: 494 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Intervention\Image\Imagick\Commands;

use Intervention\Image\Commands\AbstractCommand;

class ContrastCommand extends AbstractCommand
{
    /**
     * Changes contrast of image
     *
     * @param  \Intervention\Image\Image $image
     * @return boolean
     */
    public function execute($image)
    {
        $level = $this->argument(0)->between(-100, 100)->required()->value();

        return $image->getCore()->sigmoidalContrastImage($level > 0, $level / 4, 0);
    }
}