PATH:
home
/
lab2454c
/
tripvare.com
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Gd
/
Commands
<?php namespace Intervention\Image\Gd\Commands; use Intervention\Image\Commands\AbstractCommand; class SharpenCommand extends AbstractCommand { /** * Sharpen image * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { $amount = $this->argument(0)->between(0, 100)->value(10); // build matrix $min = $amount >= 10 ? $amount * -0.01 : 0; $max = $amount * -0.025; $abs = ((4 * $min + 4 * $max) * -1) + 1; $div = 1; $matrix = [ [$min, $max, $min], [$max, $abs, $max], [$min, $max, $min] ]; // apply the matrix return imageconvolution($image->getCore(), $matrix, $div, 0); } }
[-] InsertCommand.php
[edit]
[-] HeightenCommand.php
[edit]
[-] BlurCommand.php
[edit]
[-] LimitColorsCommand.php
[edit]
[-] ResetCommand.php
[edit]
[-] SharpenCommand.php
[edit]
[-] TrimCommand.php
[edit]
[+]
..
[-] ColorizeCommand.php
[edit]
[-] PixelateCommand.php
[edit]
[-] GammaCommand.php
[edit]
[-] FitCommand.php
[edit]
[-] BrightnessCommand.php
[edit]
[-] InterlaceCommand.php
[edit]
[-] ContrastCommand.php
[edit]
[-] OpacityCommand.php
[edit]
[-] WidenCommand.php
[edit]
[-] InvertCommand.php
[edit]
[-] DestroyCommand.php
[edit]
[-] ResizeCommand.php
[edit]
[-] MaskCommand.php
[edit]
[-] CropCommand.php
[edit]
[-] GetSizeCommand.php
[edit]
[-] GreyscaleCommand.php
[edit]
[-] BackupCommand.php
[edit]
[-] ResizeCanvasCommand.php
[edit]
[-] FillCommand.php
[edit]
[-] FlipCommand.php
[edit]
[-] RotateCommand.php
[edit]
[-] PickColorCommand.php
[edit]
[-] PixelCommand.php
[edit]