Created
November 5, 2017 17:00
-
-
Save hyyan/9fe882b18686445f03ef2d003e365d3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
use Jaguar\Canvas, | |
Jaguar\Transformation, | |
Jaguar\Action\Color\Grayscale, | |
Jaguar\Action\EdgeDetection, | |
Jaguar\Action\Color\Negate; | |
$canvas = new Canvas('./image.jpg'); | |
$canvasTransformation = new Transformation($canvas); | |
$canvasTransformation | |
->apply(new Grayscale()) | |
->apply(new EdgeDetection(EdgeDetection::LAPLACIAN_FILTER3)) | |
->apply(new Negate()) | |
->getCanvas() | |
->show(); // send the result to the browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment