apply
Apply a filter to the image. See Filters section for a list of available filters.
apply ( ImageInterface &$image, FilterInterface $filter ): EditorInterface
Parameters
image
Instance of Image.
filter
Instance implementing the FilterInterface.
Returns
An instance of Editor.Examples
use Grafika\Grafika;
$editor = Grafika::createEditor();
$editor->open( $image, 'test.jpg' );
$filter = Grafika::createFilter('Blur', 10); // Apply a blur of 10. Possible values 1-100
$editor->apply( $image, $filter ); // Apply it to an image
Test image:
Blur filter: