home
/
zktecojo
/
public_html
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Gd
/
Commands
➕ New
📤 Upload
✎ Editing:
SharpenCommand.php
← Back
<?php namespace Intervention\Image\Gd\Commands; class SharpenCommand extends \Intervention\Image\Commands\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 = array( array($min, $max, $min), array($max, $abs, $max), array($min, $max, $min) ); // apply the matrix return imageconvolution($image->getCore(), $matrix, $div, 0); } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel